Adding an interceptor with two more release+acquire pairs to avoid false positives with dispatch_apply.
Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/tsan/rtl/tsan_libdispatch_mac.cc | ||
---|---|---|
300 | Why do we need this around REAL(dispatch_apply)? | |
test/tsan/Darwin/gcd-apply-race.mm | ||
14 | Please use the barrier functionality from test.h. The sleep will make the test run for at least a second. int main(...) { barrier_init(&barrier, 2); ... dispatch_apply(2, q, ^(size_t i) { global = i; barrier_wait(&barrier); } } | |
test/tsan/Darwin/gcd-apply.mm | ||
13 | same here | |
25 | same here |
lib/tsan/rtl/tsan_libdispatch_mac.cc | ||
---|---|---|
300 | dispatch_apply can use the current thread (if it's part of queue) and call the callback on it. |
Why do we need this around REAL(dispatch_apply)?