[Stackless] Exception handling crashes, how to contribute
gcolgate at gmail.com
Tue Apr 3 18:28:19 CEST 2012
I had the unfortunate experience of mixing python and C++ code on the
Windows environment on a large program with multiple libraries not written
The C++ code uses the structured exception handling protocol, and stackless
does no properly handle this. This could result in crashes in the following
Whenever a python tasklet is suspended the top of the exception chain is
saved by stackless. This very well could be pointing into code *above the
python stack into the main program*. When the python tasklet is called
again, it's stack is put back* *in the same place*,* but the environment
above the stack* *might be different*.* This would cause the exception
chain to screw up in the part where the exception chain points above the
This would cause a crash on an exception... for example a function uses
OutputDebugStr (which routes by using an exception).... the exception
handler itself could crash.
I have corrected this issue in my local copy of Stackless.. it involves
changes to stacklesseval.c and involves patching the exception chain
properly when tasklet switching, in cases when windows structured execption
handling is defined. I have not contributed to stackless open source
before, but I think anyone else getting peculiar crashes with exceptions on
Windows might appreciate this fix.
I would like someone to explain the procedure to contribute to me.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Stackless