[compiler-rt] r204154 - tsan: fix malloc/munmap mismatch

Dmitry Vyukov dvyukov at google.com
Tue Mar 18 07:28:17 PDT 2014


Author: dvyukov
Date: Tue Mar 18 09:28:17 2014
New Revision: 204154

URL: http://llvm.org/viewvc/llvm-project?rev=204154&view=rev
Log:
tsan: fix malloc/munmap mismatch


Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_deadlock_detector2.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_deadlock_detector2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_deadlock_detector2.cc?rev=204154&r1=204153&r2=204154&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_deadlock_detector2.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_deadlock_detector2.cc Tue Mar 18 09:28:17 2014
@@ -134,7 +134,7 @@ DDPhysicalThread* DD::CreatePhysicalThre
 
 void DD::DestroyPhysicalThread(DDPhysicalThread *pt) {
   pt->~DDPhysicalThread();
-  InternalFree(pt);
+  UnmapOrDie(pt, sizeof(DDPhysicalThread));
 }
 
 DDLogicalThread* DD::CreateLogicalThread(u64 ctx) {





More information about the llvm-commits mailing list