Skip to content
Tcl Source Code View Ticket
Login

View Ticket

bad cleanup of channels / encs on exit

Closed / Fixed524674ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2002-03-02 04:30:42
If you set the encoding on a file to an escape 
encoding and then exit before closing that file, Tcl 
doesn't clean up in the right order, and you crash due 
to free memory reads/writes.  A simple example:

lorax [~/build/tcl84a4s] 25 > make shell
% fconfigure stdout -encoding iso2022-jp
% puts ab\u4e4e\u68d9g
ab8CD%g
% exit
make: *** [shell] Error 139

but it can be done with any file.  The sample attached 
can be used for a more "robust" test:

set f [open iso.sample]
fconfigure $f -encoding iso2022-jp
gets $f
exit
hobbsplain2002-03-02 11:30:43
File Added - 18692: iso2022.sample
hobbsplain2002-03-05 04:58:54
Logged In: YES 
user_id=72656

See http://sourceforge.net/tracker/?
func=detail&aid=474358&group_id=10894&atid=310894 for 
resolution (patch in 8.4a4, 8.3.4+).
Log in (anonymous is fine) to add a comment.

Attachments: