[PATCH] [Tsan] Fix the signal_recursive.cc test to pass on systems with high loads
Dmitry Vyukov
dvyukov at google.com
Thu Dec 4 04:03:28 PST 2014
Does the following change fix the issue? With this change all tsan state is initialized when pthread_create returns as far as I see. It would be a much better fix.
Index: rtl/tsan_interceptors.cc
===================================================================
--- rtl/tsan_interceptors.cc (revision 222341)
+++ rtl/tsan_interceptors.cc (working copy)
@@ -882,8 +882,8 @@
ThreadIgnoreEnd(thr, 0);
while ((tid = atomic_load(&p->tid, memory_order_acquire)) == 0)
pthread_yield();
+ ThreadStart(thr, tid, GetTid());
atomic_store(&p->tid, 0, memory_order_release);
- ThreadStart(thr, tid, GetTid());
}
void *res = callback(param);
// Prevent the callback from being tail called,
http://reviews.llvm.org/D6504
More information about the llvm-commits
mailing list