[asan] use relative line numbers in tests
authorGreg Fitzgerald <gregf@codeaurora.org>
Tue, 27 May 2014 23:13:52 +0000 (23:13 +0000)
committerGreg Fitzgerald <gregf@codeaurora.org>
Tue, 27 May 2014 23:13:52 +0000 (23:13 +0000)
llvm-svn: 209699

compiler-rt/test/asan/TestCases/asan-symbolize-sanity-test.cc
compiler-rt/test/asan/TestCases/use-after-delete.cc
compiler-rt/test/asan/TestCases/use-after-free-right.cc
compiler-rt/test/asan/TestCases/use-after-free.cc

index d80f534..1aa41b6 100644 (file)
@@ -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
index a45c4cf..7696e18 100644 (file)
@@ -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:
index 99525a5..16c4348 100644 (file)
@@ -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]]
 }
index 5317b2a..7f77aac 100644 (file)
@@ -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: