| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Concurrent _tkinter.create() raced Tcl's first-time library init and could double-free tcl_lock on the free-threaded build.
The c-globals checker rejects non-constant module-level globals, but allows local static mutexes used to wrap non-thread-safe C APIs.
| Back | FazBrowse Home | New Git URL |
Fixes #154923
On the free-threaded build, concurrent _tkinter.create() calls raced Tcl's first-time library initialization (a TSan data race on a lazily created Tcl mutex) and could also double-free the module-global tcl_lock.
Serialize Tcl_CreateInterp() and the one-time tcl_lock free behind a dedicated mutex. tcl_lock itself cannot be used for this because it is discarded once Tcl is threaded. Add a subprocess regression test so the first CreateInterp has not already run.
This does not touch the event_tstate path in #153020.