]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-111784: Fix two segfaults in the elementtree module (GH-113405)
authorKirill Podoprigora <kirill.bast9@mail.ru>
Sun, 24 Dec 2023 08:57:41 +0000 (11:57 +0300)
committerGitHub <noreply@github.com>
Sun, 24 Dec 2023 08:57:41 +0000 (10:57 +0200)
commit894f0e573d9eb49cd5864c44328f10a731852dab
tree76ff0bee26f5bfff45e78f56d61f7a3a7e755acb
parent050783cb37d6a09d8238fa640814df8a915f6a68
gh-111784: Fix two segfaults in the elementtree module (GH-113405)

First fix resolve situation when pyexpat module (which contains expat_CAPI
capsule) deallocates before _elementtree, so we need to hold a strong
reference to pyexpat module to.

Second fix resolve situation when module state is deallocated before
deallocation of XMLParser instances, which uses module state to clear
some stuff.
Misc/NEWS.d/next/Library/2023-12-23-13-10-42.gh-issue-111784.Nb4L1j.rst [new file with mode: 0644]
Modules/_elementtree.c