From cc510707af20f2dbcf0d6893c4a96c36072799be Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Mon, 1 Jul 2013 08:41:45 +0000 Subject: [PATCH] [ASan] Remove leading underscores from function names in output tests llvm-svn: 185315 --- .../lit_tests/TestCases/Linux/zero-base-shadow32.cc | 2 +- .../lit_tests/TestCases/Linux/zero-base-shadow64.cc | 2 +- .../lib/asan/lit_tests/TestCases/global-overflow.cc | 2 +- .../lib/asan/lit_tests/TestCases/heap-overflow.cc | 6 +++--- compiler-rt/lib/asan/lit_tests/TestCases/ioctl.cc | 2 +- .../lib/asan/lit_tests/TestCases/large_func_test.cc | 4 ++-- compiler-rt/lib/asan/lit_tests/TestCases/null_deref.cc | 2 +- .../lib/asan/lit_tests/TestCases/shared-lib-test.cc | 2 +- .../lib/asan/lit_tests/TestCases/stack-overflow.cc | 2 +- .../lib/asan/lit_tests/TestCases/strncpy-overflow.cc | 8 ++++---- .../asan/lit_tests/TestCases/use-after-free-right.cc | 10 +++++----- .../lib/asan/lit_tests/TestCases/use-after-free.cc | 10 +++++----- .../lit_tests/TestCases/use-after-scope-inlined.cc | 2 +- .../asan/lit_tests/TestCases/use-after-scope-temp.cc | 2 +- .../lib/asan/lit_tests/TestCases/use-after-scope.cc | 2 +- compiler-rt/lib/asan/lit_tests/TestCases/wait.cc | 4 ++-- 16 files changed, 31 insertions(+), 31 deletions(-) diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow32.cc b/compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow32.cc index 5ef087b1db91..c2fe5344e646 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow32.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow32.cc @@ -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 diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow64.cc b/compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow64.cc index a726b4494960..12113d52280f 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow64.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/Linux/zero-base-shadow64.cc @@ -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 diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/global-overflow.cc b/compiler-rt/lib/asan/lit_tests/TestCases/global-overflow.cc index 5b75efaf65b1..7e7a0410883b 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/global-overflow.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/global-overflow.cc @@ -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]; diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/heap-overflow.cc b/compiler-rt/lib/asan/lit_tests/TestCases/heap-overflow.cc index 05aad02c1782..a5f68e26ff6c 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/heap-overflow.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/heap-overflow.cc @@ -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; } diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/ioctl.cc b/compiler-rt/lib/asan/lit_tests/TestCases/ioctl.cc index 46f344faf4ac..9a4a385e34a7 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/ioctl.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/ioctl.cc @@ -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; diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/large_func_test.cc b/compiler-rt/lib/asan/lit_tests/TestCases/large_func_test.cc index 201f5d5f9c48..5010950aaf7d 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/large_func_test.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/large_func_test.cc @@ -45,11 +45,11 @@ static void LargeFunction(int *x, int zero) { 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; } diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/null_deref.cc b/compiler-rt/lib/asan/lit_tests/TestCases/null_deref.cc index 4d501c611e66..45296169fc68 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/null_deref.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/null_deref.cc @@ -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]] } diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/shared-lib-test.cc b/compiler-rt/lib/asan/lit_tests/TestCases/shared-lib-test.cc index c8fd0a8188eb..e025e6f8429c 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/shared-lib-test.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/shared-lib-test.cc @@ -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; } diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/stack-overflow.cc b/compiler-rt/lib/asan/lit_tests/TestCases/stack-overflow.cc index f91b391a7f86..85695350387c 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/stack-overflow.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/stack-overflow.cc @@ -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; diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/strncpy-overflow.cc b/compiler-rt/lib/asan/lit_tests/TestCases/strncpy-overflow.cc index 54eabe13234c..2b5f5b7cdd79 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/strncpy-overflow.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/strncpy-overflow.cc @@ -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]; } diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/use-after-free-right.cc b/compiler-rt/lib/asan/lit_tests/TestCases/use-after-free-right.cc index 37132a622980..ceb7a1951fbf 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/use-after-free-right.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/use-after-free-right.cc @@ -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}} } diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/use-after-free.cc b/compiler-rt/lib/asan/lit_tests/TestCases/use-after-free.cc index 5322cb628ac4..cad2819944b5 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/use-after-free.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/use-after-free.cc @@ -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}} } diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope-inlined.cc b/compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope-inlined.cc index 100c26249ba7..4e830d891d64 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope-inlined.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope-inlined.cc @@ -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 diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope-temp.cc b/compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope-temp.cc index 1bb309b23925..13d714f9def7 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope-temp.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope-temp.cc @@ -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; } diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope.cc b/compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope.cc index f45c2627abf0..e8bb302486bb 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/use-after-scope.cc @@ -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' } diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/wait.cc b/compiler-rt/lib/asan/lit_tests/TestCases/wait.cc index ff87a2df73df..7095b3757563 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/wait.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/wait.cc @@ -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 -- 2.34.1