]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-140080: Clear `atexit` callbacks when memory allocation fails during finalization...
authoryihong <zouzou0208@gmail.com>
Wed, 15 Oct 2025 13:49:55 +0000 (21:49 +0800)
committerGitHub <noreply@github.com>
Wed, 15 Oct 2025 13:49:55 +0000 (09:49 -0400)
commita05aece5438409fd76f193c564a34e2ca63e278f
tree55c43ae5dbdd670c15ee0efd821fce09e5ff90ec
parent32c264982ec67460642b907dabc3304019318291
gh-140080: Clear `atexit` callbacks when memory allocation fails during finalization (GH-140103)

This fixes a regression introduced by GH-136004, in which finalization would hang while executing atexit handlers if the system was out of memory.

---------

Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/test_atexit.py
Misc/NEWS.d/next/Core_and_Builtins/2025-10-14-20-18-31.gh-issue-140080.8ROjxW.rst [new file with mode: 0644]
Modules/atexitmodule.c