https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77963
--- Comment #2 from Pawel Sikora <pawel_sikora at zoho dot com> --- (In reply to Kostya Serebryany from comment #1) > lsan does not work with ptrace. > There is https://github.com/google/sanitizers/issues/728 for it. > We don't have plans to fix it, but the change I sent for review yesterday > causes lsan to complain loudly instead of producing false reports. this change clarify the situation with shiny message but doesn't help to much in the real development scenario. under gdb/strace session the process will terminate with exit code 1 and may breaks application flow due to unexpected exit code of the child process. in such case i need to setup manually for debug session the ASAN_OPTIONS=detect_leaks=0 to workaround the lsan die(). it would be better to omit the die() in such case (no ptrace-available).