[PATCH] D31449: [tsan] Don't report deadlocks when ignore_reads_and_writes > 0
Kuba (Brecka) Mracek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 18:53:34 PDT 2017
kubamracek created this revision.
kubamracek added a project: Sanitizers.
I'd like to expand the `ignore_noninstrumented_modules=1` flag to cover deadlock detection. We're seeing some false positives from system libraries where they guard the mutex acquisition via atomics (so the deadlock cannot happen). The general approach that I'd like to achieve with `ignore_noninstrumented_modules=1` is to only report bugs where we know they actually come from instrumented code, regardless of bug type (race, mutex problem, deadlock).
When running with `ignore_noninstrumented_modules=1`, we basically only call `ignore_reads_and_writes++` when we enter an interceptor from a non-instrumented module. This patch make sure we don't report deadlocks when `ignore_reads_and_writes > 0`. Adding a testcase that shows that deadlock detection still works on Darwin (to make sure we're not silencing too many reports).
Repository:
rL LLVM
https://reviews.llvm.org/D31449
Files:
lib/tsan/dd/dd_rtl.cc
lib/tsan/rtl/tsan_interceptors.cc
lib/tsan/rtl/tsan_mman.cc
lib/tsan/rtl/tsan_rtl.cc
lib/tsan/rtl/tsan_rtl.h
lib/tsan/rtl/tsan_rtl_mutex.cc
lib/tsan/rtl/tsan_rtl_report.cc
lib/tsan/rtl/tsan_rtl_thread.cc
test/tsan/Darwin/deadlock.mm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31449.93331.patch
Type: text/x-patch
Size: 7741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170329/f444914d/attachment-0001.bin>
More information about the llvm-commits
mailing list