From 57f80524dcab63e26cc4dada2d1e55c31cbc37e2 Mon Sep 17 00:00:00 2001 From: Greg Fitzgerald Date: Tue, 27 May 2014 23:13:52 +0000 Subject: [asan] use relative line numbers in tests git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209699 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/asan/TestCases/asan-symbolize-sanity-test.cc | 2 +- test/asan/TestCases/use-after-delete.cc | 6 +++--- test/asan/TestCases/use-after-free-right.cc | 10 +++++----- test/asan/TestCases/use-after-free.cc | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) (limited to 'test') diff --git a/test/asan/TestCases/asan-symbolize-sanity-test.cc b/test/asan/TestCases/asan-symbolize-sanity-test.cc index d80f534a0..1aa41b64f 100644 --- a/test/asan/TestCases/asan-symbolize-sanity-test.cc +++ b/test/asan/TestCases/asan-symbolize-sanity-test.cc @@ -32,7 +32,7 @@ int main(int argc, char *argv[]) { inc2(array, -1); // BOOM // CHECK: ERROR: AddressSanitizer: heap-buffer-overflow // CHECK: READ of size 4 at 0x{{.*}} - // CHECK: #0 {{.*}} in inc2 {{.*}}asan-symbolize-sanity-test.cc:56 + // CHECK: #0 {{.*}} in inc2 {{.*}}asan-symbolize-sanity-test.cc:[[@LINE+21]] // CHECK: #1 {{.*}} in main {{.*}}asan-symbolize-sanity-test.cc:[[@LINE-4]] // CHECK: allocated by thread T{{.*}} here: // CHECK: #{{.*}} in {{(wrap_|__interceptor_)?}}malloc diff --git a/test/asan/TestCases/use-after-delete.cc b/test/asan/TestCases/use-after-delete.cc index a45c4cfbe..7696e1889 100644 --- a/test/asan/TestCases/use-after-delete.cc +++ b/test/asan/TestCases/use-after-delete.cc @@ -11,17 +11,17 @@ 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-delete.cc:10}} + // CHECK: {{ #0 0x.* in main .*use-after-delete.cc:}}[[@LINE-4]] // CHECK: {{0x.* is located 5 bytes inside of 10-byte region .0x.*,0x.*}} // CHECK: {{freed by thread T0 here:}} // CHECK-Linux: {{ #0 0x.* in operator delete\[\]}} - // CHECK-Linux: {{ #1 0x.* in main .*use-after-delete.cc:9}} + // CHECK-Linux: {{ #1 0x.* in main .*use-after-delete.cc:}}[[@LINE-10]] // CHECK: {{previously allocated by thread T0 here:}} // CHECK-Linux: {{ #0 0x.* in operator new\[\]}} - // CHECK-Linux: {{ #1 0x.* in main .*use-after-delete.cc:8}} + // CHECK-Linux: {{ #1 0x.* in main .*use-after-delete.cc:}}[[@LINE-16]] // CHECK: Shadow byte legend (one shadow byte represents 8 application bytes): // CHECK: Global redzone: diff --git a/test/asan/TestCases/use-after-free-right.cc b/test/asan/TestCases/use-after-free-right.cc index 99525a5e4..16c43481b 100644 --- a/test/asan/TestCases/use-after-free-right.cc +++ b/test/asan/TestCases/use-after-free-right.cc @@ -14,21 +14,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:13}} + // CHECK: {{ #0 0x.* in main .*use-after-free-right.cc:}}[[@LINE-4]] // 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:12}} + // CHECK-Linux: {{ #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-10]] // CHECK-Darwin: {{ #0 0x.* in wrap_free}} - // CHECK-Darwin: {{ #1 0x.* in main .*use-after-free-right.cc:12}} + // CHECK-Darwin: {{ #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-13]] // CHECK: {{previously allocated by thread T0 here:}} // CHECK-Linux: {{ #0 0x.* in .*malloc}} - // CHECK-Linux: {{ #1 0x.* in main .*use-after-free-right.cc:11}} + // CHECK-Linux: {{ #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-19]] // CHECK-Darwin: {{ #0 0x.* in wrap_malloc.*}} - // CHECK-Darwin: {{ #1 0x.* in main .*use-after-free-right.cc:11}} + // CHECK-Darwin: {{ #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-22]] } diff --git a/test/asan/TestCases/use-after-free.cc b/test/asan/TestCases/use-after-free.cc index 5317b2a04..7f77aac5d 100644 --- a/test/asan/TestCases/use-after-free.cc +++ b/test/asan/TestCases/use-after-free.cc @@ -11,23 +11,23 @@ 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:10}} + // CHECK: {{ #0 0x.* in main .*use-after-free.cc:}}[[@LINE-4]] // 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:9}} + // CHECK-Linux: {{ #1 0x.* in main .*use-after-free.cc:}}[[@LINE-10]] // CHECK-Darwin: {{ #0 0x.* in wrap_free}} - // CHECK-Darwin: {{ #1 0x.* in main .*use-after-free.cc:9}} + // CHECK-Darwin: {{ #1 0x.* in main .*use-after-free.cc:}}[[@LINE-13]] // CHECK: {{previously allocated by thread T0 here:}} // CHECK-Linux: {{ #0 0x.* in .*malloc}} - // CHECK-Linux: {{ #1 0x.* in main .*use-after-free.cc:8}} + // CHECK-Linux: {{ #1 0x.* in main .*use-after-free.cc:}}[[@LINE-19]] // CHECK-Darwin: {{ #0 0x.* in wrap_malloc.*}} - // CHECK-Darwin: {{ #1 0x.* in main .*use-after-free.cc:8}} + // CHECK-Darwin: {{ #1 0x.* in main .*use-after-free.cc:}}[[@LINE-22]] // CHECK: Shadow byte legend (one shadow byte represents 8 application bytes): // CHECK: Global redzone: // CHECK: ASan internal: -- cgit v1.2.1