]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-83274: Don't crash when a Tcl interpreter is deallocated in the wrong threa...
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 7 Jul 2026 16:35:47 +0000 (19:35 +0300)
committerGitHub <noreply@github.com>
Tue, 7 Jul 2026 16:35:47 +0000 (16:35 +0000)
commit918b82a15f167bbbc222379b0b584699c05c7bfc
treed2d5cbba7859065bd5b455d85ab4182c09161241
parentf7eae635c7b8480497006d9b6d3a60dd33b8b2bd
[3.13] gh-83274: Don't crash when a Tcl interpreter is deallocated in the wrong thread (GH-152323) (GH-153278)

Deallocating the interpreter from a thread other than the one it was created
in ran Tcl_DeleteInterp() there, which makes Tcl abort the process
("Tcl_AsyncDelete: async handler deleted by the wrong thread").

Tkapp_Dealloc() now leaks the interpreter in that case and reports a
RuntimeWarning instead.

(cherry picked from commit 46d1809ccd4bc0e1439a4696b428d2a1c2edcfbf)

Co-authored-by: E. Paine <63801254+E-Paine@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Lib/test/test_tkinter/test_misc.py
Misc/NEWS.d/next/Library/2026-06-26-16-30-00.gh-issue-83274.Kx9mQv.rst [new file with mode: 0644]
Modules/_tkinter.c