]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-140067: Fix memory leak in sub-interpreter creation (#140111)
authorShamil <ashm.tech@proton.me>
Tue, 14 Oct 2025 14:42:17 +0000 (17:42 +0300)
committerGitHub <noreply@github.com>
Tue, 14 Oct 2025 14:42:17 +0000 (14:42 +0000)
commit59547a251f7069dc6e08cb6082dd21872671e381
tree12ff856d0119a8d3dfd434f3a540aab880cdd4f3
parent07e617ecc274f21607320e68a7e8b09ee91f968b
gh-140067: Fix memory leak in sub-interpreter creation  (#140111)

Fix memory leak in sub-interpreter creation caused by overwriting of the previously used `_malloced` field. Now the pointer is stored in the first word of the memory block to avoid it being overwritten accidentally.

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Include/internal/pycore_interp_structs.h
Misc/NEWS.d/next/Core_and_Builtins/2025-10-14-17-07-37.gh-issue-140067.ID2gOm.rst [new file with mode: 0644]
Python/pystate.c