[RISCV] Add RVVConstraint to SiFive custom matrix multiply instructions. (#124055)
[llvm-project.git] / compiler-rt / test / asan / TestCases / Windows / heapalloc_zero_size.cpp
blob767201a60781856bcbf5b9ad5ca7b100695a8420
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
7 #include <cassert>
8 #include <stdio.h>
9 #include <windows.h>
11 int main() {
12 HANDLE heap = HeapCreate(0, 0, 0);
13 void *ptr = HeapAlloc(heap, 0, 4);
14 assert(ptr);
15 void *ptr2 = HeapReAlloc(heap, 0, ptr, 0);
16 assert(ptr2);
17 HeapFree(heap, 0, ptr2);
18 fprintf(stderr, "passed!\n");
21 // CHECK-NOT: double-free
22 // CHECK-NOT: AddressSanitizer
23 // CHECK: passed!