The attached script causes a crash in the Tcl channel subsystem when the application
exits. The cause is that in closing a rechan channel we run script to cleanup.
If the close script closes another channel then TclFinalizeIOSubsystem ends up trying
to cleanup structures that have already been free'd.
I suspect that this may be a Tcl issue in that Tcl should endevour to protect
itself from this. It's possible however that rechan should be stacking channels
rather than containing them in this way but in 8.4 that's not available at the
script level. I thought I'd raise it here first and maybe point andreas kupries
here too.
Note that opening a filesystem channel as the base channel doesn't cause a problem
(eg: set f [open NUL w]) nor does opening a socket. |