150
|
1 // RUN: %clangxx_hwasan -mllvm -hwasan-instrument-with-calls=1 -O0 %s -o %t
|
|
2 // RUN: %clangxx_hwasan -mllvm -hwasan-instrument-with-calls=1 -O0 %s -o %t -fsanitize-recover=hwaddress
|
|
3
|
|
4 // REQUIRES: stable-runtime
|
|
5
|
|
6 // Utilizes all flavors of __hwasan_load/store interface functions to verify
|
|
7 // that the instrumentation and the interface provided by HWASan do match.
|
|
8 // In case of a discrepancy, this test fails to link.
|
|
9
|
|
10 #include <sanitizer/hwasan_interface.h>
|
|
11
|
|
12 #define F(T) void f_##T(T *a, T *b) { *a = *b; }
|
|
13
|
|
14 F(uint8_t)
|
|
15 F(uint16_t)
|
|
16 F(uint32_t)
|
|
17 F(uint64_t)
|
|
18
|
|
19 typedef unsigned V32 __attribute__((__vector_size__(32)));
|
|
20 F(V32)
|
|
21
|
|
22 int main() {}
|