forked from OSchip/llvm-project
tsan: expect that Go symbolizer can return NULLs
llvm-svn: 160722
This commit is contained in:
parent
5062359502
commit
d654f06644
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue