]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] 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:57:19 +0000 (19:57 +0300)
committerGitHub <noreply@github.com>
Tue, 7 Jul 2026 16:57:19 +0000 (16:57 +0000)
commit406208a1e277539fef370c738d48e89b84c1c993
treedb6233c04d9f56faa750175f95f06a4512aa5c9d
parent97a45b0d000ec9e13291bf70dd59c3b8d68fde80
[3.14] gh-83274: Don't crash when a Tcl interpreter is deallocated in the wrong thread (GH-152323) (GH-153277)

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