[Bug sanitizer/87840] LSAN misses self-refential shared_ptrs

jengelh at inai dot de gcc-bugzilla@gcc.gnu.org
Thu Nov 1 13:47:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87840

Jan Engelhardt <jengelh at inai dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #5 from Jan Engelhardt <jengelh at inai dot de> ---
Must have made a mistake somewhere in the g++9 invocation... so I just reran a
number of flag combinations to be sure, and now observe:

14:39 a4:~ > export ASAN_OPTIONS="verbose=111:leak_detect=1"
14:39 a4:~ > export LSAN_OPTIONS="$ASAN_OPTIONS"
14:39 a4:~ > g++-8 -ggdb3 -fsanitize=leak x.cpp; ./a.out
14:39 a4:~ > g++-8 -ggdb3 -fsanitize=address -fsanitize=leak x.cpp; ./a.out
[blah]
SUMMARY: AddressSanitizer: 32 byte(s) leaked in 1 allocation(s).
14:39 a4:~ > g++-9 -ggdb3 -fsanitize=leak x.cpp; ./a.out
[blah]
SUMMARY: LeakSanitizer: 32 byte(s) leaked in 1 allocation(s).

So it does work, if only the right flags are used.


More information about the Gcc-bugs mailing list