]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/asan/TestCases/Darwin/atos-symbolizer.cc
1 // Check that the `atos` symbolizer works.
3 // RUN: %clangxx_asan -O0 %s -o %t
4 // RUN: %env_asan_opts=verbosity=2 ASAN_SYMBOLIZER_PATH=$(which atos) not %run %t 2>&1 | FileCheck %s
8 int main(int argc
, char **argv
) {
9 char *x
= (char*)malloc(10 * sizeof(char));
13 free(x
+ argc
- 1); // BOOM
14 // CHECK: Using atos at user-specified path:
15 // CHECK: AddressSanitizer: attempting double-free{{.*}}in thread T0
16 // CHECK: #0 0x{{.*}} in {{.*}}free
17 // CHECK: #1 0x{{.*}} in main {{.*}}atos-symbolizer.cc:[[@LINE-4]]
18 // CHECK: freed by thread T0 here:
19 // CHECK: #0 0x{{.*}} in {{.*}}free
20 // CHECK: #1 0x{{.*}} in main {{.*}}atos-symbolizer.cc:[[@LINE-8]]
21 // CHECK: allocated by thread T0 here:
22 // CHECK: atos-symbolizer.cc:[[@LINE-13]]