FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-101765: Fix refcount issues in list and unicode pickling by JelleZijlstra · Pull Request #102265 · python/cpython · GitHub

/ cpython Public

gh-101765: Fix refcount issues in list and unicode pickling - #102265

Merged
JelleZijlstra merged 1 commit into
python:mainfrom
JelleZijlstra:refcount
Feb 26, 2023
Merged

gh-101765: Fix refcount issues in list and unicode pickling#102265
JelleZijlstra merged 1 commit into
python:mainfrom
JelleZijlstra:refcount

Conversation

JelleZijlstra commented Feb 25, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

JelleZijlstra added skip news 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section labels Feb 25, 2023

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @JelleZijlstra for commit b8ad59e 🤖

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

iritkatriel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Copy link
Copy Markdown
Contributor

Thanks @JelleZijlstra for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

JelleZijlstra deleted the refcount branch February 26, 2023 00:02

Copy link
Copy Markdown
Contributor

Sorry, @JelleZijlstra, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker d71edbd1b7437706519a9786211597d95934331a 3.11

Copy link
Copy Markdown
Contributor

Sorry @JelleZijlstra, I had trouble checking out the 3.10 backport branch.
Please retry by removing and re-adding the "needs backport to 3.10" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker d71edbd1b7437706519a9786211597d95934331a 3.10

Copy link
Copy Markdown
Member Author

Working on the backports

Copy link
Copy Markdown

GH-102268 is a backport of this pull request to the 3.11 branch.

bedevere-bot removed the needs backport to 3.11 only security fixes label Feb 26, 2023
JelleZijlstra added a commit to JelleZijlstra/cpython that referenced this pull request Feb 26, 2023
…ing (pythonGH-102265)

Followup from pythonGH-101769..
(cherry picked from commit d71edbd)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

Copy link
Copy Markdown

GH-102269 is a backport of this pull request to the 3.10 branch.

bedevere-bot removed the needs backport to 3.10 only security fixes label Feb 26, 2023
JelleZijlstra added a commit to JelleZijlstra/cpython that referenced this pull request Feb 26, 2023
…ing (pythonGH-102265)

Followup from pythonGH-101769..
(cherry picked from commit d71edbd)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Comment thread Objects/unicodeobject.c
PyObject *u = unicode_new_empty();
if (u == NULL)
if (u == NULL) {
Py_DECREF(iter);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Shouldn't this be Py_XDECREF? There is no null check above for iter.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Good point. But shouldn’t it be a null check and return above, if iter is null I think it would crash in the BuildValue before we even get here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Py_BuildValue deals with NULL internally; if one of the args is NULL it itself returns NULL, propagating the exception. So changing to XDECREF here should be enough.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL