Skip to content

Commit

Permalink
[asan] Print unique_id instead of tid (#111925)
Browse files Browse the repository at this point in the history
Before the first reuse, after 2^32 threads
they are equal.
  • Loading branch information
vitalybuka authored Oct 11, 2024
1 parent e556f07 commit df4c913
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler-rt/lib/asan/asan_descriptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ AsanThreadIdAndName::AsanThreadIdAndName(AsanThreadContext *t) {
internal_snprintf(name, sizeof(name), "T-1");
return;
}
int len = internal_snprintf(name, sizeof(name), "T%d", t->tid);
int len = internal_snprintf(name, sizeof(name), "T%llu", t->unique_id);
CHECK(((unsigned int)len) < sizeof(name));
if (internal_strlen(t->name))
internal_snprintf(&name[len], sizeof(name) - len, " (%s)", t->name);
Expand Down

0 comments on commit df4c913

Please sign in to comment.