Skip to content

Commit c9391eb

Browse files
Untrack immortal objects from expand_region_transitivity_reachable
1 parent 1e69cd1 commit c9391eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,7 @@ expand_region_transitively_reachable(PyGC_Head *container, PyGC_Head *gc, GCStat
13961396
assert(_PyObject_GC_IS_TRACKED(op));
13971397
if (_Py_IsImmortal(op)) {
13981398
PyGC_Head *next = GC_NEXT(gc);
1399-
gc_list_move(gc, &gcstate->permanent_generation.head);
1399+
_PyObject_GC_UNTRACK(op);
14001400
gc = next;
14011401
continue;
14021402
}

0 commit comments

Comments
 (0)