| 1 | // RUN: %clang_cl_asan %Od %s %Fe%t |
|---|---|
| 2 | // RUN: not %run %t 2>&1 | FileCheck %s |
| 3 | // REQUIRES: asan-32-bits |
| 4 | |
| 5 | #include <malloc.h> |
| 6 | |
| 7 | int main() { |
| 8 | while (true) { |
| 9 | void *ptr = malloc(size: 200 * 1024 * 1024); // 200MB |
| 10 | } |
| 11 | // CHECK: SUMMARY: AddressSanitizer: out-of-memory |
| 12 | } |
| 13 |
