-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[asan][test] Attempt to fix suppressions-alloc-dealloc-mismatch.cpp on Darwin #124987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[asan][test] Attempt to fix suppressions-alloc-dealloc-mismatch.cpp on Darwin #124987
Conversation
…n Darwin Add %env_asan_opts=alloc_dealloc_mismatch=1 since it is disabled by default. rdar://143830493
@llvm/pr-subscribers-compiler-rt-sanitizer Author: Ben Langmuir (benlangmuir) ChangesAdd %env_asan_opts=alloc_dealloc_mismatch=1 since it is disabled by default. rdar://143830493 Full diff: https://github.com/llvm/llvm-project/pull/124987.diff 1 Files Affected:
diff --git a/compiler-rt/test/asan/TestCases/suppressions-alloc-dealloc-mismatch.cpp b/compiler-rt/test/asan/TestCases/suppressions-alloc-dealloc-mismatch.cpp
index fe88a5d0c9bf15a..df6df6aa9547111 100644
--- a/compiler-rt/test/asan/TestCases/suppressions-alloc-dealloc-mismatch.cpp
+++ b/compiler-rt/test/asan/TestCases/suppressions-alloc-dealloc-mismatch.cpp
@@ -1,10 +1,10 @@
// Check that without suppressions, we catch the issue.
// RUN: %clangxx_asan -O0 %s -o %t
-// RUN: not %run %t 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s
+// RUN: %env_asan_opts=alloc_dealloc_mismatch=1 not %run %t 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s
// RUN: echo "alloc_dealloc_mismatch:function" > %t.supp
-// RUN: %clangxx_asan -O0 %s -o %t && %env_asan_opts=suppressions='"%t.supp"' %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
-// RUN: %clangxx_asan -O3 %s -o %t && %env_asan_opts=suppressions='"%t.supp"' %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
+// RUN: %clangxx_asan -O0 %s -o %t && %env_asan_opts=alloc_dealloc_mismatch=1:suppressions='"%t.supp"' %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
+// RUN: %clangxx_asan -O3 %s -o %t && %env_asan_opts=alloc_dealloc_mismatch=1:suppressions='"%t.supp"' %run %t 2>&1 | FileCheck --check-prefix=CHECK-IGNORE %s
#include <stdio.h>
#include <stdlib.h>
|
Thanks, |
Exactly as defined:
|
It looks like this fixed Windows, but not Darwin The new failure looks like the suppression mechanism is failing in the -O3 case
|
Ah, I see in compiler-rt/test/asan/TestCases/suppressions-function.cpp:
So it seems this is a known issue with suppressions in optimized builds. I'll apply the same thing here unless you have a better idea. Edit: done in 4985804 |
Can we get this change cherry-picked to the release branch? We are seeing the Windows ASAN failures on our internal bot that is building the release branch. |
/pull-request #125583 |
…n Darwin (llvm#124987) Add %env_asan_opts=alloc_dealloc_mismatch=1 since it is disabled by default. rdar://143830493 (cherry picked from commit f0d05b0)
…ilds (llvm#125871) Including llvm#124987, we have failures on Windows on x86 with `/O2` builds, similar to Darwin. This disables the test for MSVC-x86.
Add %env_asan_opts=alloc_dealloc_mismatch=1 since it is disabled by default.
rdar://143830493