mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
GH-133261: Make sure that the GC doesn't untrack objects in trashcan (GH-133431)
This commit is contained in:
parent
8d5f3cd2ce
commit
f554237b8e
3 changed files with 36 additions and 6 deletions
|
@ -493,6 +493,7 @@ update_refs(PyGC_Head *containers)
|
|||
next = GC_NEXT(gc);
|
||||
PyObject *op = FROM_GC(gc);
|
||||
if (_Py_IsImmortal(op)) {
|
||||
assert(!_Py_IsStaticImmortal(op));
|
||||
_PyObject_GC_UNTRACK(op);
|
||||
gc = next;
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue