-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MemorySanitizer: use-of-uninitialized-value in rdtime.h #4865
Comments
Hi, thanks for the report, the problems seems to be that |
@emasab i tried to do so and it fixes the problem, but i don't think it is better solution, because
Initalization inside So, the sanitizer unpoison is enough good solution, because it does nothing in Release and Debug builds |
@emasab could you review again the patch, please |
Description
librdkafka fails with MemorySanitizer with
use-of-unitialized-value
insrc/rdtime.h
.The error is precisely:
Error is in
rd_timeout_init_timespec
and inrd_timeout_init_timespec_us
.Their argument
tspec
is always uninitialized andtimespec_get(tspec, TIME_UTC);
is not initializing it entirely.I found the comment about the same issue in
zstd
code: https://github.com/facebook/zstd/blob/dev/programs/timefn.c#L74Importance
I am from @userver-framework, we have a Kafka client based on librdkafka, which represents non-blocking and scalable interfaces for producers and consumers.
We have huge number of tests and CI checks both for internal (in company's repository) and external (in Github CI) repositories, under different compilers, build options and sanitizers.
But we cannot enable MSAN sanitizer for Kafka client because of the error.
P.S. I checked that with my fix, our tests works.
P.P.S. Client code: https://github.com/userver-framework/userver/tree/develop/kafka
How to reproduce
I made a repo with instruction and small code example to reproduce the error and check that my fix works.
Repository link: https://github.com/fdr400/rdkafka-producer-msan
Checklist
IMPORTANT: We will close issues where the checklist has not been completed.
Please provide the following information:
2.5.3
2.13-3.7.0
(but not used in example)bootstrap.servers=localhost:9092
Ubuntu 24.04
The text was updated successfully, but these errors were encountered: