.
D 2000-10-26T05:10:48
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s4215\sBug\nVersion:\s8.2.2\nSubmitDate:\s'2000-02-22'\nLastModified:\s'2000-10-25'\nSeverity:\sMED\nStatus:\sUnAssn\nSubmitter:\stechsupp\nOS:\sAll\nOSVersion:\sIrix\s6.2/6.4/6.56,\sRedhat\sLinux\s6.1\nMachine:\sSGI\sOctane,\sDell\sPentium\sIII\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-10-25'\n\n\nName:\nByron\sBiggs\n\nExtensions:\ntk,\sBLT,\sdp,\stclX,\sTktable,\sitcl,\sexpect,\simg\n\nCustomShell:\nplus\spatch\n\nObservedBehavior:\nOn\sIrix\s(SGI),\sTcl\spackages\swritten\sin\sC\sare\slinked\sby\sdefault\swith\s"-rdata_shared",\swhich\sputs\sstring-literal\sdata\sinto\sread-only\smemory.\s\sIf\sa\scall\sis\sthen\smade\sto\sTcl_Eval()\spassing\sstring\sliteral\sdata,\sthe\sinterpreter\score\sdumps\sbecause\sTcl_Eval\scalls\sTcl_ParseCommand(),\swhich\sthen\stries\sto\smodify\sthe\sstring.\s\sThe\soffending\sline\sis:\n\n\s\s\s\s/*\n\s\s\s\s\s*\sTemporarily\soverwrite\sthe\scharacter\sjust\safter\sthe\send\sof\sthe\n\s\s\s\s\s*\sstring\swith\sa\s0\sbyte.\s\sThis\sacts\sas\sa\ssentinel\sand\sreduces\sthe\n\s\s\s\s\s*\snumber\sof\splaces\swhere\swe\shave\sto\scheck\sfor\sthe\send\sof\sthe\n\s\s\s\s\s*\sinput\sstring.\s\sThe\soriginal\svalue\sof\sthe\sbyte\sis\srestored\sat\n\s\s\s\s\s*\sthe\send\sof\sthe\sparse.\n\s\s\s\s\s*/\n\n\s\s\s\ssavedChar\s=\sstring[numBytes];\n\s\s\s\sif\s(savedChar\s!=\s0)\s{\n>>>\s\s\s\s\sstring[numBytes]\s=\s0;\n\s\s\s\s}\n\nSimilar\sbehavior\sis\sobserved\son\sRedhat\sLinux.\s\sThe\sworkaround\sis\sto\snot\scompile\sTcl\spackages\swith\s-rdata_shared\son\sIrix,\sor\sto\sadd\s-fwritable-strings\sto\sgcc\son\sLinux.\n\nNote\sthat\sthe\sBLT\spackage\salso\sis\scompiled\sby\sdefault\swith\s-rdata_shared/without\s-fwritable-strings,\sand\sthis\scode\scontains\scalls\sto\sTcl_Eval()\swhich\spass\sstring\sliteral\sdata.\n\nDesiredBehavior:\nTcl_Eval(interp,"mycommand")\sshould\snot\score\sdump\swhen\sused\sin\spackages\scompiled\swith\sthe\sdefault\scompile\soptions.\n\n\n\n
J foundin obsolete:\s8.2.2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 69.\sOther
J title Tcl_Eval()\score\sdumps\sif\spassed\sa\sstring\sliteral\sscript
J type Bug
K 219328ffffffffffffffffffffffffffffffffff
U nobody
Z f7ffa79a454afceee909c46a8f8996ba