Tcl Library Source Code

View Ticket
Login
Ticket UUID: 1014795
Title: tcl crashes when I b64 encode files
Type: Bug Version: None
Submitter: lucianoes Created on: 2004-08-23 23:12:51
Subsystem: base64 Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Open Last Modified: 2004-08-23 23:12:51
Resolution: None Closed By:
    Closed on:
Description:
I have a few files I want to encode into base64. Some are small, others are around 4 or 5 Mb. It takes so long to encode the large ones that I just kill the process and give up.

But my attention caught the fact that one particular file always crasheed wish or tclsh. It is a 4,731,340-byte ZIP file. The file is OK, I can open it like any other. Whenever I try to encode it with ::base64::encode, however, I get this window title...

Fatal Error in Wish

... and this error message:

unable to realloc 5857536 bytes

It also occurs with tclsh, except for the "Fatal Error in Wish" title, of course.

So I went after a few 4 or 5-Mb zip files in my disk, did some more testing and saw that roughly 7 out of every 10 files make wish.exe crash.

Intrigued by the "5857536" figure, I went after bigger files: 7 Mb, 8 Mb, 15 Mb, 24 Mb and 65 Mb. About 10 of them. Sometimes I get a different figure, "9326961" appeared twice, but "5857536" still is the most frequent one.

I stil can use Cygwin-based b64.exe. No problems with that one.

Now I am using ActiveTcl 8.4.7, but I also saw the problem in 8.4.6.

My OS is Windows 98 SE.