Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-09-21 18:52:31


"carlos pizano" <carlospizano_at_[hidden]> writes:

>> FWIW, when David pointed me to his article (thanks again David)
>> I came to same the same conclusion myself (that is, that /EHa
>> is _not_ required for this technique).
>
> a) What article?

The very link I quoted in my first reply to you. Once again:
http://www.boost.org/more/error_handling.html. Did you read it?

> b) Why is not required? According to David under /EHs the compiler is
> free to optimize away exception frames if it does not see code that can
> throw, now if eventually *the technique* generates a C++ throw who knows
> what could happen?

It doesn't matter if exception frames get optimized away, since a
major aim of *the technique* is to _avoid executing any unwinding
actions_ and _prevent the SEH from being caught_.

> I would be nice if somebody cares to explain in some detail why the
> technique works fine as is.

More details I can't provide for you. It's a hack. It just works.
We've never seen it not work, except under the documented conditions
(crash from within a catch {...} block).

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk