Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.14] gh-139400: Make sure that parent parsers outlive their subparsers in pyexpat (GH-139403)#139606

Merged
hugovk merged 1 commit into
python:3.14python/cpython:3.14from
miss-islington:backport-6edb2dd-3.14miss-islington/cpython:backport-6edb2dd-3.14Copy head branch name to clipboard
Oct 5, 2025
Merged

[3.14] gh-139400: Make sure that parent parsers outlive their subparsers in pyexpat (GH-139403)#139606
hugovk merged 1 commit into
python:3.14python/cpython:3.14from
miss-islington:backport-6edb2dd-3.14miss-islington/cpython:backport-6edb2dd-3.14Copy head branch name to clipboard

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 5, 2025

Copy link
Copy Markdown
Contributor
  • Modules/pyexpat.c: Disallow collection of in-use parent parsers.

Within libexpat, a parser created via XML_ExternalEntityParserCreate
is relying on its parent parser throughout its entire lifetime.
Prior to this fix, is was possible for the parent parser to be
garbage-collected too early.
(cherry picked from commit 6edb2dd)

Co-authored-by: Sebastian Pipping sebastian@pipping.org

…rs in `pyexpat` (pythonGH-139403)

* Modules/pyexpat.c: Disallow collection of in-use parent parsers.

Within libexpat, a parser created via `XML_ExternalEntityParserCreate`
is relying on its parent parser throughout its entire lifetime.
Prior to this fix, is was possible for the parent parser to be
garbage-collected too early.
(cherry picked from commit 6edb2dd)

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
@hugovk hugovk enabled auto-merge (squash) October 5, 2025 15:40
@hugovk hugovk merged commit 66ca0d9 into python:3.14 Oct 5, 2025
52 checks passed
@bedevere-app

bedevere-app Bot commented Oct 6, 2025

Copy link
Copy Markdown

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

@bedevere-app

bedevere-app Bot commented Oct 6, 2025

Copy link
Copy Markdown

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

hugovk pushed a commit that referenced this pull request Oct 6, 2025
danigm pushed a commit to openSUSE-Python/cpython that referenced this pull request Oct 7, 2025
@miss-islington miss-islington deleted the backport-6edb2dd-3.14 branch January 2, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.