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 | // Utilizes all flavors of __hwasan_load/store interface functions to verify |
5 | // that the instrumentation and the interface provided by HWASan do match. |
6 | // In case of a discrepancy, this test fails to link. |
7 | |
8 | #include <sanitizer/hwasan_interface.h> |
9 | |
10 | #define F(T) void f_##T(T *a, T *b) { *a = *b; } |
11 | |
12 | F(uint8_t) |
13 | F(uint16_t) |
14 | F(uint32_t) |
15 | F(uint64_t) |
16 | |
17 | typedef unsigned V32 __attribute__((__vector_size__(32))); |
18 | F(V32) |
19 | |
20 | int main() {} |
21 | |