1// RUN: %clang_cl_asan %Od %s %Fe%t
2// RUN: %run %t 2>&1 | FileCheck %s
3#include <stdio.h>
4#include <windows.h>
5
6int main() {
7 char *buffer;
8 buffer = (char *)HeapAlloc(GetProcessHeap(), 0, 32),
9 buffer[0] = 'a';
10 HeapFree(GetProcessHeap(), 0, buffer);
11 puts(s: "Okay");
12 // CHECK: Okay
13}
14

source code of compiler-rt/test/asan/TestCases/Windows/heapalloc_sanity.cpp