diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2015-12-08 17:54:47 +0000 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2015-12-08 17:54:47 +0000 |
| commit | eee690b29a437af100e24fb9589c39786227baa9 (patch) | |
| tree | d8c7fb798ba603dc27d138213008906bfb3ef6f7 /compiler-rt/test/tsan/load_shared_lib.cc | |
| parent | d0edbdfad1d34af385e78234e3b3c0375aa6514f (diff) | |
| download | bcm5719-llvm-eee690b29a437af100e24fb9589c39786227baa9.tar.gz bcm5719-llvm-eee690b29a437af100e24fb9589c39786227baa9.zip | |
tsan: fix test invisible barrier
Another attempt at fixing tsan_invisible_barrier.
Current implementation causes:
https://llvm.org/bugs/show_bug.cgi?id=25643
There were several unsuccessful iterations for this functionality:
Initially it was implemented in user code using REAL(pthread_barrier_wait). But pthread_barrier_wait is not supported on MacOS. Futexes are linux-specific for this matter.
Then we switched to atomics+usleep(10). But usleep produced parasitic "as-if synchronized via sleep" messages in reports which failed some output tests.
Then we switched to atomics+sched_yield. But this produced tons of tsan- visible events, which lead to "failed to restore stack trace" failures.
Move implementation into runtime and use internal_sched_yield in the wait loop.
This way tsan should see no events from the barrier, so not trace overflows and
no "as-if synchronized via sleep" messages.
llvm-svn: 255030
Diffstat (limited to 'compiler-rt/test/tsan/load_shared_lib.cc')
| -rw-r--r-- | compiler-rt/test/tsan/load_shared_lib.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/test/tsan/load_shared_lib.cc b/compiler-rt/test/tsan/load_shared_lib.cc index b7934b82df7..f02280895f8 100644 --- a/compiler-rt/test/tsan/load_shared_lib.cc +++ b/compiler-rt/test/tsan/load_shared_lib.cc @@ -3,7 +3,7 @@ // symbolized correctly. // RUN: %clangxx_tsan -O1 %s -DBUILD_SO -fPIC -shared -o %t-so.so -// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s +// RUN: %clangxx_tsan -O1 %s -o %t -rdynamic && %deflake %run %t | FileCheck %s #ifdef BUILD_SO |

