[llvm-commits] [compiler-rt] r168423 - /compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc

Dmitry Vyukov dvyukov at google.com
Wed Nov 21 03:44:21 PST 2012


Author: dvyukov
Date: Wed Nov 21 05:44:20 2012
New Revision: 168423

URL: http://llvm.org/viewvc/llvm-project?rev=168423&view=rev
Log:
tsan: explictly say when we fail to restore a stack trace

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

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc?rev=168423&r1=168422&r2=168423&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_report.cc Wed Nov 21 05:44:20 2012
@@ -50,6 +50,10 @@
 }
 
 void PrintStack(const ReportStack *ent) {
+  if (ent == 0) {
+    Printf("    [failed to restore the stack]\n");
+    return;
+  }
   for (int i = 0; ent; ent = ent->next, i++) {
     Printf("    #%d %s %s:%d", i, ent->func, ent->file, ent->line);
     if (ent->col)





More information about the llvm-commits mailing list