GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Data race on `event_tstate` in `_tkinter.c` under free-threading · Issue #153020 · python/cpython Open Labels extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-free-threadingtopic-tkintertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:
A torn read of CodeWrite site (no lock): // Modules/_tkinter.c, EnableEventHook, ~line 3545 event_tstate = tstate; Read site (under tcl_lock only): // Modules/_tkinter.c, EventHook, ~line 3507 Py_BEGIN_ALLOW_THREADS if(tcl_lock) PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = event_tstate; // racy read result = Tcl_DoOneEvent(TCL_DONT_WAIT); tcl_tstate = NULL; if(tcl_lock) PyThread_release_lock(tcl_lock); ... Py_END_ALLOW_THREADS The write in Suggested fix// Write site _Py_atomic_store_ptr(&event_tstate, tstate); // Read site tcl_tstate = _Py_atomic_load_ptr(&event_tstate); CPython versions tested on:CPython main branch Operating systems tested on:Linux, macOS Linked PRsActivity
MetadataMetadataAssigneesLabelsextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-free-threadingtopic-tkintertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |