[Stackless] Stackless breaks generators that do not yield

Sune Kirkeby sune at a-host.dk
Sat Mar 8 14:14:56 CET 2003

Hello all,

It seems there is an INCREF/DECREF-mismatch in stackless when you
have generators that do not yield.  If you build stackless
--with-pydebug you'll get the following badness when running the
attached python-program:

[sune at melpomene:/usr/src/stackless-python/stackless/src]$./python bloop
Adding parser accelerators ...
Python/ceval.c:165 negative ref count -1
Python/ceval.c:129 negative ref count -1
Traceback (most recent call last):
  File "bloop", line 5, in ?
[5812 refs]
python: Objects/frameobject.c:510: PyFrame_Fini: Assertion `numfree == 0' failed.
[sune at melpomene:/usr/src/stackless-python/stackless/src]$

Stock Python 2.2.2 does not produce the "negative ref count"s and
also does not hit the PyFrame_Fini assertion.  That's as far as I
have gotten sofar, not knowing much about Python internals, I hope
someone here will be able to track the critter down.


Sune Kirkeby | In general, they do what you want, unless you want
<a-host.dk>  | consistency.       --Larry Wall in the perl man page
Stackless mailing list
Stackless at www.tismer.com

More information about the Stackless mailing list