Stackless segfault - take 2

Giovanni Bajo giovannibajo at libero.it
Thu Oct 23 19:24:52 CEST 2003


Hi Chris,

I managed to reproduce and isolate another segfault in Stackless:

---------------------------------------------------------
import stackless

class B:
    def __del__(self):
        pass

class A:
    def T2(self, b):
        stackless.schedule()

    def bug(self):
        b = B()
        stackless.tasklet(self.T2)(b)

a = A()
a.bug()
stackless.schedule()
stackless.schedule()

class USELESS:
    def DUMMY(self):
        pass

def DUMMY():
    pass
def DUMMY():
    pass
def DUMMY():
    pass
def DUMMY():
    pass
def DUMMY():
    pass
def DUMMY():
    pass
def DUMMY():
    pass
def DUMMY():
    pass

---------------------------------------------------------

This time it's not just unwinding during an exception that would crash my
application anyway, I actually hit it in supposedly-working production code. I
hope you can fix it just as fast. I don't know if it's a fallback from
yesterday's fix.

This is funny to me because it requires all those useless function definitions
to be triggered. When debugging, it's crashing in _Py_ForgetReference, called
during Py_XDECREF(f->f_back) (yes, it's frame_dealloc again).

BTW, are you putting these snippets into some regression testsuite for
stackless? I think it's worth to be sure they stay fixed.

Thanks in advance.
Giovanni Bajo





More information about the Stackless mailing list