[LVI] Add trunc to i1 handling. (#124480)
[llvm-project.git] / compiler-rt / test / asan / TestCases / Windows / heapalloc_doublefree.cpp
blob6366fd37e9da0f08a65b93dc74dbc24fc9f1496f
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
4 #include <cassert>
5 #include <windows.h>
7 int main() {
8 void *allocation = HeapAlloc(GetProcessHeap(), 0, 10);
9 assert(allocation != 0);
10 assert(HeapFree(GetProcessHeap(), 0, allocation));
11 HeapFree(GetProcessHeap(), 0, allocation); //will dump
12 assert(0 && "HeapFree double free should produce an ASAN dump\n");
13 return 0;
16 // CHECK: AddressSanitizer: attempting double-free on [[addr:0x[0-9a-fA-F]+]] in thread T0: