1 // REQUIRES: aarch64-registered-target
3 // RUN: %clang_cc1 -include %S/Inputs/sanitizer-extra-source.cpp \
4 // RUN: -fsanitize-ignorelist=%S/Inputs/sanitizer-ignorelist-global.txt \
5 // RUN: -fsanitize=hwaddress -emit-llvm -triple aarch64-linux-android31 -o -\
6 // RUN: %s | FileCheck %s
8 // RUN: %clang_cc1 -include %S/Inputs/sanitizer-extra-source.cpp \
9 // RUN: -fsanitize-ignorelist=%S/Inputs/sanitizer-ignorelist-src.txt \
10 // RUN: -fsanitize=hwaddress -emit-llvm -triple aarch64-linux-android31 -o -\
11 // RUN: %s | FileCheck %s --check-prefix=IGNORELIST
14 int __attribute__((no_sanitize("hwaddress"))) attributed_global
;
15 int __attribute__((disable_sanitizer_instrumentation
)) disable_instrumentation_global
;
16 int ignorelisted_global
;
17 extern int __attribute__((no_sanitize("hwaddress"))) external_global
;
20 static int static_var
= 0;
21 const char *literal
= "Hello, world!";
25 // CHECK: @{{.*}}attributed_global{{.*}} ={{.*}} global {{.*}}, no_sanitize_hwaddress
26 // CHECK: @{{.*}}disable_instrumentation_global{{.*}} ={{.*}} global {{.*}}, no_sanitize_hwaddress
27 // CHECK: @{{.*}}ignorelisted_global{{.*}} ={{.*}} global {{.*}}, no_sanitize_hwaddress
28 // CHECK: @{{.*}}external_global{{.*}} ={{.*}}, no_sanitize_hwaddress
29 // CHECK: @{{.*}}extra_global{{.*}}.hwasan{{.*}} =
30 // CHECK: @{{.*}}global{{.*}}.hwasan{{.*}} =
31 // CHECK: @{{.*}}static_var{{.*}}.hwasan{{.*}} =
32 // CHECK: @{{.*}}.hwasan{{.*}} = {{.*}} c"Hello, world!\00"
34 // IGNORELIST: @{{.*}}global{{.*}} ={{.*}} global {{.*}}, no_sanitize_hwaddress
35 // IGNORELIST: @{{.*}}attributed_global{{.*}} ={{.*}} global {{.*}}, no_sanitize_hwaddress
36 // IGNORELIST: @{{.*}}disable_instrumentation_global{{.*}} ={{.*}} global {{.*}}, no_sanitize_hwaddress
37 // IGNORELIST: @{{.*}}ignorelisted_globa{{.*}} ={{.*}} global {{.*}}, no_sanitize_hwaddress
38 // IGNORELIST: @{{.*}}static_var{{.*}} ={{.*}} global {{.*}}, no_sanitize_hwaddress
39 // IGNORELIST: @{{.*}} = {{.*}} c"Hello, world!\00"{{.*}}, no_sanitize_hwaddress
40 // IGNORELIST: @{{.*}}external_global{{.*}} ={{.*}}, no_sanitize_hwaddress
41 // IGNORELIST: @{{.*}}extra_global{{.*}}.hwasan{{.*}} =