Skip to content

Commit df4c913

Browse files
authored
[asan] Print unique_id instead of tid (#111925)
Before the first reuse, after 2^32 threads they are equal.
1 parent e556f07 commit df4c913

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/asan/asan_descriptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ AsanThreadIdAndName::AsanThreadIdAndName(AsanThreadContext *t) {
2424
internal_snprintf(name, sizeof(name), "T-1");
2525
return;
2626
}
27-
int len = internal_snprintf(name, sizeof(name), "T%d", t->tid);
27+
int len = internal_snprintf(name, sizeof(name), "T%llu", t->unique_id);
2828
CHECK(((unsigned int)len) < sizeof(name));
2929
if (internal_strlen(t->name))
3030
internal_snprintf(&name[len], sizeof(name) - len, " (%s)", t->name);

0 commit comments

Comments
 (0)