Subject: Re: [boost] Question for C++ experts about exception allocation failure
From: Nevin \ (nevin_at_[hidden])
Date: 2009-05-18 13:04:50
2009/5/18 Anthony Williams <anthony.ajw_at_[hidden]>
> I don't see how they could be --- if an exception is caught then before
> the handler is entered the stack needs to be unwound and all the
> destructors run.
Here is one way it could be on the stack (I think I heard it when someone
described the Metrowerks implementation, but I could be wrong):
Allocate a new stack frame when the throw expression is encountered, and
keep track of where it is. Wherever a new stack frame is needed (say, for
local variables in destructors during stack unwinding), allocate them below
the stack frame of the exception.
-- Nevin ":-)" Liber <mailto:nevin_at_[hidden]> (847) 691-1404
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk