summaryrefslogtreecommitdiff
path: root/test/test_fallback_malloc.pass.cpp
diff options
context:
space:
mode:
authorIgor Kudrin <ikudrin.dev@gmail.com>2016-09-29 06:38:06 +0000
committerIgor Kudrin <ikudrin.dev@gmail.com>2016-09-29 06:38:06 +0000
commitfeb04d70afb8388150f2ba40df8333ca4c4817ec (patch)
tree768b51034d36d5bf7d60832406dcbdbc08c74938 /test/test_fallback_malloc.pass.cpp
parenta0863319144d468d524c8606e56ebbfb77c2bf71 (diff)
downloadlibcxxabi-feb04d70afb8388150f2ba40df8333ca4c4817ec.tar.gz
[libc++abi] Use fallback_malloc to allocate __cxa_eh_globals in case of dynamic memory exhaustion.
Throwing an exception for the first time may lead to call calloc to allocate memory for __cxa_eh_globals. If the memory pool is exhausted at that moment, it results in abnormal termination of the program. This patch addresses the issue by using fallback_malloc in that case. Differential Revision: https://reviews.llvm.org/D17815 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@282692 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/test_fallback_malloc.pass.cpp')
-rw-r--r--test/test_fallback_malloc.pass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_fallback_malloc.pass.cpp b/test/test_fallback_malloc.pass.cpp
index 3eed3f4..474e0b3 100644
--- a/test/test_fallback_malloc.pass.cpp
+++ b/test/test_fallback_malloc.pass.cpp
@@ -16,7 +16,7 @@ typedef std::deque<void *> container;
// #define DEBUG_FALLBACK_MALLOC
#define INSTRUMENT_FALLBACK_MALLOC
-#include "../src/fallback_malloc.ipp"
+#include "../src/fallback_malloc.cpp"
container alloc_series ( size_t sz ) {
container ptrs;