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 brandtbucher
Recipients brandtbucher, rhettinger, serhiy.storchaka, vstinner
Date 2020-12-03.00:59:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1606957151.79.0.198416844122.issue42536@roundup.psfhosted.org>
In-reply-to
Content
It looks like the GC untracks the None-filled result tuple in untrack_tuples, and it's never re-tracked again. This can also happen if it's filled with atomic values on an early iteration and the GC visits it.

Perhaps a simple fix is to call _PyObject_GC_TRACK on the result tuple inside of each zip_next call if it's not tracked anymore?

if (!_PyObject_GC_IS_TRACKED(result)) {
    _PyObject_GC_TRACK(result);
}
_PyTuple_MaybeUntrack(result);  // Worth it?
return result;

Although I'm not sure how much of a win we're getting from the result tuple reuse here - maybe it's easier to just not do that.
History
Date User Action Args
2020-12-03 00:59:11brandtbuchersetrecipients: + brandtbucher, rhettinger, vstinner, serhiy.storchaka
2020-12-03 00:59:11brandtbuchersetmessageid: <1606957151.79.0.198416844122.issue42536@roundup.psfhosted.org>
2020-12-03 00:59:11brandtbucherlinkissue42536 messages
2020-12-03 00:59:11brandtbuchercreate
Morty Proxy This is a proxified and sanitized view of the page, visit original site.