This work is being done to reduce the size of MSAN with track origins binary.
Builds upon: https://reviews.llvm.org/D131205
Differential D131415
Remove function name from sanitize-memory-track-origins binary. kda on Aug 8 2022, 10:18 AM. Authored by
Details This work is being done to reduce the size of MSAN with track origins binary. Builds upon: https://reviews.llvm.org/D131205
Diff Detail
Event TimelineComment Actions Refactor to address function changes and print generic message regarding location of uninitialized stack variable. Comment Actions please show an error message on a non-trivial test case Comment Actions Where can I get the name of the variable? (I think it is buried in the debug info some place, but I would need an example to help me extract it.) Comment Actions
Not sure I understand the question. MSan gets the variable names today just fine: % cat stack-uninit.c void bar(int *a) {} int main() { int foo; bar(&foo); if (foo) return 42; return 0; } % clang -g -fsanitize=memory -fsanitize-memory-track-origins stack-uninit.c && ./a.out ==389328==WARNING: MemorySanitizer: use-of-uninitialized-value ... Uninitialized value was created by an allocation of 'foo' in the stack frame of function 'main' Comment Actions Absolutely. And this change will remove foo and main from the global. Uninitialized value was created on the stack (first frame below should reference the variable) I believe that foo is somewhere else in the binary, but I don't know the code which would be required to draw it out and display it in the message.
Comment Actions dropping the function name is fine, we have it from the stack traces. |
It technically not the stack, just a frame.
Shorter message like this has the same meaning:
"Uninitialized value was created here:"