summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc')
-rw-r--r--compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
index c13e6edf40d..a74c85a632c 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc
@@ -92,6 +92,7 @@ int ThreadCreate(ThreadState *thr, uptr pc, uptr uid, bool detached) {
CHECK_EQ(tctx->status, ThreadStatusDead);
tctx->status = ThreadStatusInvalid;
tctx->reuse_count++;
+ tctx->sync.Reset();
tid = tctx->tid;
DestroyAndFree(tctx->dead_info);
} else {
@@ -214,7 +215,7 @@ void ThreadFinish(ThreadState *thr) {
tctx->dead_info->trace.headers[i].stack0.CopyFrom(
thr->trace.headers[i].stack0);
}
- tctx->epoch1 = thr->clock.get(tctx->tid);
+ tctx->epoch1 = thr->fast_state.epoch();
thr->~ThreadState();
StatAggregate(ctx->stat, thr->stat);
OpenPOWER on IntegriCloud