[compiler-rt] [asan] Make frame number checks more flexable (PR #94307)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 11:45:16 PDT 2024


================
@@ -15,13 +15,13 @@ int main() {
   // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
   // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
   // CHECK: {{WRITE of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in main .*use-after-free-right.cpp:}}[[@LINE-4]]
+  // CHECK: {{    #[0-9]+ 0x.* in main .*use-after-free-right.cpp:}}[[@LINE-4]]
   // CHECK: {{0x.* is located 0 bytes inside of 1-byte region .0x.*,0x.*}}
   // CHECK: {{freed by thread T0 here:}}
-  // CHECK: {{    #0 0x.* in .*free}}
-  // CHECK: {{    #[1-3] 0x.* in main .*use-after-free-right.cpp:}}[[@LINE-9]]
+  // CHECK: {{    #[0-9]+ 0x.* in .*free .*.cpp}}
----------------
dyung wrote:

We are also seeing a failure in this test due to a similar reason as the strcpy-overlap.cpp test:
```
#0 0x55e55ffaf717 in cfree.part.0 /home/jenkins/compiler-rt/lib/asan/asan_malloc_linux.cpp:52:3
```
Note the name `cfree.part.0` which does not have the expected space after it which your change is expecting.

https://github.com/llvm/llvm-project/pull/94307


More information about the llvm-commits mailing list