Commit Graph

4 Commits

Author SHA1 Message Date
Kuba Mracek e4c1dd2c08 [tsan] Enable ignore_noninstrumented_modules=1 on Darwin by default
TSan recently got the "ignore_noninstrumented_modules" flag, which disables tracking of read and writes that come from noninstrumented modules (via interceptors). This is a way of suppressing false positives coming from system libraries and other noninstrumented code. This patch turns this on by default on Darwin, where it's supposed to replace the previous solution, "ignore_interceptors_accesses", which disables tracking in *all* interceptors. The new approach should re-enable TSan's ability to find races via interceptors on Darwin.

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

llvm-svn: 292981
2017-01-24 21:37:50 +00:00
Kuba Brecka aafb41ae47 [tsan] Fix Darwin tests (missing FileCheck's)
A little embarrassing, but we're missing the call to FileCheck in several Darwin tests. Let's fix this.

Differential Revision: http://reviews.llvm.org/D18503

llvm-svn: 265658
2016-04-07 11:31:02 +00:00
Kuba Brecka 428a9f95a4 [asan,tsan] Make Darwin-specific tests more stable (use ignore_interceptors_accesses=1 for GCD tests and printf instead of NSLog).
llvm-svn: 265300
2016-04-04 14:54:05 +00:00
Kuba Brecka 440d08600b [tsan] Implement basic GCD interceptors for OS X
We need to intercept libdispatch APIs (dispatch_sync, dispatch_async, etc.) to add synchronization between the code that submits the task and the code that gets executed (possibly on a different thread). This patch adds release+acquire semantics for dispatch_sync, and dispatch_async (plus their "_f" and barrier variants). The synchronization is done on malloc'd contexts (separate for each submitted block/callback). Added tests to show usage of dispatch_sync and dispatch_async, for cases where we expect no warnings and for cases where TSan finds races.

Differential Revision: http://reviews.llvm.org/D14745

llvm-svn: 253982
2015-11-24 13:36:06 +00:00