[Stackless] Crash after throwing C++ exception?
Lloyd Weehuizen
lloyd at fusion.net.nz
Sun Oct 29 12:49:47 CET 2006
Hi
I seem to have run into an issue with throwing C++ exceptions when a
python error is encountered ( As boost::python does ). Am I wrong in
thinking it should be safe to use exceptions with stackless?
The basic problem is this, if I create tasklet 'A' that constructs a
channel, and create tasklet 'B' that waits two seconds and sends an
exception down that channel, then tasklet 'A' which has blocked on the
channel, will raise the exception, which is passed back into C where a
C++ exception of type boost::python::error_already_set is thrown ( as
nothing in the python code handles it ).
At this point everything appears to be ok, however if that exact same
code is executed again, stackless crashes with a NULL pointer exception
deep inside python.
I've managed to get this flow of logic from my larger project and have
built a small reproducible test case based on Juho's embedding example.
All Juho's standard tests execute as normal and then I've added a final
case on the bottom that shows the error.
You should just be able to drop into a fresh checkout of the example to
see the problem.
Am I just doing something stupid? Or is this an actual bug?
Thanks,
Lloyd
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: main.cpp
URL: <http://www.stackless.com/pipermail/stackless/attachments/20061030/54d31113/attachment.asc>
-------------- next part --------------
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless
More information about the Stackless
mailing list