forked from OSchip/llvm-project
tsan: improve Go report format + fix build
llvm-svn: 162042
This commit is contained in:
parent
a60c5ad819
commit
9f143c5c5f
|
@ -137,6 +137,7 @@ static void PrintStack(const ReportStack *ent) {
|
|||
TsanPrintf(" %s()\n %s:%d +0x%zx\n",
|
||||
ent->func, ent->file, ent->line, (void*)ent->offset);
|
||||
}
|
||||
TsanPrintf("\n");
|
||||
}
|
||||
|
||||
static void PrintMop(const ReportMop *mop, bool first) {
|
||||
|
@ -157,7 +158,7 @@ static void PrintThread(const ReportThread *rt) {
|
|||
|
||||
void PrintReport(const ReportDesc *rep) {
|
||||
TsanPrintf("==================\n");
|
||||
TsanPrintf("WARNING: DATA RACE at %p\n", (void*)rep->mops[0]->addr);
|
||||
TsanPrintf("WARNING: DATA RACE\n");
|
||||
for (uptr i = 0; i < rep->mops.Size(); i++)
|
||||
PrintMop(rep->mops[i], i == 0);
|
||||
for (uptr i = 0; i < rep->threads.Size(); i++)
|
||||
|
|
|
@ -164,7 +164,9 @@ void Initialize(ThreadState *thr) {
|
|||
return;
|
||||
is_initialized = true;
|
||||
ScopedInRtl in_rtl;
|
||||
#ifndef TSAN_GO
|
||||
InitializeAllocator();
|
||||
#endif
|
||||
InitializeInterceptors();
|
||||
const char *env = InitializePlatform();
|
||||
InitializeMutex();
|
||||
|
|
|
@ -238,7 +238,9 @@ void ThreadFinish(ThreadState *thr) {
|
|||
}
|
||||
tctx->epoch1 = thr->fast_state.epoch();
|
||||
|
||||
#ifndef TSAN_GO
|
||||
AlloctorThreadFinish(thr);
|
||||
#endif
|
||||
thr->~ThreadState();
|
||||
StatAggregate(ctx->stat, thr->stat);
|
||||
tctx->thr = 0;
|
||||
|
|
Loading…
Reference in New Issue