[compiler-rt] r185315 - [ASan] Remove leading underscores from function names in output tests

Alexey Samsonov samsonov at google.com
Mon Jul 1 01:41:45 PDT 2013


Author: samsonov
Date: Mon Jul  1 03:41:45 2013
New Revision: 185315

URL: http://llvm.org/viewvc/llvm-project?rev=185315&view=rev
Log:
[ASan] Remove leading underscores from function names in output tests

Modified:
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow32.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow64.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/global-overflow.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/heap-overflow.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/ioctl.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/large_func_test.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/null_deref.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/shared-lib-test.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-overflow.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/strncpy-overflow.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-free-right.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-free.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope-inlined.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope-temp.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope.cc
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/wait.cc

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow32.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow32.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow32.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow32.cc Mon Jul  1 03:41:45 2013
@@ -14,7 +14,7 @@ int main(int argc, char **argv) {
   memset(x, 0, 10);
   int res = x[argc * 10];  // BOOOM
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in _?main .*zero-base-shadow32.cc:}}[[@LINE-2]]
+  // CHECK: {{    #0 0x.* in main .*zero-base-shadow32.cc:}}[[@LINE-2]]
   // CHECK: {{Address 0x.* is .* frame}}
   // CHECK: main
 

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow64.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow64.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow64.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow64.cc Mon Jul  1 03:41:45 2013
@@ -14,7 +14,7 @@ int main(int argc, char **argv) {
   memset(x, 0, 10);
   int res = x[argc * 10];  // BOOOM
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in _?main .*zero-base-shadow64.cc:}}[[@LINE-2]]
+  // CHECK: {{    #0 0x.* in main .*zero-base-shadow64.cc:}}[[@LINE-2]]
   // CHECK: {{Address 0x.* is .* frame}}
   // CHECK: main
 

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/global-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/global-overflow.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/global-overflow.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/global-overflow.cc Mon Jul  1 03:41:45 2013
@@ -13,7 +13,7 @@ int main(int argc, char **argv) {
   memset(ZZZ, 0, 10);
   int res = YYY[argc * 10];  // BOOOM
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in _?main .*global-overflow.cc:}}[[@LINE-2]]
+  // CHECK: {{    #0 0x.* in main .*global-overflow.cc:}}[[@LINE-2]]
   // CHECK: {{0x.* is located 0 bytes to the right of global variable}}
   // CHECK:   {{.*YYY.* of size 10}}
   res += XXX[argc] + ZZZ[argc];

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/heap-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/heap-overflow.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/heap-overflow.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/heap-overflow.cc Mon Jul  1 03:41:45 2013
@@ -14,15 +14,15 @@ int main(int argc, char **argv) {
   memset(x, 0, 10);
   int res = x[argc * 10];  // BOOOM
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in _?main .*heap-overflow.cc:}}[[@LINE-2]]
+  // CHECK: {{    #0 0x.* in main .*heap-overflow.cc:}}[[@LINE-2]]
   // CHECK: {{0x.* is located 0 bytes to the right of 10-byte region}}
   // CHECK: {{allocated by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*malloc}}
   // CHECK-Linux: {{    #1 0x.* in main .*heap-overflow.cc:13}}
 
-  // CHECK-Darwin: {{    #0 0x.* in _?wrap_malloc.*}}
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*heap-overflow.cc:13}}
+  // CHECK-Darwin: {{    #0 0x.* in wrap_malloc.*}}
+  // CHECK-Darwin: {{    #1 0x.* in main .*heap-overflow.cc:13}}
   free(x);
   return res;
 }

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/ioctl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/ioctl.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/ioctl.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/ioctl.cc Mon Jul  1 03:41:45 2013
@@ -17,7 +17,7 @@ int main(int argc, char **argv) {
   int res = ioctl(fd, FIONBIO, &nonblock + 1);
   // CHECK: AddressSanitizer: stack-buffer-overflow
   // CHECK: READ of size 4 at
-  // CHECK: {{#.* in _?main .*ioctl.cc:}}[[@LINE-3]]
+  // CHECK: {{#.* in main .*ioctl.cc:}}[[@LINE-3]]
   assert(res == 0);
   close(fd);
   return 0;

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/large_func_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/large_func_test.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/large_func_test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/large_func_test.cc Mon Jul  1 03:41:45 2013
@@ -45,11 +45,11 @@ static void LargeFunction(int *x, int ze
 int main(int argc, char **argv) {
   int *x = new int[100];
   LargeFunction(x, argc - 1);
-  // CHECK: {{    #1 0x.* in _?main .*large_func_test.cc:}}[[@LINE-1]]
+  // CHECK: {{    #1 0x.* in main .*large_func_test.cc:}}[[@LINE-1]]
   // CHECK: {{0x.* is located 12 bytes to the right of 400-byte region}}
   // CHECK: {{allocated by thread T0 here:}}
   // CHECK-Linux: {{    #0 0x.* in operator new.*}}
   // CHECK-Darwin: {{    #0 0x.* in .*_Zna.*}}
-  // CHECK: {{    #1 0x.* in _?main .*large_func_test.cc:}}[[@LINE-7]]
+  // CHECK: {{    #1 0x.* in main .*large_func_test.cc:}}[[@LINE-7]]
   delete x;
 }

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/null_deref.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/null_deref.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/null_deref.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/null_deref.cc Mon Jul  1 03:41:45 2013
@@ -19,5 +19,5 @@ static void NullDeref(int *ptr) {
 }
 int main() {
   NullDeref((int*)0);
-  // CHECK: {{    #1 0x.* in _?main.*null_deref.cc:}}[[@LINE-1]]
+  // CHECK: {{    #1 0x.* in main.*null_deref.cc:}}[[@LINE-1]]
 }

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/shared-lib-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/shared-lib-test.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/shared-lib-test.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/shared-lib-test.cc Mon Jul  1 03:41:45 2013
@@ -37,6 +37,6 @@ int main(int argc, char *argv[]) {
   // CHECK: {{.*ERROR: AddressSanitizer: global-buffer-overflow}}
   // CHECK: {{READ of size 4 at 0x.* thread T0}}
   // CHECK: {{    #0 0x.*}}
-  // CHECK: {{    #1 0x.* in _?main .*shared-lib-test.cc:}}[[@LINE-4]]
+  // CHECK: {{    #1 0x.* in main .*shared-lib-test.cc:}}[[@LINE-4]]
   return 0;
 }

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-overflow.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-overflow.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/stack-overflow.cc Mon Jul  1 03:41:45 2013
@@ -9,7 +9,7 @@ int main(int argc, char **argv) {
   memset(x, 0, 10);
   int res = x[argc * 10];  // BOOOM
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in _?main .*stack-overflow.cc:}}[[@LINE-2]]
+  // CHECK: {{    #0 0x.* in main .*stack-overflow.cc:}}[[@LINE-2]]
   // CHECK: {{Address 0x.* is located in stack of thread T0 at offset}}
   // CHECK-NEXT: in{{.*}}main{{.*}}stack-overflow.cc
   return res;

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/strncpy-overflow.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/strncpy-overflow.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/strncpy-overflow.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/strncpy-overflow.cc Mon Jul  1 03:41:45 2013
@@ -16,15 +16,15 @@ int main(int argc, char **argv) {
   strncpy(short_buffer, hello, 10);  // BOOM
   // CHECK: {{WRITE of size 10 at 0x.* thread T0}}
   // CHECK-Linux: {{    #0 0x.* in .*strncpy}}
-  // CHECK-Darwin: {{    #0 0x.* in _?wrap_strncpy}}
-  // CHECK: {{    #1 0x.* in _?main .*strncpy-overflow.cc:}}[[@LINE-4]]
+  // CHECK-Darwin: {{    #0 0x.* in wrap_strncpy}}
+  // CHECK: {{    #1 0x.* in main .*strncpy-overflow.cc:}}[[@LINE-4]]
   // CHECK: {{0x.* is located 0 bytes to the right of 9-byte region}}
   // CHECK: {{allocated by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*malloc}}
   // CHECK-Linux: {{    #1 0x.* in main .*strncpy-overflow.cc:}}[[@LINE-10]]
 
-  // CHECK-Darwin: {{    #0 0x.* in _?wrap_malloc.*}}
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*strncpy-overflow.cc:}}[[@LINE-13]]
+  // CHECK-Darwin: {{    #0 0x.* in wrap_malloc.*}}
+  // CHECK-Darwin: {{    #1 0x.* in main .*strncpy-overflow.cc:}}[[@LINE-13]]
   return short_buffer[8];
 }

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-free-right.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-free-right.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-free-right.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-free-right.cc Mon Jul  1 03:41:45 2013
@@ -18,21 +18,21 @@ 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.cc:17}}
+  // CHECK: {{    #0 0x.* in main .*use-after-free-right.cc:17}}
   // CHECK: {{0x.* is located 0 bytes inside of 1-byte region .0x.*,0x.*}}
   // CHECK: {{freed by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*free}}
   // CHECK-Linux: {{    #1 0x.* in main .*use-after-free-right.cc:16}}
 
-  // CHECK-Darwin: {{    #0 0x.* in _?wrap_free}}
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free-right.cc:16}}
+  // CHECK-Darwin: {{    #0 0x.* in wrap_free}}
+  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free-right.cc:16}}
 
   // CHECK: {{previously allocated by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*malloc}}
   // CHECK-Linux: {{    #1 0x.* in main .*use-after-free-right.cc:15}}
 
-  // CHECK-Darwin: {{    #0 0x.* in _?wrap_malloc.*}}
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free-right.cc:15}}
+  // CHECK-Darwin: {{    #0 0x.* in wrap_malloc.*}}
+  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free-right.cc:15}}
 }

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-free.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-free.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-free.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-free.cc Mon Jul  1 03:41:45 2013
@@ -15,21 +15,21 @@ int main() {
   // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
   // CHECK:   {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
   // CHECK: {{READ of size 1 at 0x.* thread T0}}
-  // CHECK: {{    #0 0x.* in _?main .*use-after-free.cc:14}}
+  // CHECK: {{    #0 0x.* in main .*use-after-free.cc:14}}
   // CHECK: {{0x.* is located 5 bytes inside of 10-byte region .0x.*,0x.*}}
   // CHECK: {{freed by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*free}}
   // CHECK-Linux: {{    #1 0x.* in main .*use-after-free.cc:13}}
 
-  // CHECK-Darwin: {{    #0 0x.* in _?wrap_free}}
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free.cc:13}}
+  // CHECK-Darwin: {{    #0 0x.* in wrap_free}}
+  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free.cc:13}}
 
   // CHECK: {{previously allocated by thread T0 here:}}
 
   // CHECK-Linux: {{    #0 0x.* in .*malloc}}
   // CHECK-Linux: {{    #1 0x.* in main .*use-after-free.cc:12}}
 
-  // CHECK-Darwin: {{    #0 0x.* in _?wrap_malloc.*}}
-  // CHECK-Darwin: {{    #1 0x.* in _?main .*use-after-free.cc:12}}
+  // CHECK-Darwin: {{    #0 0x.* in wrap_malloc.*}}
+  // CHECK-Darwin: {{    #1 0x.* in main .*use-after-free.cc:12}}
 }

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope-inlined.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope-inlined.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope-inlined.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope-inlined.cc Mon Jul  1 03:41:45 2013
@@ -18,7 +18,7 @@ int main(int argc, char *argv[]) {
   return arr[argc - 1];  // BOOM
   // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
   // CHECK: READ of size 4 at 0x{{.*}} thread T0
-  // CHECK:   #0 0x{{.*}} in {{_?}}main
+  // CHECK:   #0 0x{{.*}} in main
   // CHECK:      {{.*}}use-after-scope-inlined.cc:[[@LINE-4]]
   // CHECK: Address 0x{{.*}} is located in stack of thread T0 at offset
   // CHECK:      [[OFFSET:[^ ]*]] in frame

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope-temp.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope-temp.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope-temp.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope-temp.cc Mon Jul  1 03:41:45 2013
@@ -23,7 +23,7 @@ int main(int argc, char *argv[]) {
   save(IntHolder(10));
   int x = saved->val;  // BOOM
   // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #0 0x{{.*}} in {{_?}}main {{.*}}use-after-scope-temp.cc:[[@LINE-2]]
+  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope-temp.cc:[[@LINE-2]]
   printf("saved value: %d\n", x);
   return 0;
 }

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/use-after-scope.cc Mon Jul  1 03:41:45 2013
@@ -9,7 +9,7 @@ int main() {
   }
   return *p;  // BOOM
   // CHECK: ERROR: AddressSanitizer: stack-use-after-scope
-  // CHECK:  #0 0x{{.*}} in {{_?}}main {{.*}}use-after-scope.cc:[[@LINE-2]]
+  // CHECK:  #0 0x{{.*}} in main {{.*}}use-after-scope.cc:[[@LINE-2]]
   // CHECK: Address 0x{{.*}} is located in stack of thread T{{.*}} at offset [[OFFSET:[^ ]+]] in frame
   // {{\[}}[[OFFSET]], {{[0-9]+}}) 'x'
 }

Modified: compiler-rt/trunk/lib/asan/lit_tests/TestCases/wait.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/wait.cc?rev=185315&r1=185314&r2=185315&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/wait.cc (original)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/wait.cc Mon Jul  1 03:41:45 2013
@@ -53,9 +53,9 @@ int main(int argc, char **argv) {
     // CHECK: stack-buffer-overflow
     // CHECK: {{WRITE of size .* at 0x.* thread T0}}
     // CHECK: {{in .*wait}}
-    // CHECK: {{in _?main .*wait.cc:}}
+    // CHECK: {{in main .*wait.cc:}}
     // CHECK: is located in stack of thread T0 at offset
-    // CHECK: {{in _?main}}
+    // CHECK: {{in main}}
     return res != -1;
   }
   // child





More information about the llvm-commits mailing list