Skip to content
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-126240: handle NULL returned by _Py_asdl_expr_seq_new #126241

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

picnixz
Copy link
Contributor

@picnixz picnixz commented Oct 31, 2024

I've checked other constructors _Py_asdl_*_seq_new but couldn't find occurrences of them not having some if (!res) check after the call. I don't think this warrants a NEWS entry so I'll add the skip news label for now.

@sobolevn sobolevn merged commit 94639f6 into python:main Oct 31, 2024
49 checks passed
@miss-islington-app
Copy link

Thanks @picnixz for the PR, and @sobolevn for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 31, 2024
…ythonGH-126241)

check return value of `_Py_asdl_expr_seq_new`
(cherry picked from commit 94639f6)

Co-authored-by: Bénédikt Tran <[email protected]>
@miss-islington-app
Copy link

Sorry, @picnixz and @sobolevn, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 94639f6b7182c2e1a82f2f907b03b5b15202acfa 3.12

@picnixz picnixz deleted the fix/missing-null-checks-pegen-126240 branch October 31, 2024 14:24
@bedevere-app
Copy link

bedevere-app bot commented Oct 31, 2024

GH-126243 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 Oct 31, 2024
@picnixz
Copy link
Contributor Author

picnixz commented Oct 31, 2024

I'll take of the backport unless someone else wants to do it (just working on something else for a few minutes before coming back)

@sobolevn
Copy link
Member

@picnixz can you please do a manual backport to 3.12?

@picnixz
Copy link
Contributor Author

picnixz commented Oct 31, 2024

Sure!

@bedevere-app
Copy link

bedevere-app bot commented Oct 31, 2024

GH-126245 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Oct 31, 2024
sobolevn pushed a commit that referenced this pull request Oct 31, 2024
…H-126241) (#126243)

gh-126240: handle `NULL` returned by  `_Py_asdl_expr_seq_new` (GH-126241)

check return value of `_Py_asdl_expr_seq_new`
(cherry picked from commit 94639f6)

Co-authored-by: Bénédikt Tran <[email protected]>
sobolevn pushed a commit that referenced this pull request Oct 31, 2024
…H-126241) (#126245)

gh-126240: handle `NULL` returned by  `_Py_asdl_expr_seq_new` (#126241)

check return value of `_Py_asdl_expr_seq_new`
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.

2 participants