[PATCH] D29382: [lsan] Respect default value of detect_leaks flag

Yury Gribov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 09:09:46 PST 2017

ygribov added inline comments.

Comment at: test/asan/TestCases/Linux/leak.cc:3
 // REQUIRES: leak-detection
m.ostapenko wrote:
> kcc wrote:
> > why?
> Sad story. The value of 't' pointer is spilled to stack before calling printf. And for some reason LSan treats the top frame (that corresponds to main function) as a source of live pointers. This happens because SP value extracted via ptrace has **lower** value than the top address of main function frame.
"for some reason" - just guesswork but maybe because atexit's frame happens to be there and keep the memory live for tracking pointers?



More information about the llvm-commits mailing list