应该如何处理在 IO 操作时触发的新 Tcl 断言(在 8.5.18 中引入)?

How should one deal with a new Tcl assertion (introduced in 8.5.18) that fires upon an IO operation?

我们基于 Tcl 的 Web 应用程序(OpenACS、NaviServer)提供了上传和提取 ZIP 档案的功能。升级到最新版本的 Tcl (8.5.18) 后,服务器现在在处理提取的存档内容时崩溃并吐出此错误。

nsd: /usr/local/src/tcl/tcl8.5.18/unix/../generic/tclIO.c:5395: DoReadChars: Assertion `!((statePtr)->flags & ((1<<9))) || ((statePtr)->flags & ((1<<10))) || Tcl_InputBuffered((Tcl_Channel)chanPtr) == 0' failed.

此断言已在 Tcl 8.5.17 和 8.5.18 之间引入。断言是否错误或过于严格,或者这是否暗示了应用程序级别的某种形式的错误?

事实证明,我 运行 陷入了一个已知错误,该错误已于 2015 年 4 月修复 (http://core.tcl.tk/tcl/info/879a0747bee593e2). When Tcl 8.5.19 is released, using that will make my troubles go away. Before that, one can work from Tcl development sources, or try the patch in isolation (http://core.tcl.tk/tcl/info/4b964e7afb811898)。