This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR64535 - increase emergency EH buffers via a new allocator
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, rth at redhat dot com
- Date: Tue, 20 Jan 2015 14:36:21 +0000
- Subject: Re: [PATCH] Fix PR64535 - increase emergency EH buffers via a new allocator
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1501121358300 dot 12482 at zhemvz dot fhfr dot qr> <alpine dot LSU dot 2 dot 11 dot 1501191119070 dot 12482 at zhemvz dot fhfr dot qr> <20150119153410 dot GH3360 at redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1501200949080 dot 12482 at zhemvz dot fhfr dot qr> <20150120131802 dot GX3360 at redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1501201423160 dot 12482 at zhemvz dot fhfr dot qr>
On 20/01/15 14:25 +0100, Richard Biener wrote:
Though my question was whether 'throw X()' might instead behave as
'throw std::bad_alloc()' if allocating X exceeds the system's resource
limits. I guess the answer is yes as it's undefined?
Right, if we can't allocate memory for an X (plus the EH header) then
it's UB, so we can do anything, including using your pool to get room
for a bad_alloc and throwing that.