[llvm-commits] [compiler-rt] r160722 - /compiler-rt/trunk/lib/tsan/go/tsan_go.cc
Dmitry Vyukov
dvyukov at google.com
Wed Jul 25 04:50:38 PDT 2012
Author: dvyukov
Date: Wed Jul 25 06:50:37 2012
New Revision: 160722
URL: http://llvm.org/viewvc/llvm-project?rev=160722&view=rev
Log:
tsan: expect that Go symbolizer can return NULLs
Modified:
compiler-rt/trunk/lib/tsan/go/tsan_go.cc
Modified: compiler-rt/trunk/lib/tsan/go/tsan_go.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/go/tsan_go.cc?rev=160722&r1=160721&r2=160722&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/go/tsan_go.cc (original)
+++ compiler-rt/trunk/lib/tsan/go/tsan_go.cc Wed Jul 25 06:50:37 2012
@@ -43,12 +43,12 @@
ReportStack *SymbolizeCode(uptr addr) {
ReportStack *s = NewReportStackEntry(addr);
- char *func, *file;
- int line, off;
+ char *func = 0, *file = 0;
+ int line = 0, off = 0;
if (__tsan_symbolize(addr, &func, &file, &line, &off)) {
s->offset = off;
- s->func = internal_strdup(func);
- s->file = internal_strdup(file);
+ s->func = internal_strdup(func ? func : "??");
+ s->file = internal_strdup(file ? file : "-");
s->line = line;
s->col = 0;
free(func);
More information about the llvm-commits
mailing list