1 // RUN: %clang_hwasan %s -o %t && %env_hwasan_opts=print_module_map=1 %run %t 2>&1 | FileCheck %s --check-prefixes=EXIT,NOMORE
2 // RUN: %clang_hwasan %s -DBUG -o %t && %env_hwasan_opts=print_module_map=1 not %run %t 2>&1 | FileCheck %s --check-prefixes=EXIT,NOMORE
3 // RUN: %clang_hwasan %s -DBUG -fsanitize-recover=hwaddress -o %t && %env_hwasan_opts=print_module_map=1,halt_on_error=0 not %run %t 2>&1 | FileCheck %s --check-prefixes=EXIT,NOMORE
4 // RUN: %clang_hwasan %s -DBUG -fsanitize-recover=hwaddress -o %t && %env_hwasan_opts=print_module_map=2,halt_on_error=0 not %run %t 2>&1 | FileCheck %s --check-prefixes=BUG1,BUG2,EXIT,NOMORE
8 #include <sanitizer/hwasan_interface.h>
11 __hwasan_enable_allocator_tagging();
13 char * volatile x
= (char*)malloc(40);
18 __hwasan_disable_allocator_tagging();
19 // BUG1: Process memory map follows:
20 // BUG1: print-module-map
21 // BUG1: End of process memory map.
23 // BUG2: Process memory map follows:
24 // BUG2: print-module-map
25 // BUG2: End of process memory map.
27 // EXIT: Process memory map follows:
28 // EXIT: print-module-map
29 // EXIT: End of process memory map.
31 // NOMORE-NOT: Process memory map follows: