[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / compiler-rt / test / hwasan / TestCases / register-dump-no-fp.cpp
blob5b218e11c7adda63fc0acc4e37c49fff109d4f6f
1 // RUN: %clangxx_hwasan -fomit-frame-pointer -momit-leaf-frame-pointer \
2 // RUN: -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
3 // RUN: %clangxx_hwasan -fomit-frame-pointer -momit-leaf-frame-pointer \
4 // RUN: -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
5 // RUN: %clangxx_hwasan -fomit-frame-pointer -momit-leaf-frame-pointer \
6 // RUN: -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
7 // RUN: %clangxx_hwasan -fomit-frame-pointer -momit-leaf-frame-pointer \
8 // RUN: -O3 %s -o %t && not %run %t 2>&1 | FileCheck %s --check-prefixes=CHECK
10 // This test ensures that the CFA is implemented properly for slow
11 // (non-frame-pointer) unwinding.
12 #include <sanitizer/hwasan_interface.h>
13 #include <stdio.h>
14 #include <stdlib.h>
16 __attribute__((noinline)) void f(int *p) { *p = 3; }
18 // CHECK: ERROR: HWAddressSanitizer:
19 // CHECK: #{{[0-9]}} {{.*}} in f(int*) {{.*}}register-dump-no-fp.cpp:[[@LINE-3]]
21 int main() {
22 __hwasan_enable_allocator_tagging();
24 int *volatile a = new int;
25 a = (int *)__hwasan_tag_pointer(a, 0);
26 f(a);
27 // CHECK: #{{[0-9]}} {{.*}} in main {{.*}}register-dump-no-fp.cpp:[[@LINE-1]]