[Stackless] Stackless for Python 2.5b2 / help required

Richard Tew richard.m.tew at gmail.com
Fri Aug 4 15:59:39 CEST 2006

On 8/4/06, Jeff Senn <senn at maya.com> wrote:
> Ok - more data. I'm beginning to suspect it has something to do
> with the generator destruction.  There is a path that
> calls back into PyEval_EvalFrame_slp when the last reference to
> a generator is dropped. (in gen_iternext_callback the DECREF
> of 'gen' calls gen_close... eventually leading to the execution
> of a frame that uses the _noval alternative)

I believe this happens with Stackless disabled as well, just through
a different code path.

I am pretty confident that the bug is just the ability to return within
stackless_call without ensuring that f_execute is not _noval.  And
I also believe it should be present in 2.4.3 as well.  It is just quite
hard to trigger.

I will check in my fix, as I am not confident it is correct.

> Oh! Note that in 2.4 this whole example would never have occurred
> because you wouldn't have been able to embed a yield into the
> try/except/finally ... so maybe that is a clue as well...

Right. This was just highlighted to me when I tried to
reproduce it under 2.4.3 using the modified version of your
repro case.  I have never had a need to use generators, so
I was happily ignorant of it beforehand :)


Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list