Skip to content
Tcl Source Code Artifact [b70eadd96a]
Login

Artifact [b70eadd96a]

Artifact b70eadd96a0167a8e2565d1ef251c1681c0f099f:

Ticket change [b70eadd96a] - New ticket [2415422fffffffff|2415422fff] <i>TclExecuteByteCode assert fail after {*}longlist</i>. by andygoth on 2008-12-11 01:06:44.
D 2008-12-11T01:06:44
J assignee msofer
J cmimetype text/plain
J comment The\sfollowing\scode\n\nproc\snop\s{}\s{}\nproc\scrash\s{}\s{\n\s\s\s\sforeach\sval\s[list\s{*}[lrepeat\s1781\sx]]\s{\n\s\s\s\s\s\s\s\snop\n\s\s\s\s}\n}\ncrash\n\nresults\sin\san\sassertion\sfailure:\n\ntclsh:\s/home/users/td26063/build/tcl8.6a3/unix/../generic/tclExecute.c:2047:\sTclExecuteByteCode:\sAssertion\s`(((Interp\s*)\sinterp)->cmdFramePtr\s==\sbcFramePtr)'\sfailed.\n\nwith\sbacktrace:\n\n#0\s\s0x0048d7a2\sin\s_dl_sysinfo_int80\s()\sfrom\s/lib/ld-linux.so.2\n#1\s\s0x00128825\sin\sraise\s()\sfrom\s/lib/tls/libc.so.6\n#2\s\s0x0012a289\sin\sabort\s()\sfrom\s/lib/tls/libc.so.6\n#3\s\s0x00121da1\sin\s__assert_fail\s()\sfrom\s/lib/tls/libc.so.6\n#4\s\s0x00885756\sin\sTclExecuteByteCode\s(interp=0x80688e0,\scodePtr=0x808c230)\n\s\s\s\sat\s/home/users/td26063/build/tcl8.6a3/unix/../generic/tclExecute.c:2047\n#5\s\s0x0082fa2c\sin\sNRCallTEBC\s(data=0x807dd2c,\sinterp=0x80688e0,\sresult=0)\n\s\s\s\sat\s/home/users/td26063/build/tcl8.6a3/unix/../generic/tclBasic.c:4292\n#6\s\s0x0082f789\sin\sTclNRRunCallbacks\s(interp=0x80688e0,\sresult=0,\srootPtr=0x0,\n\s\s\s\stebcCall=0)\n\s\s\s\sat\s/home/users/td26063/build/tcl8.6a3/unix/../generic/tclBasic.c:4208\n#7\s\s0x0082f3de\sin\sTcl_EvalObjv\s(interp=0x80688e0,\sobjc=1,\sobjv=0x80691b0,\n\s\s\s\sflags=2097152)\n\s\s\s\sat\s/home/users/td26063/build/tcl8.6a3/unix/../generic/tclBasic.c:3991\n#8\s\s0x00830dd3\sin\sTclEvalEx\s(interp=0x80688e0,\n\s\s\s\sscript=0x8080960\s"proc\snop\s{}\s{}\\nproc\scrash\s{}\s{\\n\s\s\s\sforeach\sval\s[list\s{*}[lrepeat\s1781\sx]]\s{\\n\s\s\s\s\s\s\s\snop\\n\s\s\s\s}\\n}\\ncrash\\n",\snumBytes=102,\sflags=0,\n\s\s\s\sline=7)\n\s\s\s\sat\s/home/users/td26063/build/tcl8.6a3/unix/../generic/tclBasic.c:5085\n#9\s\s0x0083050e\sin\sTcl_EvalEx\s(interp=0x80688e0,\n\s\s\s\sscript=0x8080960\s"proc\snop\s{}\s{}\\nproc\scrash\s{}\s{\\n\s\s\s\sforeach\sval\s[list\s{*}[lrepeat\s1781\sx]]\s{\\n\s\s\s\s\s\s\s\snop\\n\s\s\s\s}\\n}\\ncrash\\n",\snumBytes=102,\sflags=0)\n\s\s\s\sat\s/home/users/td26063/build/tcl8.6a3/unix/../generic/tclBasic.c:4786\n#10\s0x008b81f0\sin\sTcl_FSEvalFileEx\s(interp=0x80688e0,\spathPtr=0x807e4c0,\n\s\s\s\sencodingName=0x0)\n\s\s\s\sat\s/home/users/td26063/build/tcl8.6a3/unix/../generic/tclIOUtil.c:1757\n#11\s0x008c03a6\sin\sTcl_Main\s(argc=-1,\sargv=0xbfe96a2c,\n\s\s\s\sappInitProc=0x804868b\s<Tcl_AppInit>)\n\s\s\s\sat\s/home/users/td26063/build/tcl8.6a3/unix/../generic/tclMain.c:442\n#12\s0x0804867e\sin\smain\s(argc=2,\sargv=0xbfe96a24)\n\s\s\s\sat\s/home/users/td26063/build/tcl8.6a3/unix/../unix/tclAppInit.c:87\n\nTcl\sdoesn't\scrash\swhen\sthe\srepeat\scount\sis\sreduced\sto\s1780\sor\sless.\s\sTcl\sDOES\scrash\swhen\s"x"\sis\sreplaced\swith\s"",\sso\sthe\sstring\slength\sdoesn't\sseem\sto\shave\sanything\sto\sdo\swith\sit.\n\nTcl\sdoesn't\scrash\swhen\snop's\sdefinition\sis\schanged\sto\s"proc\snop\s{args}\s{}",\ssince\sthe\sbytecode\scompiler\soptimizes\sthat\sto\sa\strue\sno-op.\s\sTcl\salso\sdoesn't\scrash\swhen\snop\sis\sremoved\sfrom\sthe\sloop,\seven\sif\sit\sis\sreplaced\swith\s"puts\smoo"\sor\sany\sother\scombination\sof\scommand\s(not\sproc!)\sinvocations.\n\nTcl\sdoesn't\scrash\swhen\sthe\sloop\sis\schanged\sto\s"foreach\sval\s[lrepeat\s1781\sx]\s{nop}",\sso\sit\sis\scritical\sthat\s{*}\sexpansion\stake\splace.\n\nTcl\sdoesn't\scrash\swhen\sthe\sloop\sis\sreplaced\swith\ssome\sother\sstructure,\sfor\sexample:\n\nproc\snop\s{}\s{return\s1}\nproc\scrash\s{}\s{\n\s\s\s\sif\s{[llength\s[list\s{*}[lrepeat\s1781\s""]]]}\s{\n\s\s\s\s\s\s\s\snop\n\s\s\s\s}\n}\ncrash\n\nso\sit\sappears\sthat\s[foreach]\salso\shas\sa\shand\sin\sthis.\s\sTcl\sDOES\scrash\swhen\sadditional\scontrol\sstructures\sare\sput\saround\sthe\scall\sto\snop,\sfor\sexample:\n\nproc\snop\s{}\s{}\nproc\scrash\s{}\s{\n\s\s\s\sforeach\sval\s[list\s{*}[lrepeat\s1781\s""]]\s{\n\s\s\s\s\s\s\s\sforeach\sfoo\s{1\s2\s3}\s{nop}\n\s\s\s\s}\n}\ncrash\n\nThe\snumber\s1781\smay\sbe\smagic\sonly\sfor\smy\sparticular\scomputer\sand\sarchitecture.\s\sHere's\sthe\soutput\sof\suname\s-a:\n\nLinux\sARL020474LX\s2.6.9-78.0.5.ELsmp\s#1\sSMP\sWed\sOct\s8\s07:12:03\sEDT\s2008\si686\si686\si386\sGNU/Linux\n\nThe\ssystem\shas\stwo\s2.8GHz\sPentium\s4\sCPUs\sand\sone\sgigabyte\sof\sRAM.
J foundin obsolete:\s8.6a3
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter andygoth
J subsystem 45.\sParsing\sand\sEval
J title TclExecuteByteCode\sassert\sfail\safter\s{*}longlist
J type Bug
K 2415422fffffffffffffffffffffffffffffffff
U andygoth
Z 6317e2e01658a3912d5bc696517b922f