Tcl Source Code

Artifact [1bd98c743c]
Login

Artifact 1bd98c743c1f5d8e442bee8ecb3e6d87d2a30be0:

Ticket change [1bd98c743c] - New ticket [272e866f1e] Crash when reading a file of e.g 1.1 GB. by gustafn 2013-11-12 19:05:42.
D 2013-11-12T19:05:42.845
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment When\sreading\sa\sfile\swith\se.g.\s1.1\sGB\svia\r\n\r\n\s\s\sset\scontent\s[read\s$f]\r\n\r\nTcl\scrashes\sdue\sto\sthe\sdoubling\spolicy\sof\sreallocs\son\smachines\swhere\ssizeof(int)\s==\s32\s(which\sis\sas\swell\sthe\scase\son\s64\sbit\sLinux).\sDue\sto\sdoubling\sthe\slength\sof\sthe\sbuffer,\sthe\slength\svariable\sof\stype\s"int"\sbecomes\snegative\son\svalues\slarger\sthan\s1GB.\sWhile\sone\scan\sdiscuss\sthe\susefulness\sof\sreading\slarge\sfiles\sinto\smemory,\sthe\ssituation\scan\sbe\simproved\squite\seasily\sby\slimiting\sthe\sdoubling\spolicy\sto\s2GB\s(actually\sINT_MAX).\r\n\r\nThe\sproblem\shappened\sin\sa\sTcl-based\szip-file\sgenerator,\swhen\sthe\ssize\sof\sa\ssingle\sfile\sis\slarger\sthan\s1.x\sGB.\sA\ssample\spatch\sis\savailable\s(I\sassume\si\scan\sattach\sthe\spatch\safter\swriting\sthe\sticket).\sMost\sprobably\sthere\sare\smore\splaces\sin\sTcl,\swhere\sa\ssimilar\spatch\smight\sbe\suseful.
J foundin 8.5.15
J is_private 0
J login gustafn
J priority 5\sMedium
J private_contact d0ad4471e07e8c03bf0d90786ec6d31e33bcf241
J resolution None
J severity Severe
J status Open
J submitter gustafn
J subsystem 25.\sChannel\sSystem
J title Crash\swhen\sreading\sa\sfile\sof\se.g\s1.1\sGB
J type Bug
K 272e866f1ec0af1927a7899a81b1c58395832096
U gustafn
Z 6e4536409ebe16e14f01cf7c905a6f9a