[compiler-rt] 6840fc4 - [asan][tests] Handle FreeBSD in large_func_test and use-after-delete

Alex Richardson via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 10 03:18:26 PST 2021


Author: Alex Richardson
Date: 2021-03-10T11:17:33Z
New Revision: 6840fc4e7fa1c9b88c17ff0b684f1137125a96af

URL: https://github.com/llvm/llvm-project/commit/6840fc4e7fa1c9b88c17ff0b684f1137125a96af
DIFF: https://github.com/llvm/llvm-project/commit/6840fc4e7fa1c9b88c17ff0b684f1137125a96af.diff

LOG: [asan][tests] Handle FreeBSD in large_func_test and use-after-delete

This is the same fix as ab8a46024157b4d042ea6325710bbccd598adcfc for
Solaris and 23cd8d51ad519261137a40a5bbac6e537ee7ba25 (Windows+Darwin).

Added: 
    

Modified: 
    compiler-rt/test/asan/TestCases/large_func_test.cpp
    compiler-rt/test/asan/TestCases/use-after-delete.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/asan/TestCases/large_func_test.cpp b/compiler-rt/test/asan/TestCases/large_func_test.cpp
index 9c8e28b9ebef..6ab76d960626 100644
--- a/compiler-rt/test/asan/TestCases/large_func_test.cpp
+++ b/compiler-rt/test/asan/TestCases/large_func_test.cpp
@@ -27,7 +27,8 @@ static void LargeFunction(int *x, int zero) {
   // CHECK-Linux:  {{#0 0x.* in LargeFunction.*large_func_test.cpp:}}[[@LINE-3]]
   // CHECK-SunOS:  {{#0 0x.* in LargeFunction.*large_func_test.cpp:}}[[@LINE-4]]
   // CHECK-Windows:{{#0 0x.* in LargeFunction.*large_func_test.cpp:}}[[@LINE-5]]
-  // CHECK-Darwin: {{#0 0x.* in .*LargeFunction.*large_func_test.cpp}}:[[@LINE-6]]
+  // CHECK-FreeBSD:{{#0 0x.* in LargeFunction.*large_func_test.cpp:}}[[@LINE-6]]
+  // CHECK-Darwin: {{#0 0x.* in .*LargeFunction.*large_func_test.cpp}}:[[@LINE-7]]
 
   x[10]++;
   x[11]++;
@@ -50,7 +51,8 @@ int main(int argc, char **argv) {
   // CHECK-Linux:  {{    #0 0x.* in operator new}}
   // CHECK-SunOS:  {{    #0 0x.* in operator new}}
   // CHECK-Windows:{{    #0 0x.* in operator new}}
+  // CHECK-FreeBSD:{{    #0 0x.* in operator new}}
   // CHECK-Darwin: {{    #0 0x.* in .*_Zna}}
-  // CHECK: {{    #1 0x.* in main .*large_func_test.cpp:}}[[@LINE-9]]
+  // CHECK-NEXT:   {{    #1 0x.* in main .*large_func_test.cpp:}}[[@LINE-10]]
   delete[] x;
 }

diff  --git a/compiler-rt/test/asan/TestCases/use-after-delete.cpp b/compiler-rt/test/asan/TestCases/use-after-delete.cpp
index 14b14256c1df..4d0c055368bb 100644
--- a/compiler-rt/test/asan/TestCases/use-after-delete.cpp
+++ b/compiler-rt/test/asan/TestCases/use-after-delete.cpp
@@ -19,15 +19,17 @@ int main() {
   // CHECK-Linux:  {{    #0 0x.* in operator delete\[\]}}
   // CHECK-SunOS:  {{    #0 0x.* in operator delete\[\]}}
   // CHECK-Windows:{{    #0 0x.* in operator delete\[\]}}
+  // CHECK-FreeBSD:{{    #0 0x.* in operator delete\[\]}}
   // CHECK-Darwin: {{    #0 0x.* in .*_Zda}}
-  // CHECK: {{    #1 0x.* in main .*use-after-delete.cpp:}}[[@LINE-13]]
+  // CHECK-NEXT:   {{    #1 0x.* in main .*use-after-delete.cpp:}}[[@LINE-14]]
 
   // CHECK: {{previously allocated by thread T0 here:}}
   // CHECK-Linux:  {{    #0 0x.* in operator new\[\]}}
   // CHECK-SunOS:  {{    #0 0x.* in operator new\[\]}}
   // CHECK-Windows:{{    #0 0x.* in operator new\[\]}}
+  // CHECK-FreeBSD:{{    #0 0x.* in operator new\[\]}}
   // CHECK-Darwin: {{    #0 0x.* in .*_Zna}}
-  // CHECK:        {{    #1 0x.* in main .*use-after-delete.cpp:}}[[@LINE-21]]
+  // CHECK-NEXT:   {{    #1 0x.* in main .*use-after-delete.cpp:}}[[@LINE-23]]
 
 
   // CHECK: Shadow byte legend (one shadow byte represents {{[0-9]+}} application bytes):


        


More information about the llvm-commits mailing list