From c0120a3000f32c7721e5bed9d5441724b8b44e01 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 10 Aug 2015 22:43:04 +0000 Subject: [PATCH] [Windows] Relax test case patterns to allow parameter lists llvm-symbolizer will print parameter types. Split out from D11791. NFC llvm-svn: 244522 --- compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cc | 2 +- compiler-rt/test/asan/TestCases/Windows/demangled_names.cc | 8 ++++---- compiler-rt/test/asan/TestCases/Windows/dll_noreturn.cc | 8 ++++---- compiler-rt/test/asan/TestCases/Windows/dll_poison_unpoison.cc | 6 +++--- .../test/asan/TestCases/Windows/dll_stack_use_after_return.cc | 4 ++-- .../asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc | 8 ++++---- .../test/asan/TestCases/Windows/operator_delete_wrong_argument.cc | 2 +- compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cc | 2 +- compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cc | 2 +- compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cc | 4 ++-- .../test/asan/TestCases/Windows/queue_user_work_item_report.cc | 2 +- compiler-rt/test/asan/TestCases/Windows/stack_use_after_return.cc | 2 +- compiler-rt/test/asan/TestCases/Windows/symbols_path.cc | 2 +- .../test/asan/TestCases/Windows/thread_stack_array_left_oob.cc | 2 +- .../test/asan/TestCases/Windows/thread_stack_array_right_oob.cc | 2 +- 15 files changed, 28 insertions(+), 28 deletions(-) diff --git a/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cc b/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cc index f49d671..a1a2657 100644 --- a/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cc +++ b/compiler-rt/test/asan/TestCases/Windows/bitfield_uaf.cc @@ -14,7 +14,7 @@ void make_access(S *s) { s->bf2 = 2; // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]] // CHECK: READ of size {{[124]}} at [[ADDR]] -// CHECK: {{#0 .* make_access .*bitfield_uaf.cc}}:[[@LINE-3]] +// CHECK: {{#0 .* make_access.*bitfield_uaf.cc}}:[[@LINE-3]] // CHECK: {{#1 .* main}} } diff --git a/compiler-rt/test/asan/TestCases/Windows/demangled_names.cc b/compiler-rt/test/asan/TestCases/Windows/demangled_names.cc index a528555..0e5939e 100644 --- a/compiler-rt/test/asan/TestCases/Windows/demangled_names.cc +++ b/compiler-rt/test/asan/TestCases/Windows/demangled_names.cc @@ -43,8 +43,8 @@ int main() { free(buffer); A a(buffer); // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]] -// CHECK: foo::bar<42> {{.*}}demangled_names.cc -// CHECK: foo::spam {{.*}}demangled_names.cc -// CHECK: baz {{.*}}demangled_names.cc -// CHECK: A::~A {{.*}}demangled_names.cc +// CHECK: foo::bar<42>{{.*}}demangled_names.cc +// CHECK: foo::spam{{.*}}demangled_names.cc +// CHECK: baz{{.*}}demangled_names.cc +// CHECK: A::~A{{.*}}demangled_names.cc } diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_noreturn.cc b/compiler-rt/test/asan/TestCases/Windows/dll_noreturn.cc index 79f923e..8b5e3d0 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_noreturn.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_noreturn.cc @@ -11,12 +11,12 @@ void noreturn_f() { _exit(1); // CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 1 at [[ADDR]] thread T0 -// CHECK-NEXT: noreturn_f {{.*}}dll_noreturn.cc:[[@LINE-4]] -// CHECK-NEXT: test_function {{.*}}dll_noreturn.cc -// CHECK-NEXT: main {{.*}}dll_host.cc +// CHECK-NEXT: noreturn_f{{.*}}dll_noreturn.cc:[[@LINE-4]] +// CHECK-NEXT: test_function{{.*}}dll_noreturn.cc +// CHECK-NEXT: main{{.*}}dll_host.cc // // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame -// CHECK-NEXT: noreturn_f {{.*}}dll_noreturn.cc +// CHECK-NEXT: noreturn_f{{.*}}dll_noreturn.cc // CHECK: 'buffer' <== Memory access at offset [[OFFSET]] underflows this variable // CHECK-LABEL: SUMMARY } diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_poison_unpoison.cc b/compiler-rt/test/asan/TestCases/Windows/dll_poison_unpoison.cc index d486cb1..9b25a12 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_poison_unpoison.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_poison_unpoison.cc @@ -24,12 +24,12 @@ int test_function() { should_crash(&buffer[96]); // CHECK: AddressSanitizer: use-after-poison on address [[ADDR:0x[0-9a-f]+]] // CHECK-NEXT: WRITE of size 1 at [[ADDR]] thread T0 -// CHECK-NEXT: should_crash {{.*}}\dll_poison_unpoison.cc -// CHECK-NEXT: test_function {{.*}}\dll_poison_unpoison.cc:[[@LINE-4]] +// CHECK-NEXT: should_crash{{.*}}\dll_poison_unpoison.cc +// CHECK-NEXT: test_function{{.*}}\dll_poison_unpoison.cc:[[@LINE-4]] // CHECK-NEXT: main // // CHECK: [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame -// CHECK-NEXT: test_function {{.*}}\dll_poison_unpoison.cc +// CHECK-NEXT: test_function{{.*}}\dll_poison_unpoison.cc // CHECK: 'buffer' <== Memory access at offset [[OFFSET]] is inside this variable return 0; } diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_stack_use_after_return.cc b/compiler-rt/test/asan/TestCases/Windows/dll_stack_use_after_return.cc index 6cd74c2..615cc16 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_stack_use_after_return.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_stack_use_after_return.cc @@ -17,11 +17,11 @@ int test_function() { *x = 42; // CHECK: AddressSanitizer: stack-use-after-return // CHECK: WRITE of size 1 at [[ADDR:.*]] thread T0 -// CHECK-NEXT: test_function {{.*}}dll_stack_use_after_return.cc:[[@LINE-3]] +// CHECK-NEXT: test_function{{.*}}dll_stack_use_after_return.cc:[[@LINE-3]] // CHECK-NEXT: main // // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset [[OFFSET:.*]] in frame -// CHECK-NEXT: #0 {{.*}} foo {{.*}}dll_stack_use_after_return.cc +// CHECK-NEXT: #0 {{.*}} foo{{.*}}dll_stack_use_after_return.cc // CHECK: 'stack_buffer' <== Memory access at offset [[OFFSET]] is inside this variable return 0; } diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc index 04d3e2ec..dc7c7c6 100644 --- a/compiler-rt/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/dll_thread_stack_array_left_oob.cc @@ -11,10 +11,10 @@ DWORD WINAPI thread_proc(void *context) { stack_buffer[subscript] = 42; // CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 1 at [[ADDR]] thread T1 -// CHECK-NEXT: thread_proc {{.*}}dll_thread_stack_array_left_oob.cc:[[@LINE-3]] +// CHECK-NEXT: thread_proc{{.*}}dll_thread_stack_array_left_oob.cc:[[@LINE-3]] // // CHECK: Address [[ADDR]] is located in stack of thread T1 at offset [[OFFSET:.*]] in frame -// CHECK-NEXT: thread_proc {{.*}}dll_thread_stack_array_left_oob.cc +// CHECK-NEXT: thread_proc{{.*}}dll_thread_stack_array_left_oob.cc // // CHECK: 'stack_buffer' <== Memory access at offset [[OFFSET]] underflows this variable @@ -25,8 +25,8 @@ extern "C" __declspec(dllexport) int test_function() { HANDLE thr = CreateThread(NULL, 0, thread_proc, NULL, 0, NULL); // CHECK-LABEL: Thread T1 created by T0 here: -// CHECK: test_function {{.*}}dll_thread_stack_array_left_oob.cc:[[@LINE-2]] -// CHECK-NEXT: main {{.*}}dll_host.cc +// CHECK: test_function{{.*}}dll_thread_stack_array_left_oob.cc:[[@LINE-2]] +// CHECK-NEXT: main{{.*}}dll_host.cc // CHECK-LABEL: SUMMARY if (thr == 0) return 1; diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc b/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc index c3e7dac..4687592 100644 --- a/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc +++ b/compiler-rt/test/asan/TestCases/Windows/operator_delete_wrong_argument.cc @@ -7,6 +7,6 @@ int main() { int *x = new int[42]; delete (x + 1); // CHECK: AddressSanitizer: attempting free on address which was not malloc()-ed -// CHECK: {{#0 0x.* operator delete }} +// CHECK: {{#0 0x.* operator delete}} // CHECK: {{#1 .* main .*operator_delete_wrong_argument.cc}}:[[@LINE-3]] } diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cc index c077f11..a12db9b 100644 --- a/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cc @@ -11,7 +11,7 @@ int main() { // CHECK: {{#0 .* main .*operator_new_left_oob.cc}}:[[@LINE-3]] // CHECK: [[ADDR]] is located 1 bytes to the left of 1-byte region // CHECK: allocated by thread T0 here: -// CHECK: {{#0 .* operator new }} +// CHECK: {{#0 .* operator new}} // CHECK: {{#1 .* main .*operator_new_left_oob.cc}}:[[@LINE-8]] delete buffer; } diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cc b/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cc index 7a66d17..7edee54 100644 --- a/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cc @@ -11,7 +11,7 @@ int main() { // CHECK: {{#0 .* main .*operator_new_right_oob.cc}}:[[@LINE-3]] // CHECK: [[ADDR]] is located 0 bytes to the right of 1-byte region // CHECK: allocated by thread T0 here: -// CHECK: {{#0 .* operator new }} +// CHECK: {{#0 .* operator new}} // CHECK: {{#1 .* main .*operator_new_right_oob.cc}}:[[@LINE-8]] delete buffer; } diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cc b/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cc index c435458..9d5a407 100644 --- a/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cc +++ b/compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cc @@ -12,10 +12,10 @@ int main() { // CHECK: {{#0 .* main .*operator_new_uaf.cc}}:[[@LINE-3]] // CHECK: [[ADDR]] is located 0 bytes inside of 1-byte region // CHECK-LABEL: freed by thread T0 here: -// CHECK: {{#0 .* operator delete }} +// CHECK: {{#0 .* operator delete}} // CHECK: {{#1 .* main .*operator_new_uaf.cc}}:[[@LINE-8]] // CHECK-LABEL: previously allocated by thread T0 here: -// CHECK: {{#0 .* operator new }} +// CHECK: {{#0 .* operator new}} // CHECK: {{#1 .* main .*operator_new_uaf.cc}}:[[@LINE-12]] return 0; } diff --git a/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cc b/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cc index a57e1e7..f0d3d3e 100644 --- a/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cc +++ b/compiler-rt/test/asan/TestCases/Windows/queue_user_work_item_report.cc @@ -11,7 +11,7 @@ DWORD CALLBACK work_item(LPVOID) { stack_buffer[subscript] = 42; // CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 1 at [[ADDR]] thread T1 -// CHECK: {{#0 .* work_item .*queue_user_work_item_report.cc}}:[[@LINE-3]] +// CHECK: {{#0 .* work_item.*queue_user_work_item_report.cc}}:[[@LINE-3]] // CHECK: Address [[ADDR]] is located in stack of thread T1 at offset {{.*}} in frame // CHECK: work_item SetEvent(done); diff --git a/compiler-rt/test/asan/TestCases/Windows/stack_use_after_return.cc b/compiler-rt/test/asan/TestCases/Windows/stack_use_after_return.cc index 7955f26..a770fd8 100644 --- a/compiler-rt/test/asan/TestCases/Windows/stack_use_after_return.cc +++ b/compiler-rt/test/asan/TestCases/Windows/stack_use_after_return.cc @@ -16,7 +16,7 @@ int main() { // CHECK-NEXT: {{#0 0x.* in main .*stack_use_after_return.cc}}:[[@LINE-3]] // // CHECK: is located in stack of thread T0 at offset [[OFFSET:.*]] in frame -// CHECK-NEXT: {{#0 0x.* in foo .*stack_use_after_return.cc}} +// CHECK-NEXT: {{#0 0x.* in foo.*stack_use_after_return.cc}} // // CHECK: 'stack_buffer' <== Memory access at offset [[OFFSET]] is inside this variable } diff --git a/compiler-rt/test/asan/TestCases/Windows/symbols_path.cc b/compiler-rt/test/asan/TestCases/Windows/symbols_path.cc index 3c69f88..81ead05 100644 --- a/compiler-rt/test/asan/TestCases/Windows/symbols_path.cc +++ b/compiler-rt/test/asan/TestCases/Windows/symbols_path.cc @@ -16,7 +16,7 @@ int main() { // CHECK-NEXT: {{#0 .* main .*symbols_path.cc}}:[[@LINE-3]] // CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region // CHECK: allocated by thread T0 here: -// CHECK-NEXT: {{#0 .* malloc }} +// CHECK-NEXT: {{#0 .* malloc}} // CHECK-NEXT: {{#1 .* main .*symbols_path.cc}}:[[@LINE-8]] free(buffer); } diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc index 63cb8ae..aac9ecf 100644 --- a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_left_oob.cc @@ -9,7 +9,7 @@ DWORD WINAPI thread_proc(void *) { stack_buffer[subscript] = 42; // CHECK: AddressSanitizer: stack-buffer-underflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 1 at [[ADDR]] thread T1 -// CHECK: {{#0 .* thread_proc .*thread_stack_array_left_oob.cc}}:[[@LINE-3]] +// CHECK: {{#0 .* thread_proc.*thread_stack_array_left_oob.cc}}:[[@LINE-3]] // CHECK: Address [[ADDR]] is located in stack of thread T1 at offset {{.*}} in frame // CHECK: thread_proc return 0; diff --git a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc index 601a1b8..2982e48 100644 --- a/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc +++ b/compiler-rt/test/asan/TestCases/Windows/thread_stack_array_right_oob.cc @@ -9,7 +9,7 @@ DWORD WINAPI thread_proc(void *) { stack_buffer[subscript] = 42; // CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 1 at [[ADDR]] thread T1 -// CHECK: {{#0 .* thread_proc .*thread_stack_array_right_oob.cc}}:[[@LINE-3]] +// CHECK: {{#0 .* thread_proc.*thread_stack_array_right_oob.cc}}:[[@LINE-3]] // CHECK: Address [[ADDR]] is located in stack of thread T1 at offset {{.*}} in frame // CHECK: thread_proc return 0; -- 2.7.4