Make lsan complain loudly when running under ptrace
authorKostya Serebryany <kcc@google.com>
Thu, 13 Oct 2016 22:34:13 +0000 (22:34 +0000)
committerKostya Serebryany <kcc@google.com>
Thu, 13 Oct 2016 22:34:13 +0000 (22:34 +0000)
commit8633900e03a9f057e7207f8eca380741056756fd
treeda69bf96171b404a984430b09ca169c054dce470
parent98d0ea64ca26673fbedf9eaaf724d8cb174f1b6d
Make lsan complain loudly when running under ptrace

Summary:
LeakSanitizer does not work with ptrace but currently it
will print warnings (only under verbosity=1) and then proceed
to print tons of false reports.
This patch makes lsan fail hard under ptrace with a verbose message.

https://github.com/google/sanitizers/issues/728

Reviewers: eugenis, vitalybuka, aizatsky

Subscribers: kubabrecka, llvm-commits

Differential Revision: https://reviews.llvm.org/D25538

llvm-svn: 284171
compiler-rt/lib/lsan/lsan_common.cc
compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
compiler-rt/test/lsan/TestCases/strace_test.cc [new file with mode: 0644]