Adding an interceptor with two more release+acquire pairs to avoid false positives with dispatch_apply.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
| lib/tsan/rtl/tsan_libdispatch_mac.cc | ||
|---|---|---|
| 300 ↗ | (On Diff #52459) | Why do we need this around REAL(dispatch_apply)? |
| test/tsan/Darwin/gcd-apply-race.mm | ||
| 13 ↗ | (On Diff #52459) | 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 | ||
| 12 ↗ | (On Diff #52459) | same here |
| 24 ↗ | (On Diff #52459) | same here |
| lib/tsan/rtl/tsan_libdispatch_mac.cc | ||
|---|---|---|
| 300 ↗ | (On Diff #52459) | dispatch_apply can use the current thread (if it's part of queue) and call the callback on it. |