]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-67877: Fix memory leaks in terminated RE matching (GH-126840) (GH-126961)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 18 Nov 2024 11:24:13 +0000 (13:24 +0200)
committerGitHub <noreply@github.com>
Mon, 18 Nov 2024 11:24:13 +0000 (11:24 +0000)
commit8eb25faed706de41bd6965efbb15d04b5715ed48
treefd71d3e5e8ca69c69549ed6d4229409b5bb2a868
parent9d986d9477b55004901f840ca0418ab302789d35
[3.12] gh-67877: Fix memory leaks in terminated RE matching (GH-126840) (GH-126961)

If SRE(match) function terminates abruptly, either because of a signal
or because memory allocation fails, allocated SRE_REPEAT blocks might
be never released.

(cherry picked from commit 7538e7f5696408fa0aa02fce8a413a7dfac76a04)
Lib/test/test_re.py
Misc/NEWS.d/next/Library/2024-11-14-22-25-49.gh-issue-67877.G9hw0w.rst [new file with mode: 0644]
Modules/_sre/clinic/sre.c.h
Modules/_sre/sre.c
Modules/_sre/sre.h
Modules/_sre/sre_lib.h