[PATCH] D28264: [tsan] Implement a 'ignore_noninstrumented_modules' flag to better suppress false positive races

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 16:34:22 PST 2017


kubabrecka created this revision.
kubabrecka added reviewers: dvyukov, zaks.anna, kcc.
kubabrecka added a subscriber: llvm-commits.
kubabrecka set the repository for this revision to rL LLVM.
kubabrecka added a project: Sanitizers.

On Darwin, we currently use 'ignore_interceptors_accesses', which is a heavy-weight solution that simply turns of race detection in all interceptors.  This was done to suppress false positives coming from system libraries (non-instrumented code), but it also silences a lot of real races.  This patch implements an alternative approach that should allow us to enable interceptors and report races coming from them, but only if they are called directly from instrumented code.

The patch requires https://reviews.llvm.org/D28263 and tracks instrumented code ranges, then simply matches the caller PC in each interceptors.  For non-instrumented code, we call `ThreadIgnoreBegin`.

The assumption here is that the number of instrumented modules is low.  Most likely there's only one (the instrumented main executable) and all the other modules are system libraries (non-instrumented).


Repository:
  rL LLVM

https://reviews.llvm.org/D28264

Files:
  lib/sanitizer_common/sanitizer_libignore.cc
  lib/sanitizer_common/sanitizer_libignore.h
  lib/tsan/rtl/tsan_flags.inc
  lib/tsan/rtl/tsan_interceptors.cc
  test/tsan/Darwin/ignore-noninstrumented.mm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28264.82973.patch
Type: text/x-patch
Size: 7564 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170104/7f0ffd1f/attachment.bin>


More information about the llvm-commits mailing list