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

Pierre Baillargeon pbaillargeon at innobec.com
Tue Nov 21 22:27:10 CET 2006


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().
- 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?



More information about the Cplusplus-sig mailing list