brintos

brintos / llvm-project-archived public Read only

0
0
Text · 358 B · 564bebe Raw
10 lines · cpp
1// RUN: %clang_cl_asan %Od %s %Fe%t2// RUN: %env_asan_opts=allocator_may_return_null=true %run %t3// RUN: %env_asan_opts=allocator_may_return_null=true:windows_hook_rtl_allocators=true %run %t4// UNSUPPORTED: asan-64-bits5#include <windows.h>6int main() {7  void *nope = HeapAlloc(GetProcessHeap(), 0, ((size_t)0) - 1);8  return (nope == nullptr) ? 0 : 1;9}10