1 // RUN: %clangxx_asan %s -o %t
2 // RUN: %env_asan_opts=print_module_map=1 not %run %t 2>&1 | FileCheck %s
3 // RUN: %env_asan_opts=print_module_map=2 not %run %t 2>&1 | FileCheck %s
4 // RUN: %clangxx_asan %s -o %t -fsanitize-recover=address
5 // RUN: %env_asan_opts=print_module_map=2:halt_on_error=0 %run %t 2>&1 | FileCheck %s
7 // We can't run system("otool") in the simulator.
14 int main(int argc
, char *argv
[]) {
16 snprintf(buf
, sizeof(buf
), "otool -l %s 1>&2", argv
[0]);
19 // CHECK-NEXT: cmdsize 24
20 // CHECK-NEXT: uuid [[UUID:[0-9A-F-]{36}]]
22 char *x
= (char*)malloc(10 * sizeof(char));
26 // CHECK: {{.*ERROR: AddressSanitizer: heap-use-after-free on address}}
27 // CHECK: Process module map:
28 // CHECK: uuid.cpp.tmp {{.*}} <[[UUID]]>
30 fprintf(stderr
, "Done.\n");