-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-121137: Add missing Py_DECREF calls for ADDITEMS opcode of _pickle.c #121136
Conversation
PyObject_GetAttr returns a new reference, but this reference is never decremented using Py_DECREF, so 2x calls to this function are added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No user observable changes so I skipped the news.
Thanks @Legoclones for the PR, and @gaogaotiantian for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…pickle.c (pythonGH-121136) PyObject_GetAttr returns a new reference, but this reference is never decremented using Py_DECREF, so Py_DECREF calls to this referece are added (cherry picked from commit 92893fd) Co-authored-by: Justin Applegate <[email protected]>
…pickle.c (pythonGH-121136) PyObject_GetAttr returns a new reference, but this reference is never decremented using Py_DECREF, so Py_DECREF calls to this referece are added (cherry picked from commit 92893fd) Co-authored-by: Justin Applegate <[email protected]>
GH-121139 is a backport of this pull request to the 3.13 branch. |
GH-121140 is a backport of this pull request to the 3.12 branch. |
Thank you for fixing this! |
…_pickle.c (GH-121136) (#121139) gh-121137: Add missing Py_DECREF calls for ADDITEMS opcode of _pickle.c (GH-121136) PyObject_GetAttr returns a new reference, but this reference is never decremented using Py_DECREF, so Py_DECREF calls to this referece are added (cherry picked from commit 92893fd) Co-authored-by: Justin Applegate <[email protected]>
…_pickle.c (GH-121136) (#121140) gh-121137: Add missing Py_DECREF calls for ADDITEMS opcode of _pickle.c (GH-121136) PyObject_GetAttr returns a new reference, but this reference is never decremented using Py_DECREF, so Py_DECREF calls to this referece are added (cherry picked from commit 92893fd) Co-authored-by: Justin Applegate <[email protected]>
…pickle.c (python#121136) PyObject_GetAttr returns a new reference, but this reference is never decremented using Py_DECREF, so Py_DECREF calls to this referece are added
…pickle.c (python#121136) PyObject_GetAttr returns a new reference, but this reference is never decremented using Py_DECREF, so Py_DECREF calls to this referece are added
…pickle.c (python#121136) PyObject_GetAttr returns a new reference, but this reference is never decremented using Py_DECREF, so Py_DECREF calls to this referece are added
In the
load_additems
function ofModules/_pickle.c
(which handles theADDITEMS
opcode), PyObject_GetAttr is called and returnsadd_func
on line 6660. PyObject_GetAttr returns a new reference, but this reference is never decremented using Py_DECREF, so 2x calls to this function are added (compare todo_append
function in the same file).