summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/Windows/oom.cc
blob: bf19aa09cadcd93f0f1494ff7f414da0b177f988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// RUN: %clang_cl_asan -Od %s -Fe%t
// RUN: not %run %t 2>&1 | FileCheck %s
// REQUIRES: asan-32-bits

#include <malloc.h>

int main() {
  while (true) {
    void *ptr = malloc(200 * 1024 * 1024);  // 200MB
  }
// CHECK: SUMMARY: AddressSanitizer: out-of-memory
}