aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-01-22 09:21:48 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-01-22 09:21:48 +0000
commitcce93c76bac0718cd084410797c38734b5649156 (patch)
treeabf3aa1d03797c5bd51f6b44701776fde16675dc /gcc
parent770acfc9e3753d7b9d4727293ac6f16811fa751f (diff)
downloadgcc-cce93c76bac0718cd084410797c38734b5649156.zip
gcc-cce93c76bac0718cd084410797c38734b5649156.tar.gz
gcc-cce93c76bac0718cd084410797c38734b5649156.tar.bz2
re PR libstdc++/64535 (Emergency buffer for exception allocation too small)
2015-01-22 Richard Biener <rguenther@suse.de> PR libstdc++/64535 * libsupc++/eh_alloc.cc: Include new. (bitmask_type): Remove. (one_buffer): Likewise. (emergency_buffer): Likewise. (emergency_used): Likewise. (dependents_buffer): Likewise. (dependents_used): Likewise. (class pool): New custom fixed-size arena, variable size object allocator. (emergency_pool): New global. (__cxxabiv1::__cxa_allocate_exception): Use new emergency_pool. (__cxxabiv1::__cxa_free_exception): Likewise. (__cxxabiv1::__cxa_allocate_dependent_exception): Likewise. (__cxxabiv1::__cxa_free_dependent_exception): Likewise. * g++.old-deja/g++.eh/badalloc1.C: Adjust. From-SVN: r219988
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C9
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2a54aff..8246787 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-22 Richard Biener <rguenther@suse.de>
+
+ PR libstdc++/64535
+ * g++.old-deja/g++.eh/badalloc1.C: Adjust.
+
2015-01-21 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/64682
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C
index 5cde10e..f4f443b 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C
@@ -12,21 +12,24 @@ typedef __SIZE_TYPE__ size_t;
extern "C" void abort();
extern "C" void *memcpy(void *, const void *, size_t);
+// libstdc++ requires a large initialization time allocation for the
+// emergency EH allocation pool. Add that to the arena size.
+
// Assume that STACK_SIZE defined implies a system that does not have a
// large data space either, and additionally that we're not linking against
// a shared libstdc++ (which requires quite a bit more initialization space).
#ifdef STACK_SIZE
-const int arena_size = 256;
+const int arena_size = 256 + 8 * 128;
#else
#if defined(__FreeBSD__) || defined(__sun__) || defined(__hpux__)
// FreeBSD, Solaris and HP-UX require even more space at initialization time.
// FreeBSD 5 now requires over 131072 bytes.
-const int arena_size = 262144;
+const int arena_size = 262144 + 72 * 1024;
#else
// Because pointers make up the bulk of our exception-initialization
// allocations, we scale by the pointer size from the original
// 32-bit-systems-based estimate.
-const int arena_size = 32768 * ((sizeof (void *) + 3)/4);
+const int arena_size = 32768 * ((sizeof (void *) + 3)/4) + 72 * 1024;
#endif
#endif