1 // RUN: %clang_cl_asan %Od -o %t %s
2 // RUN: %env_asan_opts=windows_hook_rtl_allocators=true %run %t 2>&1 | FileCheck %s
3 // RUN: %env_asan_opts=windows_hook_rtl_allocators=false %run %t 2>&1 | FileCheck %s
4 // RUN: %clang_cl %Od -o %t %s
5 // RUN: %run %t 2>&1 | FileCheck %s
6 // UNSUPPORTED: asan-64-bits
12 HANDLE heap
= HeapCreate(0, 0, 0);
13 void *ptr
= HeapAlloc(heap
, 0, 4);
15 void *ptr2
= HeapReAlloc(heap
, 0, ptr
, 0);
17 HeapFree(heap
, 0, ptr2
);
18 fprintf(stderr
, "passed!\n");
21 // CHECK-NOT: double-free
22 // CHECK-NOT: AddressSanitizer