[PATCH] D14745: [tsan] Implement basic GCD interceptors for OS X

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 22 11:30:11 PST 2015


kubabrecka updated this revision to Diff 40879.
kubabrecka added a comment.

Simplifying this patch to only add interceptors for dispatch_sync and dispatch_async (and their _f and _barrier variants).  Added more tests to show usage of dispatch_sync and dispatch_async, for cases where we expect no warnings and for cases where TSan finds races.

This patch doesn't need any suppressions (which was a bad idea and didn't work, you were right).  The synchronization is now done on malloc'd contexts (separate for each submitted block/callback).


http://reviews.llvm.org/D14745

Files:
  lib/tsan/rtl/tsan_libdispatch_mac.cc
  test/tsan/Darwin/gcd-async-norace.mm
  test/tsan/Darwin/gcd-async-race.mm
  test/tsan/Darwin/gcd-sync-norace.mm
  test/tsan/Darwin/gcd-sync-race.mm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14745.40879.patch
Type: text/x-patch
Size: 7641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151122/2ee63a01/attachment.bin>


More information about the llvm-commits mailing list