This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/64535] Emergency buffer for exception allocation too small
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 Jan 2015 11:56:58 +0000
- Subject: [Bug libstdc++/64535] Emergency buffer for exception allocation too small
- Auto-submitted: auto-generated
- References: <bug-64535-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64535
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Is the following required to work?
#include <exception>
#include <new>
#include <sys/resource.h>
struct large
{
char s[1024*1024*1024];
};
int main()
{
rlimit lim;
lim.rlim_cur = 1024*1024*1024;
lim.rlim_max = 1024*1024*1024;
setrlimit (RLIMIT_AS, &lim);
try {
throw large ();
} catch (large&) {
} catch (std::bad_alloc) {
}
}
I get
> ./a.out
terminate called without an active exception
Aborted