1 // RUN: %clang_hwasan_oldrt -DSIZE=2 -O0 %s -o %t && %run %t
2 // RUN: %clang_hwasan -DSIZE=2 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
3 // RUN: %clang_hwasan_oldrt -DSIZE=15 -O0 %s -o %t && %run %t
4 // RUN: %clang_hwasan -DSIZE=15 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
5 // RUN: %clang_hwasan_oldrt -DSIZE=16 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
6 // RUN: %clang_hwasan -DSIZE=16 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
7 // RUN: %clang_hwasan -DSIZE=64 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
8 // RUN: %clang_hwasan -DSIZE=0x1000 -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
10 // REQUIRES: stable-runtime
12 // Stack short granules are currently not implemented on x86.
16 #include <sanitizer/hwasan_interface.h>
18 __attribute__((noinline
))
27 // CHECK: READ of size 1 at
28 // CHECK: #0 {{.*}} in f{{.*}}stack-oob.c:[[@LINE-6]]
30 // CHECK-NOT: Cause: global-overflow
31 // CHECK: Cause: stack tag-mismatch
32 // CHECK: is located in stack of threa
33 // CHECK-NOT: Cause: global-overflow
35 // CHECK: SUMMARY: HWAddressSanitizer: tag-mismatch {{.*}} in f