You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Data race on event_tstate in _tkinter.c under free-threading #153020
event_tstate in Modules/_tkinter.c is written without synchronization in EnableEventHook() (~line 3545) and read under tcl_lock in EventHook() (~line 3507). _tkinter declares Py_MOD_GIL_NOT_USED, so the GIL no longer serializes these accesses under --disable-gil.
A torn read of event_tstate hands ENTER_PYTHON / PyEval_RestoreThread a dangling or NULL thread state.
Activity
picnixz commentedon Jul 4, 2026
cc @serhiy-storchaka
pythongh-153020: Fix race condition on event_tstate in _tkinter
pythongh-153020: Add NEWS entry for _tkinter data race fix
pythongh-153020: Fix race condition on event_tstate in _tkinter
pythongh-153020: Add NEWS entry for _tkinter data race fix