]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-67877: Fix memory leaks in terminated RE matching (GH-126840)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 18 Nov 2024 09:53:45 +0000 (11:53 +0200)
committerGitHub <noreply@github.com>
Mon, 18 Nov 2024 09:53:45 +0000 (11:53 +0200)
commit7538e7f5696408fa0aa02fce8a413a7dfac76a04
tree80987d19e109f6f6f544972cfdfd415b3248372b
parent3938fd60c0c88891b213097380aeea91a45bcd77
gh-67877: Fix memory leaks in terminated RE matching (GH-126840)

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

Co-authored-by: <wjssz@users.noreply.github.com>
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