-
-
Notifications
You must be signed in to change notification settings - Fork 648
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
use-of-uninitialized-value #414
Comments
I'm pretty sure the issue might be that you are using an uninstrumented libc++: https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo This issue has been reported quite a bit in the past :) |
Oh... was not aware of that, sorry. Sounds like you are correct. Will report in ~2 hours... |
Ok sorry, this is probably a little off topic. But has someone done this already? I'm stuck. After following the steps above to compile libc++ with MemoryWithOrigins, I'm running: But I end up with:
|
I just followed the steps (without the gtest-related ones) and it worked on my machine - first time getting msan to work!
Then I entered this: (notice how I've substituted
And after that I compiled this program: #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include "doctest/doctest.h"
TEST_CASE("") {
int a;
CHECK(a == 1);
} With this command (no need to pass the right include dirs to doctest because I include it properly in the
and running it gave me this:
And when I initialized the variable |
Thanks, I went through your steps and noticed I missed a crucial detail. The part about Now it works fine for me. Thanks! Here is what I ended up with: |
Glad it worked :) |
Description
doctest triggers clangs MemorySanititzer so it's not possible to see what my code would do.
Steps to reproduce
mkdir build && cd build && CXXFLAGS=-fsanitize=memory LDFLAGS=-fsanitize=memory cmake .. -DCMAKE_BUILD_TYPE=Debug && make && examples/all_features/all_features
With e.g. clang 10, not sure about other versions.
Extra information
Exact message
Last non stl line is here:
The text was updated successfully, but these errors were encountered: