|
Boost : |
From: carlos pizano (carlospizano_at_[hidden])
Date: 2003-09-20 23:45:49
> I don't know what execution_monitor is doing, but the
> _set_se_translator technique described in
> http://www.boost.org/more/error_handling.html doesn't require /EHa.
Dave, I think we are talking about the same _set_se_translator
I did a quick check and the MSDN documentation that comes with my
compiler (VC.Net 2003) says:
" Use /EHa instead of /EHsc when using _set_se_translator."
I don't see any qualification to this warning on the docs.
Moreover, I did a quick console application with _set_se_translator and
during compile I get:
warning C4535: calling _set_se_translator() requires /EHa
the command line options /EHc and /GX are insufficient
Are you using maybe an earlier compiler?
CPU.
-----Original Message-----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of David Abrahams
Sent: Saturday, September 20, 2003 8:06 PM
To: boost_at_[hidden]
Subject: [boost] Re: boost::execution_monitor impl under windows
"carlos pizano" <carlospizano_at_[hidden]> writes:
> Hello Boosters. I am looking into the boost.test library for insights.
> In particular I like the boost::execution_monitor idea. However, I
found
> that on Windows + VC execution_monitor implementation uses
> _set_se_translator() to translate native exceptions (SEHs) into C++
> exceptions, and I was fine with that for a while until I stumbled unto
> John Robbins book : "Debugging applications for Microsoft .NET and for
> Microsoft Windows" (Microsoft Press, 2003) chapter 13 specifically in
> pg. 524 he has section named "Don't Use _set_se_translator" where he
> goes to say that _set_se_translator:
>
> 1- Is not global, works only on a per thread basis
> 2- Does not work in release builds (!!)
> 3- Forces your code to use asynchronous exception handling (/EHa),
which
> reduces performance and maybe increases code bloat.
>
> I don't really understand why #2 but #3 is the one I don't like. I
guess
> my question is twofold: a) why is execution_monitor using
> _set_se_translator, and b) why can't we change it to a model that
allows
> me to compile with sync exceptions (/EHs), that is, a model where we
> *carefully* mix SEH and C++ EH. I am willing to submit ideas for that
> scenario.
I don't know what execution_monitor is doing, but the
_set_se_translator technique described in
http://www.boost.org/more/error_handling.html doesn't require /EHa.
In fact, if the execution_monitor is using some other kind of SEH
catching where it tries to continue, I think it's a very bad idea
(hard for developers to debug and further results are unreliable
anyway because there's been a crash) and should be changed to use the
one outlined above.
-- Dave Abrahams Boost Consulting www.boost-consulting.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk