summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2012-11-21 11:44:20 +0000
committerDmitry Vyukov <dvyukov@google.com>2012-11-21 11:44:20 +0000
commitaeed45cde02a94d2db66a617588d63f778aa6026 (patch)
tree5dd1e48c79e6810f2767910f962e40aba6721bcb
parent3a3488e4e172461fa787afc170c4bf61ddaba98c (diff)
downloadbcm5719-llvm-aeed45cde02a94d2db66a617588d63f778aa6026.tar.gz
bcm5719-llvm-aeed45cde02a94d2db66a617588d63f778aa6026.zip
tsan: explictly say when we fail to restore a stack trace
llvm-svn: 168423
-rw-r--r--compiler-rt/lib/tsan/rtl/tsan_report.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_report.cc b/compiler-rt/lib/tsan/rtl/tsan_report.cc
index b3ed87e6960..21f1c1ee7e2 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_report.cc
+++ b/compiler-rt/lib/tsan/rtl/tsan_report.cc
@@ -50,6 +50,10 @@ static void PrintHeader(ReportType typ) {
}
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)
OpenPOWER on IntegriCloud