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