|
Boost : |
From: James Talbut (James.Talbut_at_[hidden])
Date: 2008-01-08 05:02:58
From searching, this was last discussed in Sep 2003, but didn't come to
an adequate conclusion - and things have changed since then anyway.
Including prg_exec_monitor.hpp on VS2005 produces the following warning:
execution_monitor.ipp(216) : warning C4535: calling _set_se_translator()
requires /EHa
It is my opinion that the use of _set_se_translator here is a mistake
for the following reasons:
1. It doesn't achieve what it's trying to achieve if my test
involves multiple threads.
The translator is thread specific and there is no way for my
thread function to apply the translator (especially not when I may not
have access to the thread function).
2. It requires the use of /EHa which has an effect on the code
being run.
Code under test should be run using the same options as release,
and /EHa is not appropriate for (most) release code.
3. If I've really triggered a system fault then I can no longer
trust the state of my app, so I cannot rely on it to correctly report
its problem.
I may have just destroyed the stack, attempting to unwind is
just going to cause more problems - system errors should be handled
externally.
I accept that others may prefer the simplicity of trying to handle
system failures internally, so I propose changing to
execution_monitor.ipp to only define
BOOST_MS_STRUCTURED_EXCEPTION_HANDLING if
BOOST_NO_MS_STRUCTURED_EXCEPTION_HANDLING is not defined:
# ifndef BOOST_NO_MS_STRUCTURED_EXCEPTION_HANDLING
# define BOOST_MS_STRUCTURED_EXCEPTION_HANDLING
# endif
I will then carry out my testing after running something like:
"Program Files\Debugging Tools for Windows\cdb" -iaec "-c
\".lines;!analyze -v;kP 4;q\""
to catch system errors.
Thoughts?
Jim
PS. What I'd really like to see is a cross platform out of process JIT
reporter for just one application.
.
________________________________________________________________________
This e-mail, and any attachment, is confidential. If you have received it in error, do not use or disclose the information in any way, notify me immediately, and please delete it from your system.
________________________________________________________________________
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk