diff options
Diffstat (limited to 'compiler-rt/test')
-rw-r--r-- | compiler-rt/test/hwasan/TestCases/short-granule-and-match-all-tag.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler-rt/test/hwasan/TestCases/short-granule-and-match-all-tag.cpp b/compiler-rt/test/hwasan/TestCases/short-granule-and-match-all-tag.cpp new file mode 100644 index 000000000000..5d23ecc3ddd2 --- /dev/null +++ b/compiler-rt/test/hwasan/TestCases/short-granule-and-match-all-tag.cpp @@ -0,0 +1,12 @@ +// RUN: %clang_hwasan -mllvm -hwasan-match-all-tag=0 %s -o %t && %run %t + +#include <sanitizer/hwasan_interface.h> +#include <stdlib.h> + +int main() { + __hwasan_enable_allocator_tagging(); + char *x = (char *)malloc(40); + char volatile z = *x; + free(x); + return 0; +} |