Skip to content
Tcl Source Code Artifact [2038282811]
Login

Artifact [2038282811]

Artifact 2038282811a73303048f0db068765a3096e3c51a:

Ticket change [2038282811] - New ticket [218918ffffffffff|218918ffff] <i>regsub commands causes core dump</i>. by nobody on 2000-10-26 01:07:52.
D 2000-10-26T01:07:52
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s2723\sBug\nVersion:\s8.2\nSubmitDate:\s'1999-09-10'\nLastModified:\s'1999-09-10'\nSeverity:\sCRIT\nStatus:\sReleased\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sSunOS\nOSVersion:\sAll\sother\splatforms\sare\saffetced\sas\swell\nMachine:\sSparc\nFixedDate:\s'1999-09-10'\nFixedInVersion:\s8.2.1\nClosedDate:\s'2000-10-25'\n\n\nName:\nWolfgang\sS.\sKechel\n\nComments:\nError\shappens\sonly\swhen\sregsub\scommand\sis\sused\swith\swrong\sreplacement\n\s\s\s\sspec.\n\nReproducibleScript:\nregsub\sscene-\sscene-push\s{win-\\1}\swinproc\n\s\s\s\s\n\s\s\s\sI\sknow\sthis\sspec\sis\swrong,\sbut\sit\sshould\snot\scause\smemory\scorruption\sor\n\s\s\s\score-dumps.\n\s\s\s\sThe\scorrect\scommand\sis:\n\s\s\s\sregsub\s{scene-(.+)}\sscene-push\s{win-\\1}\swinproc;\n\nObservedBehavior:\nThe\scode\sin\sTcl_RegSubObjCmd\sline\s490,\sthe\sindexed\smatch\s1\sis\sused\sin\n\s\s\s\s\s\s\s\ssubStart\s=\sinfo.matches[index].start;\n\s\s\s\s\s\s\s\ssubEnd\s=\sinfo.matches[index].end;\n\s\s\s\sfor\s\\1\sin\sthe\ssubstitution\sspec,\sbut\sthere\sis\snot\sfirst\smatch.\sSo\smemory\n\s\s\s\sis\n\s\s\s\sdereferenced\sthat\sshould\snot\sbe\sreferenced\sand\sa\sportion\sof\sdata\sis\n\s\s\s\sappended\n\s\s\s\sto\sthe\sresult\sthat\shas\snothing\sto\sdo\swith\sthe\scommand\sparameters.\sIt\n\s\s\s\shappens,\n\s\s\s\sthat\sdue\sto\sthe\svalues\sstored\sin\sthe\smemory\sarea\schunk\sof\s80MB\sor\seven\n\s\s\s\slarger\smight\sbe\scopied\sinto\sthe\sresult,\sthe\schunks\smay\sbecome\sto\sbig\sfor\n\s\s\s\smalloc\sand\n\s\s\s\scause\sa\score\sdump.\n\s\s\s\s\n\s\s\s\sinto\sthe\sresult\sor\n\nDesiredBehavior:\nI\sexpect\sthe\sregsub\scommand\sto\sissue\san\serror\swhen\sno\smatch\sfor\sa\s\\Digit\n\s\s\s\sspec\n\s\s\s\sis\spresent\sin\sthe\ssource\sstring\s(like\sEmacs\sdoes\sit)!\n\n\n\nI\shave\sfixed\nthis\sfor\sthe\snext\srelease\sto\sjust\sdefault\sto\snull,\swhich\sis\sthe\ssame\nbehavior\sthat\sPerl\sand\sEmacs\shave.\s\n--\s09/10/1999\shobbs
J foundin obsolete:\s8.2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 69.\sOther
J title regsub\scommands\scauses\score\sdump
J type Bug
K 218918ffffffffffffffffffffffffffffffffff
U nobody
Z 049630b6d51beb3585d4599faf5b3c23