Overview
| Artifact ID: | b58fe1f764c3dea1000840ac6f88904af806ea7c3c868f513dc81a8229919ce5 |
|---|---|
| Ticket: | c35e347c6fb8df66917b1ab6974b3638925b4aa2
Concurrent Tcl_Init calls race in Unix locale initialization, causing crashes on OpenBSD |
| User & Date: | gustafn3 on 2026-10-20 08:55:06 |
Changes
- icomment:
Thanks, Serhiy ... this resolves the performance aspect. With the successful-initialization guard in place, the locale lock is outside the normal interpreter-creation path, so the concern about repeated synchronization is already addressed there. The combination makes sense to me: avoid repeated initialization once it has succeeded, and protect the locale operations when explicitly reached through the public query functions or during initialization retries. Caching the public-query results would be a separate behavior change and does not seem necessary here. For clarity, my original Tcl 9.1.0 reproducer crashed during concurrent Tcl_Init() calls, without calling [encoding user]. The public-query case demonstrates why locking remains relevant after the initialization change.
- login: "gustafn3"
- mimetype: "text/plain"