[PATCH] D15419: [tsan] Fix scoping of ScopedInteceptor in libdispatch support

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 07:09:49 PST 2015


kubabrecka created this revision.
kubabrecka added reviewers: dvyukov, samsonov, glider, kcc.
kubabrecka added subscribers: llvm-commits, zaks.anna.

Some interceptors in tsan_libdispatch_mac.cc currently wrongly use TSAN_SCOPED_INTERCEPTOR/ScopedInterceptor.  Its constructor can start ignoring memory accesses, and the destructor the stops this -- however, e.g. dispatch_sync can call user's code, so the ignoring will extend to user's code as well.  This is not expected and we should only limit the scope of ScopedInterceptor to TSan code.

http://reviews.llvm.org/D15419

Files:
  lib/tsan/rtl/tsan_interceptors.h
  lib/tsan/rtl/tsan_libdispatch_mac.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15419.42429.patch
Type: text/x-patch
Size: 6860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151210/b1cff3d0/attachment.bin>


More information about the llvm-commits mailing list