[tsan] Don't report bugs from interceptors called from libignored modules
authorKuba Mracek <mracek@apple.com>
Fri, 21 Apr 2017 16:44:27 +0000 (16:44 +0000)
committerKuba Mracek <mracek@apple.com>
Fri, 21 Apr 2017 16:44:27 +0000 (16:44 +0000)
commit894da663203c2cb28a54cb0b6ffdf380792e6057
treed20e296bd9d62284706dcf5ad113d61ddcba95b6
parent72f31a8381d023a765b3c4ba96da217cdd233ba9
[tsan] Don't report bugs from interceptors called from libignored modules

This patch make sure we don't report deadlocks and other bug types when we're inside an interceptor that was called from a noninstrumented module (when ignore_noninstrumented_modules=1 is set). Adding a testcase that shows that deadlock detection still works on Darwin (to make sure we're not silencing too many reports).

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

llvm-svn: 300998
compiler-rt/lib/tsan/rtl/tsan_interceptors.cc
compiler-rt/lib/tsan/rtl/tsan_rtl.h
compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc
compiler-rt/test/tsan/Darwin/deadlock.mm [new file with mode: 0644]