[PATCH] D18515: [tsan] Add support for dispatch event sources
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 5 01:04:38 PDT 2016
dvyukov accepted this revision.
dvyukov added a comment.
This revision is now accepted and ready to land.
LGTM with a nit
================
Comment at: lib/tsan/rtl/tsan_libdispatch_mac.cc:286
@@ +285,3 @@
+ dispatch_block_t new_handler = ^(void) {
+ SCOPED_INTERCEPTOR_RAW(dispatch_source_set_event_handler_callback);
+ Acquire(thr, pc, (uptr)source);
----------------
In the xpc-change you scoped handler outside of SCOPED_INTERCEPTOR scope as:
{
SCOPED_INTERCEPTOR_RAW(dispatch_source_set_event_handler_callback);
Acquire(thr, pc, (uptr)source);
}
handler();
Don't we need to do the same here?
We generally don't run user callbacks inside of interceptor scope.
================
Comment at: lib/tsan/rtl/tsan_libdispatch_mac.cc:307
@@ +306,3 @@
+ dispatch_block_t new_handler = ^(void) {
+ SCOPED_INTERCEPTOR_RAW(dispatch_source_set_cancel_handler_callback);
+ Acquire(thr, pc, (uptr)source);
----------------
same here
================
Comment at: lib/tsan/rtl/tsan_libdispatch_mac.cc:330
@@ +329,3 @@
+ dispatch_block_t new_handler = ^(void) {
+ SCOPED_INTERCEPTOR_RAW(dispatch_source_set_registration_handler_callback);
+ Acquire(thr, pc, (uptr)source);
----------------
same here
http://reviews.llvm.org/D18515
More information about the llvm-commits
mailing list