[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / compiler-rt / test / hwasan / TestCases / use-after-scope-loop-removed.cpp
blob47ae3b3357a97f553ab7a44df7eef93e55ca1eb1
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 #include <stdlib.h>
10 int *p;
12 int main() {
13 for (int i = 0; i < 3; i++) {
14 int x;
15 p = &x;
17 return *p; // BOOM
18 // CHECK: ERROR: HWAddressSanitizer: tag-mismatch
19 // CHECK: #0 0x{{.*}} in main {{.*}}use-after-scope-loop-removed.cpp:[[@LINE-2]]
20 // CHECK: Cause: stack tag-mismatch