Skip to content

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

Merged
hugovk merged 1 commit intopython:3.14from
miss-islington:backport-6edb2dd-3.14
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 intopython:3.14from
miss-islington:backport-6edb2dd-3.14

Conversation

@miss-islington
Copy link
Contributor

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

  • 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

Loading
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