1*673dc3d4SNico Weber // RUN: %clang_cl_asan -Od %s -Fe%t 2*673dc3d4SNico Weber // RUN: %env_asan_opts=windows_hook_rtl_allocators=true not %run %t 2>&1 | FileCheck %s 3*673dc3d4SNico Weber // UNSUPPORTED: asan-64-bits 4*673dc3d4SNico Weber #include <cassert> 5*673dc3d4SNico Weber #include <windows.h> 6*673dc3d4SNico Weber main()7*673dc3d4SNico Weberint main() { 8*673dc3d4SNico Weber void *allocation = HeapAlloc(GetProcessHeap(), 0, 10); 9*673dc3d4SNico Weber assert(allocation != 0); 10*673dc3d4SNico Weber assert(HeapFree(GetProcessHeap(), 0, allocation)); 11*673dc3d4SNico Weber HeapFree(GetProcessHeap(), 0, allocation); //will dump 12*673dc3d4SNico Weber assert(0 && "HeapFree double free should produce an ASAN dump\n"); 13*673dc3d4SNico Weber return 0; 14*673dc3d4SNico Weber } 15*673dc3d4SNico Weber 16*673dc3d4SNico Weber // CHECK: AddressSanitizer: attempting double-free on [[addr:0x[0-9a-fA-F]+]] in thread T0: 17