Opened 7 years ago
Closed 6 years ago
#11425 closed Bugs (invalid)
use-of-uninitialized-value
Reported by: | Owned by: | Gennadiy Rozental | |
---|---|---|---|
Milestone: | To Be Determined | Component: | test |
Version: | Boost 1.60.0 | Severity: | Problem |
Keywords: | Cc: |
Description
I tried to test my own library using clang sanitizers, but I use Boost.Test and, to my surprise, Boost.Test itself had an use of uninitialized variables, like you can see on the clang report: https://travis-ci.org/vinipsmaker/asiohttpserver/jobs/67654540#L687
Change History (12)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Milestone: | To Be Determined → Boost 1.59.0 |
---|---|
Resolution: | → obsolete |
Status: | new → closed |
Please test this again with new release of boost.test (1.59) and report any issues you find.
comment:3 by , 7 years ago
Milestone: | Boost 1.59.0 → To Be Determined |
---|---|
Resolution: | obsolete |
Status: | closed → reopened |
Version: | Boost 1.58.0 → Boost 1.60.0 |
Hi, I've tried to use clang sanitizers with my tests that use Boost.Test again and again the memory sanitizer complained.
I've create an empty test and clang sanitizer complained. If the test body is empty, no code of mine is triggering the issue. Therefore, I believe the issue lies within Boost.Test.
Here is the failure (with stack trace): https://travis-ci.org/vinipsmaker/asiohttpserver/jobs/99930074#L766
Here is the code: https://github.com/vinipsmaker/asiohttpserver/blob/aad4535b24cb6c5800fd74375479bb5732e45487/test/boosttest.cpp (I forgot to remove one unnecessary #include
, but it's not important)
follow-ups: 5 6 comment:4 by , 7 years ago
Hi,
Thanks for those information. However from the logs you provided, it looks like you are linking against 1.59. Would you please try with 1.60?
comment:5 by , 7 years ago
Replying to renficiaud:
Hi,
Thanks for those information. However from the logs you provided, it looks like you are linking against 1.59. Would you please try with 1.60?
I missed that. Thanks for warning me. I'm gonna try and report back (possibly closing issue if already gone).
comment:6 by , 7 years ago
Replying to renficiaud:
Hi,
Thanks for those information. However from the logs you provided, it looks like you are linking against 1.59. Would you please try with 1.60?
I just updated the build to make use of Boost 1.60 and the error is still there: https://travis-ci.org/vinipsmaker/asiohttpserver/jobs/99930074#L835
follow-up: 8 comment:7 by , 7 years ago
I can reproduce the complain of clang-3.5 on the same example with the included version of boost.test. However when I run the program with valgrind, I have 0 issue reported.
comment:8 by , 7 years ago
Replying to renficiaud:
I can reproduce the complain of clang-3.5 on the same example with the included version of boost.test. However when I run the program with valgrind, I have 0 issue reported.
I'll take a look with Valgrind too. Thanks for the hint.
If I don't see any error with Valgrind, then it could very well be a false negative on clang and I'll report the issue with clang guys.
I'll report back here later.
comment:10 by , 7 years ago
Replying to renficiaud:
Any news on this?
I haven't forgotten about it, but I just hasn't reserved time to investigate it yet. I'll do it eventually.
comment:11 by , 6 years ago
The issue can be closed. It's a false positive from Clang. All libs (even libstdc++) needs to be recompiled with MemorySanitizer if you don't want to see false positives. If I spend much more time trying to use clang's MemorySanitizer and not have any results, I'll move entirely to Valgrind (i.e. only rely on Vallgrind memory sanitizer and not try to use both).
comment:12 by , 6 years ago
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
Hi,
Thank you for the feedback you gave us and the time you spent in digging more! I'll use this ticket as a reference for the next memleak we receive from Clang :)
Closing the ticket now.
Thank you for your report. I had a look at this, but it seems to me that those warnings are false positives: the ones I saw end up in the source files of clang.
Would you please tell us why you think that this is a boost.test issue? Maybe I am missing something.