Skip to content

Commit 09b9d1e

Browse files
committed
[asan][test] Fix flake in asan_lsan_deadlock test
While the current test checks that a deadlock doesn't occur, it also assumes that lsan reporting happens at the end of the program as part of the summary. However, it sometimes happens that due to ordering the stack-buffer-overflow is reported differently. In these cases the error message will be prefixed with 'ERROR:' instead of 'SUMMARY:'. Since the verbiage of the reporting isn't the point of the test, we can relax the check slightly to avoid test flake due to non-determinism in the execution ordering of the program. Fixes #140646.
1 parent 97dee78 commit 09b9d1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int main(int argc, char **argv) {
5555
* 1. ASan's thread registry lock (B) during the reporting
5656
* 2. dl_iterate_phdr lock (A) during symbolization
5757
*/
58-
// CHECK: SUMMARY: AddressSanitizer: stack-buffer-overflow
58+
// CHECK: AddressSanitizer: stack-buffer-overflow
5959
arr[argc] = 1; // Deliberate OOB access
6060
});
6161

0 commit comments

Comments
 (0)