1 // RUN: %clang_hwasan %s -o %t && not %run %t 2>&1 | FileCheck %s
3 #include <sanitizer/hwasan_interface.h>
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