Skip to content

gh-121652: Handle allocate_weakref returning NULL #121653

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

Merged
merged 1 commit into from
Jul 13, 2024

Conversation

colesbury
Copy link
Contributor

@colesbury colesbury commented Jul 12, 2024

The allocate_weakref may return NULL when out of memory. We need to handle that case and propagate the error.

The `allocate_weakref` may return NULL when out of memory. We need to
handle that case and propagate the error.
Copy link
Contributor

@mpage mpage left a comment

Choose a reason for hiding this comment

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

Ah good catch!

@colesbury colesbury merged commit a640a60 into python:main Jul 13, 2024
39 checks passed
@miss-islington-app
Copy link

Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@colesbury colesbury deleted the gh-121652-weakref-null branch July 13, 2024 16:07
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 13, 2024
…21653)

The `allocate_weakref` may return NULL when out of memory. We need to
handle that case and propagate the error.
(cherry picked from commit a640a60)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jul 13, 2024

GH-121721 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jul 13, 2024
colesbury added a commit that referenced this pull request Jul 13, 2024
#121721)

The `allocate_weakref` may return NULL when out of memory. We need to
handle that case and propagate the error.
(cherry picked from commit a640a60)

Co-authored-by: Sam Gross <colesbury@gmail.com>
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
)

The `allocate_weakref` may return NULL when out of memory. We need to
handle that case and propagate the error.
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.

3 participants