[compiler-rt] r204044 - [sanitizer] fix the deadlock detector build

Kostya Serebryany kcc at google.com
Mon Mar 17 08:16:26 PDT 2014


Author: kcc
Date: Mon Mar 17 10:16:25 2014
New Revision: 204044

URL: http://llvm.org/viewvc/llvm-project?rev=204044&view=rev
Log:
[sanitizer] fix the deadlock detector build

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_deadlock_detector2.cc
    compiler-rt/trunk/lib/tsan/dd/dd_rtl.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=204044&r1=204043&r2=204044&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_deadlock_detector2.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_deadlock_detector2.cc Mon Mar 17 10:16:25 2014
@@ -355,7 +355,7 @@ void DD::Report(DDPhysicalThread *pt, DD
     rep->loop[i].thr_ctx = link->tid;
     rep->loop[i].mtx_ctx0 = link0->id;
     rep->loop[i].mtx_ctx1 = link->id;
-    rep->loop[i].stk = link->stk;
+    rep->loop[i].stk[1] = link->stk;
   }
   pt->report_pending = true;
 }

Modified: compiler-rt/trunk/lib/tsan/dd/dd_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/dd/dd_rtl.cc?rev=204044&r1=204043&r2=204044&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/dd/dd_rtl.cc (original)
+++ compiler-rt/trunk/lib/tsan/dd/dd_rtl.cc Mon Mar 17 10:16:25 2014
@@ -44,7 +44,7 @@ static void ReportDeadlock(Thread *thr,
   for (int i = 0; i < rep->n; i++) {
     Printf("Thread %d locks mutex %llu while holding mutex %llu:\n",
       rep->loop[i].thr_ctx, rep->loop[i].mtx_ctx1, rep->loop[i].mtx_ctx0);
-    PrintStackTrace(thr, rep->loop[i].stk);
+    PrintStackTrace(thr, rep->loop[i].stk[1]);
   }
   Printf("==============================\n");
 }





More information about the llvm-commits mailing list