[PATCH] D15048: [tsan] Add dispatch_group API interceptors and synchronization
Dmitry Vyukov via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 06:43:35 PST 2015
dvyukov added inline comments.
================
Comment at: lib/tsan/rtl/tsan_libdispatch_mac.cc:72
@@ +71,3 @@
+ tsan_block_context_t *new_context = AllocContext( \
+ thr, pc, q, heap_block, &invoke_and_release_block, (uptr)new_context); \
+ Release(thr, pc, (uptr)new_context); \
----------------
Is it compiled without warnings?
You use new_context within its own initialization statement. It is not yet initialized when you read it.
================
Comment at: test/tsan/Darwin/gcd-groups-norace.mm:21
@@ +20,3 @@
+ });
+ dispatch_group_wait(g, DISPATCH_TIME_FOREVER);
+
----------------
assign to global after this statement
http://reviews.llvm.org/D15048
More information about the llvm-commits
mailing list