Skip to content

gh-149689: add missing error checks in Parser/action_helpers.c#149710

Merged
pablogsal merged 2 commits into
python:mainfrom
KowalskiThomas:kowalski/fix-add-missing-error-checks
Jun 29, 2026
Merged

gh-149689: add missing error checks in Parser/action_helpers.c#149710
pablogsal merged 2 commits into
python:mainfrom
KowalskiThomas:kowalski/fix-add-missing-error-checks

Conversation

@KowalskiThomas

@KowalskiThomas KowalskiThomas commented May 12, 2026

Copy link
Copy Markdown
Contributor

@read-the-docs-community

read-the-docs-community Bot commented May 12, 2026

Copy link
Copy Markdown

@eendebakpt eendebakpt left a comment

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.

Looks good overall.

Comment thread Parser/action_helpers.c Outdated
@@ -1416,6 +1432,9 @@ expr_ty
_PyPegen_template_str(Parser *p, Token *a, asdl_expr_seq *raw_expressions, Token *b) {

asdl_expr_seq *resized_exprs = _get_resized_exprs(p, a, raw_expressions, b, TSTRING);
if (!resized_exprs && PyErr_Occurred()) {

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.

The && PyErr_Occurred() is redundant here, but is not hurting either.

@KowalskiThomas KowalskiThomas marked this pull request as ready for review May 12, 2026 10:05

@pablogsal pablogsal 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.

a small nit

Comment thread Parser/action_helpers.c Outdated
@pablogsal pablogsal force-pushed the kowalski/fix-add-missing-error-checks branch from 2285902 to 9c719d8 Compare June 29, 2026 22:49
@pablogsal pablogsal enabled auto-merge (squash) June 29, 2026 22:51
@pablogsal pablogsal added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jun 29, 2026
@pablogsal pablogsal merged commit 2dd6e59 into python:main Jun 29, 2026
60 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @KowalskiThomas for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jun 29, 2026

Copy link
Copy Markdown

GH-152640 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 29, 2026
@miss-islington-app

Copy link
Copy Markdown

Sorry, @KowalskiThomas and @pablogsal, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 2dd6e59aea24220975cce2b602846d997413d46c 3.13

@bedevere-app

bedevere-app Bot commented Jun 29, 2026

Copy link
Copy Markdown

GH-152641 is a backport of this pull request to the 3.14 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs backport to 3.13 bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing error / null pointer checks in Parser/action_helpers.c

3 participants