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 --- /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 +#include + +int main() { + __hwasan_enable_allocator_tagging(); + char *x = (char *)malloc(40); + char volatile z = *x; + free(x); + return 0; +}