<i>[try] interaction with local variable names produces segmentation fault</i>.
by
.
D 2019-04-08T09:38:22.323
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment The\sfollowing\sscript\sproduces\sa\ssegmentation\sfault:\r\n\r\n<code><verbatim>\r\nproc\smain\s{}\s{\r\n\s\s\s\seval\s{\r\n\s\s\s\s\s\s\s\stry\s{\r\n\s\s\s\s\s\s\s\s\s\s\s\slindex\s5\r\n\s\s\s\s\s\s\s\s}\son\sok\sres\s{}\s\r\n\s\s\s\s}\r\n\s\s\s\sputs\s$res\r\n}\r\nmain\r\n</verbatim></code>\r\n\r\nThe\sissue\sis:\s\r\n\r\n\s\s\s\s[https://core.tcl.tk/tcl/artifact?udc=1&ln=4814&name=7abc6eff76e59d6d|tclCmdMZ.c:TryPostBody]\r\n\s\s\s\sextracts\sa\svariable\sname\sfrom\sa\s<code>Tcl_Obj</code>,\scausing\sa\slist\r\n\s\s\s\sinternal\srepresentation\sto\sbe\screated\son\sthat\s<code>Tcl_Obj</code>,\sand\sthe\r\n\s\s\s\soriginal\svalue\sof\sthat\s<code>Tcl_Obj</code>\sto\sbecome\sthe\sfirst\sitem\sin\sthe\r\n\s\s\s\slist,\swith\sa\s<code>refCount</code>\sof\s1.\r\n\r\n\s\s\s\sOn\sthe\snext\sline,\s<code>Tcl_ObjSetVar2</code>\sis\scalled,\sand\r\n\s\s\s\s[https://core.tcl.tk/tcl/artifact?udc=1&ln=738&name=f5bfe8cd3b7e5fd8|TclObjLookupVarEx]\r\n\s\s\s\ssubsequently\sobtains\sthat\ssame\s<code>Tcl_Obj</code>\sfrom\sthe\scache\sof\slocal\r\n\s\s\s\svariable\snames\sand\sfrees\sthat\ssame\slist\sinternal\srepresentation.\r\n\r\n\s\s\s\sAt\sthis\spoint,\s<code>part1Ptr</code>\sis\sa\sreference\sto\sthat\sfreed\r\n\s\s\s\s<code>Tcl_Obj</code>.
J foundin core-8-branch
J is_private 0
J login pooryorick
J priority 5\sMedium
J resolution None
J severity Minor
J status Open
J submitter pooryorick
J subsystem 18.\sCommands\sM-Z
J title [try]\sinteraction\swith\slocal\svariable\snames\sproduces\ssegmentation\sfault
J type Bug
K 45b9faf103f2fd0f7c4a69606b358bb68dbd2596
U pooryorick
Z a1a357db041eae5b6ee386c7d4975591