Skip to content

Commit 672bc1f

Browse files
authored
Avoid a race condition in the output of other.test_pthread_lsan_no_leak (#21003)
To avoid the race, simply remove the logging from the pthread. There is really no purpose to it in the test, and there is the chance it will show up before or after LSan's output (which is the point of the test).
1 parent 955a87f commit 672bc1f

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

test/pthread/test_pthread_lsan_no_leak.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ void g(void) {
1313
void *stuff = malloc(3432);
1414
tls_ptr = malloc(1234);
1515
atomic_store(&thread_done, true);
16-
printf("thread done\n");
1716
while (1);
1817
}
1918

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
start
2-
thread done
32
LSAN TEST COMPLETE

0 commit comments

Comments
 (0)