: <i>tcl crash on channel thread transfer and fileevent writable in place</i> plus 5 other changes
by
.
D 2026-10-13T14:52:56.590
J foundin 8.6.18,\s9.0.5,\s9.1.0
J icomment Not\sfixed:\sthe\sscript\sin\sthe\sdescription\sstill\spanics\swith\s"Channel\sreleased\nmore\sthan\spreserved":\son\sLinux\sin\s6\sof\s10\sruns\swith\s9.0\sand\s4\sof\s5\swith\s9.1\n(Thread\s3.0.4)\sand\s5\sof\s5\swith\s8.6.17\s(Thread\s2.8.12),\son\sWindows\s11\sin\s10\sof\n10\sruns\swith\s9.1\s(Thread\s3.0.7)\sand\s3\sof\s10\swith\s8.6\s(Thread\s2.8.13).\sThe\sfix\nin\sbranch\sfix-815e246806-8-6\s(atomic\sreference\scount\sof\schannels)\swas\snever\nmerged.\n\nProposed\sfix\sin\sbranch\s[/timeline?r=channel-refcount-thread-safe|channel-refcount-thread-safe]:\nprotect\sthe\sreference\scount\sof\schannels\swith\sa\smutex.\sTest\sthread-9.1.\n\nUnlike\sthe\searlier\sfix,\sit\suses\sa\smutex\srather\sthan\satomic\soperations:\sit\sneeds\nno\scompiler-specific\sbuiltins,\sso\sit\sworks\swith\severy\scompiler\sand\splatform\sTcl\nsupports,\sand\sit\salso\scovers\sthe\scompound\soperations,\swhere\sthe\scount\sis\nchecked\stogether\swith\sthe\sclosed\sstate\sof\sthe\schannel\sbefore\sfreeing\sit.\sThe\ncost\sis\sone\suncontended\slock\sper\spreserve/release.
J login serhiy.storchaka
J mimetype text/x-fossil-wiki
J resolution None
J status Open
K 815e2468064b4324bc4b303b9bafd3ef92803c32
U serhiy.storchaka
Z 0e53f3fa5650f4d3cbc129a2cd46d4f6