Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert check for immortality.
  • Loading branch information
markshannon committed Mar 6, 2024
commit 3c1ef42e4b253bf2af6943e1f90fdff6fc474221
6 changes: 5 additions & 1 deletion Python/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,11 @@ update_refs(PyGC_Head *containers)
while (gc != containers) {
next = GC_NEXT(gc);
PyObject *op = FROM_GC(gc);
assert(!_Py_IsImmortal(op));
if (_Py_IsImmortal(op)) {
gc_list_move(gc, &get_gc_state()->permanent_generation.head);
gc = next;
continue;
}
gc_reset_refs(gc, Py_REFCNT(op));
/* Python's cyclic gc should never see an incoming refcount
* of 0: if something decref'ed to 0, it should have been
Expand Down