Summary: Currently many allocator specific errors (OOM, for example) are reported as a text message and CHECK(0) termination, not stack, no details, not too helpful nor informative. To improve the situation, ASan detailed errors were defined and reported under the appropriate conditions. Issue: https://github.com/google/sanitizers/issues/887 Reviewers: eugenis Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D44404 llvm-svn: 328722
13 lines
264 B
C++
13 lines
264 B
C++
// RUN: %clang_cl_asan -O0 %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
|
|
}
|