[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / compiler-rt / test / hwasan / TestCases / use-after-scope.cpp
blobef7849b2f3b7758fa649fffa7886c3cffaf99da7
1 // This is the ASAN test of the same name ported to HWAsan.
3 // RUN: %clangxx_hwasan -O1 %s -o %t && \
4 // RUN: not %run %t 2>&1 | FileCheck %s
6 // REQUIRES: aarch64-target-arch || riscv64-target-arch
8 volatile int *p = 0;
10 int main() {
12 int x = 0;
13 p = &x;
15 *p = 5; // BOOM
16 // CHECK: ERROR: HWAddressSanitizer: tag-mismatch
17 // CHECK: #0 0x{{.*}} in main {{.*}}use-after-scope.cpp:[[@LINE-2]]
18 // CHECK: Cause: stack tag-mismatch
19 return 0;