[C++-sig] Crash during exception translation using Intel Compiler 9.1 and optimized builds

David Abrahams dave at boost-consulting.com
Thu Nov 23 22:49:20 CET 2006


Pierre Baillargeon <pbaillargeon at innobec.com> writes:

> We're using the framework to translate C++ exception to Python 
> exceptions. The code works in debug builds but crashes in optimized 
> builds. Were using Intel Compiler 9.1 on Windows.
>
> Has anyone experienced this?
>
> Any possible workaround?
>
> The symptoms are:
>
> - a crash under _is_exception() in MSVCR80.DLL, called from 
> handle_exception_impl().

Almost certainly a compiler bug unless your own code is corrupting
memory and/or code.

> - The bottom of the stack is obviously bad: below _is_exception_typeof() 
> we find tanhf (float's hyperbolic tangent? Microsoft obviously found a 
> new type-system theorem involving high-level maths), then a long boost 
> template and 0x0.
> - The arguments received in the long boost::python type (which I cannot 
> see because the name is too long for windbg) are a0, a1 and f, and f is 
> 0 (which might explain to jump to 0x0).
>
> Currently the only work-around we've found is to disable the exception 
> translation. From the look of the stack, it seems that the problem is in 
> the linked list of translators. Could it be an order-of-initialization 
> issue? Or a temporary value that should stick around or that the 
> compiler mistakenly optimizes away?

Could be almost anything.  Are you trying to run python code at C++'s
static initialization time?  If so, I could imagine an
order-of-initialization issue.  If not, not.

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




More information about the Cplusplus-sig mailing list