[OptTable] Fix typo VALUE => VALUES (NFCI) (#121523)
[llvm-project.git] / compiler-rt / test / hwasan / TestCases / wild-free-shadow.c
blob7810e26dfffd1f5d6ea9b8a0dc33565f978c87b9
1 // RUN: %clang_hwasan %s -o %t && not %run %t 2>&1 | FileCheck %s
3 #include <stdlib.h>
5 extern void *__hwasan_shadow_memory_dynamic_address;
7 int main() {
8 char *p = (char *)malloc(1);
9 free(__hwasan_shadow_memory_dynamic_address);
10 // CHECK: ERROR: HWAddressSanitizer: invalid-free on address {{[0x]+}}[[PTR:.*]] at pc {{[0x]+}}[[PC:.*]] on thread T{{[0-9]+}}
11 // CHECK: #0 {{[0x]+}}{{.*}}[[PC]] in {{.*}}free
12 // CHECK: #1 {{.*}} in main {{.*}}wild-free-shadow.c:[[@LINE-3]]
13 // CHECK: {{[0x]+}}{{.*}}[[PTR]] is HWAsan shadow memory.
14 // CHECK-NOT: Segmentation fault
15 // CHECK-NOT: SIGSEGV
16 return 0;