When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
28 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
This question is being automatically marked as stale.
If your question has been answered, type !solved.
If your question is not answered feel free to bump the post or re-ask.
Take a look at !howto ask for tips on improving your question.
why msan?
g++ main.c -o main -fsanitize=address,leak
these work out of the box on linux 🤷♂️
and what do you mean by "nothing"
because asan does work ¯_(ツ)_/¯
Msan is specifically for catching uses of uninitialized variables, which is something other sanitizers apparently don't do
managed to run it
but it doesnt detect the uninitialized variable
I got the output they did on https://github.com/google/sanitizers/wiki/memorysanitizer
#include <stdio.h>
int main(int argc, char** argv) {
int* a = new int[10];
a[5] = 0;
if (a[argc])
printf("xx\n");
return 0;
}
Works on my end...
g++ main.cpp
not gcc

and clang++ instead of clang
this is c++

no but msan probably does some magic that requires the C++ standard library when you use new
If you want MemorySanitizer to work properly and not produce any false positives, you must ensure that all the code in your program and in libraries it uses is instrumented (i.e. built with -fsanitize=memory).
i didnt build libc++ with it and it works
because it just works with msan