This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tim.peters
Recipients Guido.van.Rossum, gvanrossum, inglesp, pitrou, tim.golden, tim.peters, vstinner
Date 2014-05-06.04:51:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Sorry for the earlier noise.  I'm fighting a flu and my head is mush :-(

Anyway, this doesn't look obvious.  We get to this point:

            if (Py_REFCNT(op) == 1) {
                /* op will be destroyed */
                gc = gc->gc.gc_prev;

and op is the type object for class B.  gc gets set to the previous object, a list.  Everything looks fine at this point.  But when we get back from:


the list's gc.gc_next field has been overwritten with NULL.  That's why gc gets set to NULL on the next trip through the loop.

I spaced out stepping through all the type deallocation code, and didn't find exactly when the list's gc_next is overwritten.  The list's gc_prev is still fine.  Perhaps some code called _PyObject_GC_UNTRACK on the list object (which NULLs out the gc_next pointer but not the gc_prev pointer).
Date User Action Args
2014-05-06 04:51:51tim.peterssetrecipients: + tim.peters, gvanrossum, pitrou, vstinner, tim.golden, inglesp, Guido.van.Rossum
2014-05-06 04:51:51tim.peterssetmessageid: <>
2014-05-06 04:51:51tim.peterslinkissue21435 messages
2014-05-06 04:51:50tim.peterscreate