.
D 2008-02-21T21:55:45
J assignee andreas_kupries
J cmimetype text/plain
J comment \nThe\simplementation\sof\sTcl_ExprObj()\ntries\sto\sdetect\swhen\sthe\sTcl_Obj\npassed\sin\sis\sa\sPRECOMPILED\s"bytecode"\nvalue,\sand\sthen\svalidate\sinterps\sand\nforgive\sany\sepoch\sexpiration\sbefore\nexecuting\sthe\sbytecode.\n\nThis\sis\sincorrect,\sbecause\sa\sPRECOMPILED\nvalue\shas\sbeen\scompiled\sas\sa\sscript\sto\nproduce\sthe\sbytecode,\sand\sthat\sbytecode\nis\snot\sa\svalid\sset\sof\sinstructions\sto\ninterpret\sthe\ssame\sstring\sas\san\sexpression.\n([eval\s{0}]\sand\s[expr\s{0}]\sare\sdifferent!)\n\nWorse\sstill,\sthe\scleanup\sstages\sat\sthe\nend\sof\sTcl_ExprObj()\swill\sfree\sthe\sbytecode,\nand\ssince\sPRECOMPILED\svalues\ssuppress\sthe\noriginal\sstring\srep.,\sthe\soriginal\sbytecode\nwill\sbe\slost\swith\sno\sway\sto\srecover\sit.\n\nAttached\sis\sa\spatch\sto\smake\sTcl_ExprObj()\ndo\sthe\sonly\ssensible\sthing\s--\sraise\san\nerror.\n\nNo\sone\shas\snoticed\sthis,\sprobably\sbecause\nit\sappears\sdifficult\sand\sunnatural\sto\npass\sa\sPRECOMPILED\svalue\sto\sTcl_ExprObj(),\npossibly\seven\srequiring\sinternals\sintrusion\nto\saccomplish\sit.\n\nIf\sthere's\sa\sway\sto\screate\sa\stest\scase\sfor\nthis\swith\sreasonable\seffort\sin\seither\sthe\nTcl\sor\sthe\stbcload\stest\ssuite,\sI'd\sappreciate\nthat\scontribution.\s\sOtherwise,\sjust\sreview\nand\scommit\sthis\sfix\splease.\n
J foundin obsolete:\s8.5.1
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter dgp
J subsystem 47.\sBytecode\sCompiler
J title Tcl_ExprObj\sand\sPRECOMPILED\sscripts
J type Bug
K 1899164fffffffffffffffffffffffffffffffff
U dgp
Z e19320525652d41075d9553a11178c68