]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-83274: Don't crash when a Tcl interpreter is deallocated in the wrong thread ...
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 27 Jun 2026 21:26:11 +0000 (00:26 +0300)
committerGitHub <noreply@github.com>
Sat, 27 Jun 2026 21:26:11 +0000 (00:26 +0300)
commit46d1809ccd4bc0e1439a4696b428d2a1c2edcfbf
treebbe5889685b4bf7cad89b4f24a380a006d3b09f2
parent8107c53f0f9f54e71dbdc4fde8f6cda5b3ef800c
gh-83274: Don't crash when a Tcl interpreter is deallocated in the wrong thread (GH-152323)

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.

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