Fix race in cJSON between librdkafka and aws-c-common#94343
Conversation
|
Workflow [PR], commit [389d969] Summary: ❌
|
4cd4727 to
826cce0
Compare
|
@antaljanosbenjamin perhaps for review? |
|
Based on this comment, it is not clear to me if this is always a good thing. However, I assume that is solved in the meantime. If not, we can always revert the PR. There is one thing though: could you please add your patch to the file in our fork of librdkafka where we describe what needs to be applied? I think what you need to do:
This way if we want to update librdkafka to a new version, we know what we have to do to keep the current working state of our fork. |
|
The changes themselves and the idea I think is okay. I am kind of unsure about that parsing thing, and this way we would definitely use the kafka included cJSON more, but let's see what happens. |
|
@antaljanosbenjamin I did as you said, thanks. Wasn't aware that our librdkafka fork comes with such sophisticated upgrade instructions. Definitely useful. About confluentinc/librdkafka#4159 (comment): There are two ways how cJSON can be misused at the moment:
|
Fixes #80866
#80866 happens only rarely and I didn't try to reproduce it locally. Therefore, this PR takes a brute-force approach. In the absence of namespaces in C, this PR prefixes
internal_hooksstatic variablein librdkafka's version of cJSON with
kafka_. Calls to cJSON in librdkafka were redirected to prefixed functions. This makes sure the hard way that librdkafka and aws-c-common never interact with the other's cJSON anymore.The maintenance headaches created by this PR are manageable as upstream cJSON is kind of dead and no updates are expected in future.
Changelog category (leave one):