Message382361
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. |
|
| Date |
User |
Action |
Args |
| 2020-12-03 00:59:11 | brandtbucher | set | recipients:
+ brandtbucher, rhettinger, vstinner, serhiy.storchaka |
| 2020-12-03 00:59:11 | brandtbucher | set | messageid: <1606957151.79.0.198416844122.issue42536@roundup.psfhosted.org> |
| 2020-12-03 00:59:11 | brandtbucher | link | issue42536 messages |
| 2020-12-03 00:59:11 | brandtbucher | create | |
|