summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2014-04-11 15:38:03 +0000
committerDmitry Vyukov <dvyukov@google.com>2014-04-11 15:38:03 +0000
commitb5eb8f02125ad9c2a37f7d39558e04b85283129d (patch)
tree1548d880a41a106602c8bb5329892ac2a4ac2b89 /compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
parentfa1d56c31f09ac1bb1d69195c3f35dd06cada2d5 (diff)
downloadbcm5719-llvm-b5eb8f02125ad9c2a37f7d39558e04b85283129d.tar.gz
bcm5719-llvm-b5eb8f02125ad9c2a37f7d39558e04b85283129d.zip
tsan: fix vector clocks
the new optimizations break when thread ids gets reused (clocks go backwards) add the necessary tests as well llvm-svn: 206035
Diffstat (limited to 'compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc')
-rw-r--r--compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
index 5b07394f0eb..76800907290 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
@@ -85,8 +85,8 @@ void ThreadContext::OnStarted(void *arg) {
// from different threads.
epoch0 = RoundUp(epoch1 + 1, kTracePartSize);
epoch1 = (u64)-1;
- new(thr) ThreadState(ctx, tid, unique_id,
- epoch0, args->stk_addr, args->stk_size, args->tls_addr, args->tls_size);
+ new(thr) ThreadState(ctx, tid, unique_id, epoch0, reuse_count,
+ args->stk_addr, args->stk_size, args->tls_addr, args->tls_size);
#ifndef TSAN_GO
thr->shadow_stack = &ThreadTrace(thr->tid)->shadow_stack[0];
thr->shadow_stack_pos = thr->shadow_stack;
OpenPOWER on IntegriCloud