[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 ...
Done.
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 ?
    g().next()
StopIteration
[5812 refs]
python: Objects/frameobject.c:510: PyFrame_Fini: Assertion `numfree == 0' failed.
Aborted
[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.

Regards,

-- 
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
http://www.tismer.com/mailman/listinfo/stackless




More information about the Stackless mailing list