Skip to content

Commit 329912f

Browse files
author
Greg Fitzgerald
committedMay 27, 2014
[asan] use relative line numbers in tests
llvm-svn: 209699
1 parent bb2990d commit 329912f

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed
 

‎compiler-rt/test/asan/TestCases/asan-symbolize-sanity-test.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ int main(int argc, char *argv[]) {
3232
inc2(array, -1); // BOOM
3333
// CHECK: ERROR: AddressSanitizer: heap-buffer-overflow
3434
// CHECK: READ of size 4 at 0x{{.*}}
35-
// CHECK: #0 {{.*}} in inc2 {{.*}}asan-symbolize-sanity-test.cc:56
35+
// CHECK: #0 {{.*}} in inc2 {{.*}}asan-symbolize-sanity-test.cc:[[@LINE+21]]
3636
// CHECK: #1 {{.*}} in main {{.*}}asan-symbolize-sanity-test.cc:[[@LINE-4]]
3737
// CHECK: allocated by thread T{{.*}} here:
3838
// CHECK: #{{.*}} in {{(wrap_|__interceptor_)?}}malloc

‎compiler-rt/test/asan/TestCases/use-after-delete.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ int main() {
1111
// CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
1212
// CHECK: {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
1313
// CHECK: {{READ of size 1 at 0x.* thread T0}}
14-
// CHECK: {{ #0 0x.* in main .*use-after-delete.cc:10}}
14+
// CHECK: {{ #0 0x.* in main .*use-after-delete.cc:}}[[@LINE-4]]
1515
// CHECK: {{0x.* is located 5 bytes inside of 10-byte region .0x.*,0x.*}}
1616
// CHECK: {{freed by thread T0 here:}}
1717

1818
// CHECK-Linux: {{ #0 0x.* in operator delete\[\]}}
19-
// CHECK-Linux: {{ #1 0x.* in main .*use-after-delete.cc:9}}
19+
// CHECK-Linux: {{ #1 0x.* in main .*use-after-delete.cc:}}[[@LINE-10]]
2020

2121
// CHECK: {{previously allocated by thread T0 here:}}
2222

2323
// CHECK-Linux: {{ #0 0x.* in operator new\[\]}}
24-
// CHECK-Linux: {{ #1 0x.* in main .*use-after-delete.cc:8}}
24+
// CHECK-Linux: {{ #1 0x.* in main .*use-after-delete.cc:}}[[@LINE-16]]
2525

2626
// CHECK: Shadow byte legend (one shadow byte represents 8 application bytes):
2727
// CHECK: Global redzone:

‎compiler-rt/test/asan/TestCases/use-after-free-right.cc

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ int main() {
1414
// CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
1515
// CHECK: {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
1616
// CHECK: {{WRITE of size 1 at 0x.* thread T0}}
17-
// CHECK: {{ #0 0x.* in main .*use-after-free-right.cc:13}}
17+
// CHECK: {{ #0 0x.* in main .*use-after-free-right.cc:}}[[@LINE-4]]
1818
// CHECK: {{0x.* is located 0 bytes inside of 1-byte region .0x.*,0x.*}}
1919
// CHECK: {{freed by thread T0 here:}}
2020

2121
// CHECK-Linux: {{ #0 0x.* in .*free}}
22-
// CHECK-Linux: {{ #1 0x.* in main .*use-after-free-right.cc:12}}
22+
// CHECK-Linux: {{ #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-10]]
2323

2424
// CHECK-Darwin: {{ #0 0x.* in wrap_free}}
25-
// CHECK-Darwin: {{ #1 0x.* in main .*use-after-free-right.cc:12}}
25+
// CHECK-Darwin: {{ #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-13]]
2626

2727
// CHECK: {{previously allocated by thread T0 here:}}
2828

2929
// CHECK-Linux: {{ #0 0x.* in .*malloc}}
30-
// CHECK-Linux: {{ #1 0x.* in main .*use-after-free-right.cc:11}}
30+
// CHECK-Linux: {{ #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-19]]
3131

3232
// CHECK-Darwin: {{ #0 0x.* in wrap_malloc.*}}
33-
// CHECK-Darwin: {{ #1 0x.* in main .*use-after-free-right.cc:11}}
33+
// CHECK-Darwin: {{ #1 0x.* in main .*use-after-free-right.cc:}}[[@LINE-22]]
3434
}

‎compiler-rt/test/asan/TestCases/use-after-free.cc

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ int main() {
1111
// CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
1212
// CHECK: {{0x.* at pc 0x.* bp 0x.* sp 0x.*}}
1313
// CHECK: {{READ of size 1 at 0x.* thread T0}}
14-
// CHECK: {{ #0 0x.* in main .*use-after-free.cc:10}}
14+
// CHECK: {{ #0 0x.* in main .*use-after-free.cc:}}[[@LINE-4]]
1515
// CHECK: {{0x.* is located 5 bytes inside of 10-byte region .0x.*,0x.*}}
1616
// CHECK: {{freed by thread T0 here:}}
1717

1818
// CHECK-Linux: {{ #0 0x.* in .*free}}
19-
// CHECK-Linux: {{ #1 0x.* in main .*use-after-free.cc:9}}
19+
// CHECK-Linux: {{ #1 0x.* in main .*use-after-free.cc:}}[[@LINE-10]]
2020

2121
// CHECK-Darwin: {{ #0 0x.* in wrap_free}}
22-
// CHECK-Darwin: {{ #1 0x.* in main .*use-after-free.cc:9}}
22+
// CHECK-Darwin: {{ #1 0x.* in main .*use-after-free.cc:}}[[@LINE-13]]
2323

2424
// CHECK: {{previously allocated by thread T0 here:}}
2525

2626
// CHECK-Linux: {{ #0 0x.* in .*malloc}}
27-
// CHECK-Linux: {{ #1 0x.* in main .*use-after-free.cc:8}}
27+
// CHECK-Linux: {{ #1 0x.* in main .*use-after-free.cc:}}[[@LINE-19]]
2828

2929
// CHECK-Darwin: {{ #0 0x.* in wrap_malloc.*}}
30-
// CHECK-Darwin: {{ #1 0x.* in main .*use-after-free.cc:8}}
30+
// CHECK-Darwin: {{ #1 0x.* in main .*use-after-free.cc:}}[[@LINE-22]]
3131
// CHECK: Shadow byte legend (one shadow byte represents 8 application bytes):
3232
// CHECK: Global redzone:
3333
// CHECK: ASan internal:

0 commit comments

Comments
 (0)
Please sign in to comment.