]> git.proxmox.com Git - rustc.git/blame - src/compiler-rt/test/asan/TestCases/Windows/oom.cc
New upstream version 1.12.0+dfsg1
[rustc.git] / src / compiler-rt / test / asan / TestCases / Windows / oom.cc
CommitLineData
92a42be0
SL
1// RUN: %clang_cl_asan -O0 %s -Fe%t
2// RUN: not %run %t 2>&1 | FileCheck %s
3
4#include <malloc.h>
5
6int main() {
7 while (true) {
8 void *ptr = malloc(200 * 1024 * 1024); // 200MB
92a42be0
SL
9 }
10// CHECK: failed to allocate
11}