Skip to content

gh-146169: correctly handle re-entrant parsing calls in Expat handlers - #146566

Open
picnixz wants to merge 7 commits into
python:mainfrom
picnixz:fix/expat/parse-recursive-146169
Open

gh-146169: correctly handle re-entrant parsing calls in Expat handlers#146566
picnixz wants to merge 7 commits into
python:mainfrom
picnixz:fix/expat/parse-recursive-146169

Conversation

@picnixz

@picnixzpicnixz commented Mar 28, 2026

Copy link
Copy Markdown
Member

Comment threadMisc/NEWS.d/next/Library/2026-03-28-10-27-46.gh-issue-146169.RBF1xp.rst Outdated
@picnixz

picnixz commented Mar 28, 2026

Copy link
Copy Markdown
MemberAuthor

@hartwork I'd like your feedback here to know whether there are other places that I need to consider. I will work on the encoding issue described in the GH issue afterwards unless they are interconnected. TiA!

@picnixzpicnixz added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Mar 28, 2026

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

@hartwork I'd like your feedback here to know whether there are other places that I need to consider. I will work on the encoding issue described in the GH issue afterwards unless they are interconnected. TiA!

@picnixz they seem interconnected, yes. Here's what I found:

Comment threadLib/test/test_pyexpat.py Outdated
Comment threadLib/test/test_pyexpat.py Outdated
Comment threadModules/pyexpat.c Outdated
@picnixz

Copy link
Copy Markdown
MemberAuthor

For the encoding issue, I will actually do it in a separate PR. It's not really a re-entrancy call issue, but rather an issue where you call XML_Parse() first and then you recall it later with a different string and hence have a different possible encoding.

@picnixz
picnixz requested a review from hartworkApril 11, 2026 13:48
Comment threadMisc/NEWS.d/next/Library/2026-03-28-10-27-46.gh-issue-146169.RBF1xp.rst Outdated
Comment threadMisc/NEWS.d/next/Library/2026-03-28-10-27-46.gh-issue-146169.RBF1xp.rst Outdated
Comment threadLib/test/test_pyexpat.py Outdated
@picnixz
picnixz requested a review from hartworkApril 12, 2026 16:00

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

@picnixz probably good to merge by now(, I lack permissions to approve).

@picnixz

Copy link
Copy Markdown
MemberAuthor

Thanks! I've left my dev session so I'll merge it tomorrow. Thanks for the review! I'll also address the encoding issue separately

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsBot added the stale Stale PR or inactive for long period of time. label May 18, 2026
@serhiy-storchakaserhiy-storchaka added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 30, 2026
@github-actionsgithub-actionsBot removed the stale Stale PR or inactive for long period of time. label Jun 3, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core reviewneeds backport to 3.13bugs and security fixesneeds backport to 3.14bugs and security fixesneeds backport to 3.15pre-release feature fixes, bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@picnixz@hartwork@serhiy-storchaka