Skip to content
Tcl Source Code Artifact [a7e9939e71]
Login

Artifact [a7e9939e71]

Artifact a7e9939e719b733482aeeaa40c5176869a5fdee9:

Ticket change [a7e9939e71] - New ticket [2960021fffffffff|2960021fff] <i>&quot;string first&quot; command on large string segfaults</i>. by blacksqr on 2010-02-27 06:47:17.
D 2010-02-27T06:47:17
J assignee dkf
J cmimetype text/plain
J comment When\sthe\s"needleString"\sargument\sto\sa\s"string\sfirst"\scommand\sis\svery\slarge,\sa\ssegmentation\sfault\swill\sresult.\n\nIt\sis\seasy\sto\sswitch\sthe\s"needleString"\sand\sthe\s"haystackString"\sby\smistake\sin\sthe\s"string\sfirst"\scommand,\sand\sthus\sencounter\sthis\sbug.\s\sMistake\snotwithstanding,\sthe\scommand\sis\sstill\ssyntactically\scorrect,\sand\sone\sshould\sexpect\sa\s"-1"\sas\sa\sreturn\svalue.\n\nTo\sreplicate,\ssimply\sexecute\sthe\sfollowing\sprocedure:\n\nproc\sstring_first_bug\s{}\s{\nset\sline\sxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nfor\s{set\si\s0}\s{$i\s<\s1048547}\s{incr\si}\s{\nappend\slargeString\s$line\\n\n}\nset\sline_\s[string\sfirst\s$largeString\s\\n]\n}\n\nActiveTcl\s8.5.8\son\sUbuntu\sIntrepid.
J foundin obsolete:\s8.5.8
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter blacksqr
J subsystem 18.\sCommands\sM-Z
J title "string\sfirst"\scommand\son\slarge\sstring\ssegfaults
J type Bug
K 2960021fffffffffffffffffffffffffffffffff
U blacksqr
Z 69e3d79e5cdcb88ef163577c7afcaaec