You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created headers in a local function, and their values were created by dynamically allocating memory in the heap. Then, I store these pointers ( and I‘ve never freed them ):
long n1;
long n2;
kafka::Headers headers;
auto pN1Bytes = (decltype(n1)*)malloc(sizeof(n1));
*pN1Bytes = n1;
auto pN2Bytes = (decltype(n2)*)malloc(sizeof(n2));
*pN2Bytes = n2;
headers.push_back(kafka::Header(kafka::Header::Key("n1"), kafka::Header::Value(pN1Bytes, sizeof(n1))));
headers.push_back(kafka::Header(kafka::Header::Key("n2"), kafka::Header::Value(pN2Bytes, sizeof(n2))));
but it occasionally crashes in rd_kafka_headers_destroy, here is the stack:
I sent msg using the following method, and this method is called sequentially:
I created headers in a local function, and their values were created by dynamically allocating memory in the heap. Then, I store these pointers ( and I‘ve never freed them ):
but it occasionally crashes in
rd_kafka_headers_destroy
, here is the stack:I sent msg using the following method, and this method is called sequentially:
-- mordern-cpp-kafka: v2024.07.03
-- librdkafka: 2.4.0
The text was updated successfully, but these errors were encountered: