Skip to content

Update dependencies#62

Merged
lcsmuller merged 42 commits intodevfrom
update_deps
Apr 27, 2022
Merged

Update dependencies#62
lcsmuller merged 42 commits intodevfrom
update_deps

Conversation

@lcsmuller
Copy link
Collaborator

What?

  1. Update dependencies
    1.1. uthash.h replaced with chash.h, as the latter is more portable, and easier to maintain.
    1.2. jsmn-find.h most recent, zero-allocation, stable version (v1.0.0).
  2. Fix logconf.c regression where logging modules could no longer be disabled via config.json

Why?

1.1. chash.h has proven to be more portable, with an easier syntax (therefore easier to maintain) - and provides greater memory control.
1.2. v1.0.0 jsmn-find.h provides a stackful API (much like json-build), meaning creating a duplicate (for context sharing) is as easy as doing a single memory allocation and memcpy()'ing from the original (see _discord_clone_gateway() at discord-client.c).

How?

1.1. discord-adapter_ratelimit.c, discord-adapter_refcount.c used to rely on uthash.h, those have been refactored to work with chash.h accordingly.

Testing?

Preliminary testing have shown that the ratelimiting handling behavior prior to this PR have been kept - ratelimiting has been tested via test/async.c and test/sync.c multi-channels spamming.
Side-note: A out-of-bounds read (off by one byte) occurs at test/sync.c once the worker-thread threshold has been reach, it can be reproduced by running test/sync.c executable under valgrind, and then sending !spam command four times in some guild the bot is part of. Because worker-threads are deprecated and should be removed in the future, fixing this is not a priority.

lcsmuller and others added 30 commits April 17, 2022 01:49
@lcsmuller lcsmuller added the bug Something isn't working label Apr 27, 2022
@lcsmuller lcsmuller merged commit 6388456 into dev Apr 27, 2022
@lcsmuller lcsmuller deleted the update_deps branch April 27, 2022 20:16
@ghost
Copy link

ghost commented Apr 27, 2022

We will run this on VAX ULTRIX one day.

@HackerSmacker
Copy link
Collaborator

Let it be known that Concord works fine on Solaris 9 and 10, when compiled with the Sun C compiler (Sun Studio 10 and Sun Studio 11)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants