tsan: expect that Go symbolizer can return NULLs

llvm-svn: 160722
This commit is contained in:
Dmitry Vyukov 2012-07-25 11:50:37 +00:00
parent 5062359502
commit d654f06644
1 changed files with 4 additions and 4 deletions

View File

@ -43,12 +43,12 @@ extern "C" void free(void *p);
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);