[compiler-rt] [asan][test] Fix flake in asan_lsan_deadlock test (PR #141145)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 22 14:45:55 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Paul Kirth (ilovepi)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/141145.diff
1 Files Affected:
- (modified) compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp (+1-1)
``````````diff
diff --git a/compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp b/compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp
index b856b12325bf6..d9a6f4c07f698 100644
--- a/compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp
+++ b/compiler-rt/test/asan/TestCases/asan_lsan_deadlock.cpp
@@ -55,7 +55,7 @@ int main(int argc, char **argv) {
* 1. ASan's thread registry lock (B) during the reporting
* 2. dl_iterate_phdr lock (A) during symbolization
*/
- // CHECK: SUMMARY: AddressSanitizer: stack-buffer-overflow
+ // CHECK: AddressSanitizer: stack-buffer-overflow
arr[argc] = 1; // Deliberate OOB access
});
``````````
</details>
https://github.com/llvm/llvm-project/pull/141145
More information about the llvm-commits
mailing list