Skip to content

Commit 699359c

Browse files
committed
merge check
1 parent 6ff41e8 commit 699359c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

compiler-rt/lib/asan/asan_descriptions.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,17 @@ void DescribeThread(AsanThreadContext *context) {
4545
}
4646
context->announced = true;
4747

48+
InternalScopedString str;
49+
str.AppendF("Thread %s", AsanThreadIdAndName(context).c_str());
50+
4851
AsanThreadContext *parent_context =
4952
context->parent_tid == kInvalidTid
5053
? nullptr
5154
: GetThreadContextByTidLocked(context->parent_tid);
5255

5356
// `context->parent_tid` may point to reused slot. Check `unique_id` which
5457
// is always smaller for the parent, always greater for a new user.
55-
if (context->unique_id <= parent_context->unique_id)
56-
parent_context = nullptr;
57-
58-
InternalScopedString str;
59-
str.AppendF("Thread %s", AsanThreadIdAndName(context).c_str());
60-
if (!parent_context) {
58+
if (!parent_context || context->unique_id <= parent_context->unique_id) {
6159
str.Append(" created by unknown thread\n");
6260
Printf("%s", str.data());
6361
return;

0 commit comments

Comments
 (0)