We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 912ebc1 commit 3c1ef42Copy full SHA for 3c1ef42
Python/gc.c
@@ -475,7 +475,11 @@ update_refs(PyGC_Head *containers)
475
while (gc != containers) {
476
next = GC_NEXT(gc);
477
PyObject *op = FROM_GC(gc);
478
- assert(!_Py_IsImmortal(op));
+ if (_Py_IsImmortal(op)) {
479
+ gc_list_move(gc, &get_gc_state()->permanent_generation.head);
480
+ gc = next;
481
+ continue;
482
+ }
483
gc_reset_refs(gc, Py_REFCNT(op));
484
/* Python's cyclic gc should never see an incoming refcount
485
* of 0: if something decref'ed to 0, it should have been
0 commit comments