[Stackless] Crash after throwing C++ exception?
lloyd at fusion.net.nz
Mon Oct 30 02:25:33 CET 2006
Richard Tew wrote:
> On 10/29/06, Lloyd Weehuizen <lloyd at fusion.net.nz> wrote:
>> 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?
>> 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.
> Hi Lloyd,
> Thanks for the reproducibility case. If someone with the required
> interest and skill with boost::python wants to step forward and have
> a go at working out what is going wrong, I am happy to help out
> to the degree which does not require me to install boost::python and
> compile this myself.
> However, if I had to guess at the reason for this bug. I would say
> something soft switched and the watchdog code you are using does
> not handle it appropriately.
Thanks for the prompt response. I applied your suggestions and the crash
does indeed go away. But my understanding of the _nr version of receive
means it will only work for switching python code and any code with C
stack frames will not be switched?
If I don't use the _nr version the crash returns.
Is there any way to get around this? As I was working under the
assumption that a hard switching beNice and Sleep methods were possible?
Could the thrown exception be preventing stackless from processing its
Stackless mailing list
Stackless at stackless.com
More information about the Stackless