[compiler-rt] r177387 - tsan: fix memory leak

Dmitry Vyukov dvyukov at google.com
Tue Mar 19 03:22:34 PDT 2013


Author: dvyukov
Date: Tue Mar 19 05:22:33 2013
New Revision: 177387

URL: http://llvm.org/viewvc/llvm-project?rev=177387&view=rev
Log:
tsan: fix memory leak


Modified:
    compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc?rev=177387&r1=177386&r2=177387&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc Tue Mar 19 05:22:33 2013
@@ -44,6 +44,7 @@ void ThreadContext::OnJoined(void *arg)
   ThreadState *caller_thr = static_cast<ThreadState *>(arg);
   caller_thr->clock.acquire(&sync);
   StatInc(caller_thr, StatSyncAcquire);
+  sync.Reset();
 }
 
 struct OnCreatedArgs {





More information about the llvm-commits mailing list