forked from OSchip/llvm-project
[asan] use relative line numbers in tests
llvm-svn: 209699
This commit is contained in:
parent
bb2990df58
commit
329912f54c
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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]]
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue