This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix g++.eh/badalloc.C failure


Hi!

badalloc1.C test fails due to recent libstdc++-v3 locale changes, because
the initial arena to serve malloc requests from is too small (e.g. on ia32
the first malloc call is allocating a 640 bytes long chunk, there is also a
malloc(1320) and about 3 other calls over 200 bytes, total > 3K).
This is all before a C++ program hits main.
Maybe it would be worth some analysis what could be avoided...

Ok to commit?

2001-12-17  Jakub Jelinek  <jakub@redhat.com>

	* g++.old-deja/g++.eh/badalloc1.C (arena): Increase size.

--- gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C.jj	Tue Nov 20 00:31:43 2001
+++ gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C	Mon Dec 17 15:43:12 2001
@@ -4,7 +4,7 @@
 
 // Check we can throw a bad_alloc exception when malloc dies
 
-static __SIZE_TYPE__ arena[64]; // so things can initialize
+static __SIZE_TYPE__ arena[4096]; // so things can initialize
 static int fail;
 static unsigned pos;
 

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]