brintos

brintos / llvm-project-archived public Read only

0
0
Text · 415 B · d707df8 Raw
14 lines · cpp
1// UNSUPPORTED: asan-64-bits2// RUN: %clang_cl_asan %Od %s %Fe%t3// RUN: %env_asan_opts=windows_hook_rtl_allocators=true not %run %t 2>&1 | FileCheck %s4 5#include <windows.h>6 7int main() {8  char *buffer;9  buffer = (char *)HeapAlloc(GetProcessHeap(), 0, 32),10  buffer[33] = 'a';11  // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]12  // CHECK: WRITE of size 1 at [[ADDR]] thread T013}14