diff options
author | Mark Shannon <mark@hotpy.org> | 2024-11-20 16:41:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-20 16:41:20 (GMT) |
commit | aea0c586d181abb897511b6b46d28bfbe4858f79 (patch) | |
tree | c80958b80c4cf5eeb75898c89b868440a2174b99 /Python/bytecodes.c | |
parent | 7191b7662efcd79f2f19821c9b9fa2155df6f698 (diff) | |
download | cpython-aea0c586d181abb897511b6b46d28bfbe4858f79.zip cpython-aea0c586d181abb897511b6b46d28bfbe4858f79.tar.gz cpython-aea0c586d181abb897511b6b46d28bfbe4858f79.tar.bz2 |
GH-127010: Don't lazily track and untrack dicts (GH-127027)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r-- | Python/bytecodes.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 029bdb2..7ffe2f5 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -2340,10 +2340,6 @@ dummy_func( DEOPT_IF(ep->me_key != name); PyObject *old_value = ep->me_value; DEOPT_IF(old_value == NULL); - /* Ensure dict is GC tracked if it needs to be */ - if (!_PyObject_GC_IS_TRACKED(dict) && _PyObject_GC_MAY_BE_TRACKED(PyStackRef_AsPyObjectBorrow(value))) { - _PyObject_GC_TRACK(dict); - } _PyDict_NotifyEvent(tstate->interp, PyDict_EVENT_MODIFIED, dict, name, PyStackRef_AsPyObjectBorrow(value)); ep->me_value = PyStackRef_AsPyObjectSteal(value); // old_value should be DECREFed after GC track checking is done, if not, it could raise a segmentation fault, |