1 // RUN: %clang_cl_asan %Od %s %Fe%t
2 // RUN: %env_asan_opts=windows_hook_rtl_allocators=true not %run %t 2>&1 | FileCheck %s
3 // UNSUPPORTED: asan-64-bits
10 HANDLE procHeap
= GetProcessHeap();
11 oldbuf
= (char *)HeapAlloc(procHeap
, 0, sz
);
12 char *newbuf
= oldbuf
;
13 while (oldbuf
== newbuf
) {
15 newbuf
= (char *)HeapReAlloc(procHeap
, 0, oldbuf
, sz
);
20 // CHECK: AddressSanitizer: heap-use-after-free on address [[ADDR:0x[0-9a-f]+]]
21 // CHECK: WRITE of size 1 at [[WRITE2:0x[0-9a-f]+]] thread T0
22 // CHECK: #0 {{0x[0-9a-f]+ in main.*}}:[[@LINE-3]]