llvm-project/compiler-rt/lib/tsan/rtl
Kuba Mracek e7709560ea [tsan] Implement a 'ignore_noninstrumented_modules' flag to better suppress false positive races
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 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).

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

llvm-svn: 291631
2017-01-11 00:54:26 +00:00
..
tsan.syms.extra tsan: Introducing a function to flush the shadow memory from third-party libraries 2017-01-07 11:27:33 +00:00
tsan_clock.cc tsan: always define SANITIZER_GO 2016-10-28 20:14:18 +00:00
tsan_clock.h Revert "Apply modernize-use-default to compiler-rt." 2015-10-30 18:52:31 +00:00
tsan_debugging.cc [tsan] Implement __tsan_get_alloc_stack and __tsan_locate_address to query pointer types and allocation stacks of heap pointers 2016-12-19 17:52:20 +00:00
tsan_defs.h tsan: always define SANITIZER_GO 2016-10-28 20:14:18 +00:00
tsan_dense_alloc.h [TSan] Try harder to avoid compiler-generated memset calls. 2015-12-09 18:48:10 +00:00
tsan_fd.cc tsan: fix handling of dup2 2015-06-25 20:32:04 +00:00
tsan_fd.h tsan: fix handling of dup2 2015-06-25 20:32:04 +00:00
tsan_flags.cc tsan: always define SANITIZER_GO 2016-10-28 20:14:18 +00:00
tsan_flags.h [Sanitizer] Change the runtime flag representation. 2015-01-07 00:38:00 +00:00
tsan_flags.inc [tsan] Implement a 'ignore_noninstrumented_modules' flag to better suppress false positive races 2017-01-11 00:54:26 +00:00
tsan_ignoreset.cc tsan: better diagnostics if thread finishes with ignores enabled 2013-11-27 11:30:28 +00:00
tsan_ignoreset.h tsan: better diagnostics if thread finishes with ignores enabled 2013-11-27 11:30:28 +00:00
tsan_interceptors.cc [tsan] Implement a 'ignore_noninstrumented_modules' flag to better suppress false positive races 2017-01-11 00:54:26 +00:00
tsan_interceptors.h [tsan] Implement a 'ignore_noninstrumented_modules' flag to better suppress false positive races 2017-01-11 00:54:26 +00:00
tsan_interceptors_mac.cc [tsan] Add interceptor for libcxx __shared_count::__release_shared() 2016-12-15 16:45:28 +00:00
tsan_interface.cc tsan: Introducing a function to flush the shadow memory from third-party libraries 2017-01-07 11:27:33 +00:00
tsan_interface.h tsan: Introducing a function to flush the shadow memory from third-party libraries 2017-01-07 11:27:33 +00:00
tsan_interface_ann.cc tsan: speed up race deduplication 2015-09-03 11:20:46 +00:00
tsan_interface_ann.h
tsan_interface_atomic.cc tsan: more precise handling of atomic stores 2016-11-08 05:34:50 +00:00
tsan_interface_inl.h [tsan] Expose __tsan_ignore_thread_begin and __tsan_ignore_thread_end in TSan interface 2016-11-11 22:43:12 +00:00
tsan_interface_java.cc tsan: allow Java VM iterate over allocated objects 2016-12-14 18:20:18 +00:00
tsan_interface_java.h tsan: allow Java VM iterate over allocated objects 2016-12-14 18:20:18 +00:00
tsan_libdispatch_mac.cc [tsan] Add support for GCD dispatch_suspend and dispatch_resume 2016-11-24 21:24:54 +00:00
tsan_malloc_mac.cc [tsan] Switch to InternalAlloc everywhere __libc_malloc is currently used 2016-06-06 18:18:47 +00:00
tsan_md5.cc Fix -Wcast-qual warnings in sanitizers 2014-11-13 22:40:59 +00:00
tsan_mman.cc Release memory to OS only when the requested range covers the entire page 2016-11-30 20:41:59 +00:00
tsan_mman.h tsan: fix a crash 2016-05-06 19:35:22 +00:00
tsan_mutex.cc tsan: fix a crash 2016-05-06 19:35:22 +00:00
tsan_mutex.h tsan: fix a crash 2016-05-06 19:35:22 +00:00
tsan_mutexset.cc
tsan_mutexset.h tsan: always define SANITIZER_GO 2016-10-28 20:14:18 +00:00
tsan_new_delete.cc [tsan] Switch to InternalAlloc everywhere __libc_malloc is currently used 2016-06-06 18:18:47 +00:00
tsan_platform.h tsan: always define SANITIZER_GO 2016-10-28 20:14:18 +00:00
tsan_platform_linux.cc Release memory to OS only when the requested range covers the entire page 2016-11-30 20:41:59 +00:00
tsan_platform_mac.cc [tsan] Implement WriteMemoryProfile for Darwin 2016-10-31 20:17:13 +00:00
tsan_platform_posix.cc tsan: always define SANITIZER_GO 2016-10-28 20:14:18 +00:00
tsan_platform_windows.cc [tsan] Implement WriteMemoryProfile for Darwin 2016-10-31 20:17:13 +00:00
tsan_ppc_regs.h [PPC64, TSAN] Provide setjmp interceptor support for PPC64 2015-12-08 22:14:34 +00:00
tsan_preinit.cc Init tsan with .preinit_array section 2016-05-26 17:05:36 +00:00
tsan_report.cc [sanitizer] Add a 'print_module_map' flag which prints modules with UUIDs on Darwin 2017-01-06 20:57:47 +00:00
tsan_report.h [tsan] Rename ReportThread->pid to ReportThread->os_id 2016-04-21 14:49:25 +00:00
tsan_rtl.cc [sanitizer] Add a 'print_module_map' flag which prints modules with UUIDs on Darwin 2017-01-06 20:57:47 +00:00
tsan_rtl.h [tsan] Implement __tsan_get_alloc_stack and __tsan_locate_address to query pointer types and allocation stacks of heap pointers 2016-12-19 17:52:20 +00:00
tsan_rtl_aarch64.S tsan: Remove __pointer_chk_guard@GLIBC_PRIVATE requirement for AArch64 2016-08-10 21:39:28 +00:00
tsan_rtl_amd64.S [tsan] Fix signals and setjmp/longjmp on OS X 2015-11-30 14:11:02 +00:00
tsan_rtl_mips64.S [TSan][MIPS] Implements setjmp assembly for MIPS64 2016-08-16 05:06:56 +00:00
tsan_rtl_mutex.cc tsan: always define SANITIZER_GO 2016-10-28 20:14:18 +00:00
tsan_rtl_ppc64.S Avoid extended mnemonic 'mfvrsave' in assembly code 2015-12-09 15:18:30 +00:00
tsan_rtl_proc.cc tsan: always define SANITIZER_GO 2016-10-28 20:14:18 +00:00
tsan_rtl_report.cc tsan: always define SANITIZER_GO 2016-10-28 20:14:18 +00:00
tsan_rtl_thread.cc Release memory to OS only when the requested range covers the entire page 2016-11-30 20:41:59 +00:00
tsan_stack_trace.cc [TSan] Use StackTrace from sanitizer_common where applicable 2014-11-03 22:23:44 +00:00
tsan_stack_trace.h [TSan] Use StackTrace from sanitizer_common where applicable 2014-11-03 22:23:44 +00:00
tsan_stat.cc tsan: fix a crash 2016-05-06 19:35:22 +00:00
tsan_stat.h tsan: fix a crash 2016-05-06 19:35:22 +00:00
tsan_suppressions.cc tsan: always define SANITIZER_GO 2016-10-28 20:14:18 +00:00
tsan_suppressions.h tsan: implement suppressions for top frame only 2015-06-29 14:38:31 +00:00
tsan_symbolize.cc [TSan] Try harder to avoid compiler-generated memcpy calls. 2015-12-10 19:24:27 +00:00
tsan_symbolize.h tsan: don't print external PCs in reports 2015-06-24 13:04:12 +00:00
tsan_sync.cc tsan: always define SANITIZER_GO 2016-10-28 20:14:18 +00:00
tsan_sync.h tsan: Enable 48-bit VMA support on aarch64 2016-07-29 12:45:35 +00:00
tsan_trace.h tsan: always define SANITIZER_GO 2016-10-28 20:14:18 +00:00
tsan_update_shadow_word_inl.h tsan: fix a bug memory access handling 2015-04-28 18:08:42 +00:00
tsan_vector.h tsan: refactor storage of meta information for heap blocks and sync objects 2014-05-29 13:50:54 +00:00