]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gen_iternext(): repair subtle refcount problem.
authorTim Peters <tim.peters@gmail.com>
Wed, 20 Jun 2001 06:57:32 +0000 (06:57 +0000)
committerTim Peters <tim.peters@gmail.com>
Wed, 20 Jun 2001 06:57:32 +0000 (06:57 +0000)
commit6302ec63fc40dd6ae1ad3003003b6b264422e8e0
treebfc0f9146102ef06530d03ed161a8d99f552c352
parent43afb24c3084305f2e8269ffcb81dc1e233b871c
gen_iternext():  repair subtle refcount problem.
NeilS, please check!  This came from staring at your genbug.py, but I'm
not sure it plugs all possible holes.  Without this, I caught a
frameobject refcount going negative, and it was also the cause (in debug
build) of _Py_ForgetReference's attempt to forget an object with already-
NULL _ob_prev and _ob_next pointers -- although I'm still not entirely
sure how!  Part of the difficulty is that frameobjects are stored on a
free list that gets recycled very quickly, so if there's a stray pointer
to one of them it never looks like an insane frameobject (never goes
trough the free() mangling MS debug forces, etc).
Python/ceval.c