.
D 2000-10-26T01:08:41
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s3339\sBug\nVersion:\s8.2.1\nSubmitDate:\s'1999-11-05'\nLastModified:\s'1999-12-09'\nSeverity:\sMED\nStatus:\sReleased\nSubmitter:\stechsupp\nChangedBy:\shobbs\nRelatedBugIDs:\s2551\nOS:\sLinux-Red\sHat\nFixedDate:\s'1999-12-09'\nFixedInVersion:\s8.3b1\nClosedDate:\s'2000-10-25'\n\n\nName:\nJean-Luc\sFontaine\n\nComments:\nbug\salso\spresent\sin\s8.0\sand\s8.1\sreleases\n\nReproducibleScript:\nnamespace\seval\sn\s{\n\s\s\s\s\s\s\s\sproc\sp\s{}\s{\n\s\s\s\s\s\s\s\s\s\s\s\svariable\s{}\n\s\s\s\s\s\s\s\s\s\s\s\sset\s(0)\s0\n\s\s\s\s\s\s\s\s\s\s\s\sset\s(1)\s1\n\s\s\s\s\s\s\s\s\s\s\s\sset\sn\s2\n\s\s\s\s\s\s\s\s\s\s\s\sset\s($n)\s2\n\s\s\s\s\s\s\s\s\s\s\s\sset\s($n,foo)\s2\n\s\s\s\s\s\s\s\s}\n\s\s\s\s\s\s\s\sp\n\s\s\s\s\s\s\s\sparray\s{}\n\s\s\s\s}\n\nObservedBehavior:\nouput:\n\s\s\s\s(0)\s\s\s\s\s=\s0\n\s\s\s\s(2,foo)\s=\s2\n\nDesiredBehavior:\noutput:\n\s\s\s\s(0)\s\s\s\s\s=\s0\n\s\s\s\s(1)\s\s\s\s\s=\s1\n\s\s\s\s(2)\s\s\s\s\s=\s2\n\s\s\s\s(2,foo)\s=\s2\n\n\n\nMore\sinfo\sfrom\sJean-Luc:\n\nI\sfound\swhat\shappened\sin\stclCompile.c,\sTclFindCompiledLocal():\s\n\n...\nfor\s(i\s=\s0;\s\si\s<\slocalCt;\s\si++)\s{\n\s\sif\s(!TclIsVarTemporary(localPtr))\s{\n\s\s\s\schar\s*localName\s=\slocalPtr->name;\n\s\s\s\sif\s((name[0]\s==\slocalName[0])\n\s\s\s\s\s\s&&\s(nameBytes\s==\slocalPtr->nameLength)\n\s\s\s\s\s\s&&\s(strncmp(name,\slocalName,\s(unsigned)\snameBytes)\s==\s0))\s{\n\s\s\s\s\s\s\s\sreturn\si;\n\s\s\s\s}\n\s\s}\n\s\slocalPtr\s=\slocalPtr->nextPtr;\n}\n...\nFor\sthe\sfollowing\sTcl\ssource\scode:\s\nnamespace\seval\sn\s{proc\sp\s{}\s{variable\s{};\sset\s(a)\s0;\sset\s(b)\s1}}\nif\swe\slook\sat\swhat\shappens\sat\sthe\sfollowing\sline:\s\n\s\s\s\sif\s((name[0]\s==\slocalName[0])\nFor\s(a),\sname\sis\s"(a)\s0;\sset\s(b)\s1"\sand\swe\snever\sget\sthere,\swhich\sis\snormal\ssince\sthe\s{}\sarray\sis\snot\syet\sallocated.\sFor\s(b),\sname\sis\s"(b)\s1"\sand\ssince\slocalName\sis\s""\s(empty\sname\sarray\sallocated\sat\sthe\s(a)\soccurence),\scomparing\sthe\sfirst\scharacters\s('('\sand\s'\\0')\sis\swrong.\sThe\sfix\sconsists\sin\sremoving\sthe\stest\son\sthe\sfirst\sbyte.\s\n\n-----\n\nThis\sis\scorrect,\sthat\sslight\sopt\sbreaks\sthe\s{}\sarray\sname\scase,\nand\sis\scovered\sby\sthe\sstrncmp.\s\n--\s12/09/1999\shobbs\n\n
J foundin obsolete:\s8.2.1
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 07.\sVariables
J title empty\sname\sarray\ssetting\sfailure\swithin\snamespace\sprocedure
J type Bug
K 218965ffffffffffffffffffffffffffffffffff
U nobody
Z 4cfa449a36c4534d2273265e1c90b0e1