<i>Concurrent Tcl_Init calls race in Unix locale initialization, causing crashes on OpenBSD</i> status still Open with 3 other changes
by
.
D 2026-10-19T08:24:00.761
J icomment Jan.\sBy\slooking\sat\sthe\sreferenced\schange,\sI\sexpect\sit\sto\sprevent\sthe\scrash\sin\sthe\soriginal\sreproducer:\sonce\sinitial\sencoding\ssetup\ssucceeds\sin\sthe\smain\sthread,\ssubsequent\sinterpreter\sinitializations\sno\slonger\senter\sthe\slocale-detection\spath.\s\r\n\r\nHowever,\sthe\schange\sdoes\snot\ssynchronize\sthe\ssetlocale()\s/\snl_langinfo()\ssequence\sitself.\sThe\sinitialEncodingSet\sflag\sis\sunsynchronized,\sand\sdirect\scalls\sto\sTcl_GetEncodingNameFromEnvironment()\sor\sTcl_GetEncodingNameForUser()\sstill\sreach\sthat\ssequence.\r\n\r\nMy\soriginal\spatch\sprotects\slocale\sdetection\sinside\sTcl_GetEncodingNameFromEnvironment(),\sincluding\scopying\sthe\scodeset\swhile\sholding\sthe\slock.\sI\stherefore\sthink\sthe\slocking\sremains\suseful,\seven\sif\sthe\snewer\schange\sremoves\sthe\srepeated-initialization\strigger\sobserved\sin\sNaviServer\sand\sin\sthe\srest\sscript\r\n\r\nOne\sone\sto\sdistinguishing\swhether\sthe\soriginal\sreproducer\spasses\sfrom\swhether\sconcurrent\scalls\sto\sthe\slocale-detection\sAPI\sare\ssafe.
J login gustafn3
J mimetype text/x-markdown
K c35e347c6fb8df66917b1ab6974b3638925b4aa2
U gustafn3
Z 9c24126e2b19f51f0a3acf901eba1a06