.
D 2010-02-12T01:37:32
J icomment Yes.\sFrom\sthe\sinvestigation\s...\n\nConfirmed\sleak\sfor\sCVS\shead\sof\sTcl\sas\swell,\son\slinux.\nRan\sthe\sattached\strial\sscript\sagainst\sa\splain\stclsh,\sand\sa\stclsh\swith\n-DTCL_TIP280\s(*).\nOnly\sthe\slatter\sis\sleaking,\ssee\sthe\sresults\sbelow\n\n(*)\sBoth\scompiled\swith\s--enable-symbols=all\sto\sactivate\sthe\sintegrated\s[memory]\ncommand\sand\sdebugging.\n\nRun\sresults,\splain\sshell\sfirst,\sthe\s#280-enabled\sshell.\n\n/home/andreask/workbench/MemoryLeakExpr/install/tcl84p/bin/tclsh8.4\n8.4.19\n\s\s\s0:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s\s\s76836\n\s\s\s1:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s\s\s76912\n\s\s\s2:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s\s\s76912\n\s\s\s3:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s\s\s76912\n\s\s\s4:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s\s\s76912\n\s\s\s5:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s\s\s76912\n\s\s\s6:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s\s\s76912\n\s\s\s7:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s\s\s76912\n\s\s\s8:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s\s\s76912\n\s\s\s9:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s\s\s76912\n\n/home/andreask/workbench/MemoryLeakExpr/install/tcl84/bin/tclsh8.4\n8.4.19\n\s\s\s0:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s\s\s80966\n\s\s\s1:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s\s313042\n\s\s\s2:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s\s545042\n\s\s\s3:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s\s777042\n\s\s\s4:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s1009042\n\s\s\s5:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s1241042\n\s\s\s6:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s1473042\n\s\s\s7:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s1705042\n\s\s\s8:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s1937042\n\s\s\s9:\s\s\scurrent\sbytes\sallocated\s\s\s\s\s\s2169042\n\nNow\sfocusing\son\sthe\s#280\scode\s...\n\n...\sLater\s...\n\nI\sseem\sto\shave\sidentified\sthe\sleak.\n\nextCmdMapPtr\sin\sthe\sCompileEnv\sstructure\sand\sthe\sadjunct\sstructures\sit\spoints\nto.\n\n*\sAllocated\sin\sTclInitCompileEnv\s(tclCompile.c:827).\n\n*\sHanded\sover\sto\sthe\sinterp->lineBCPtr\sHashTable\sin\sTclInitByteCodeObj\n\s\s(tclCompile.c:772),\scalled\sby\sTclSetByteCodeFromAny\s(tclCompile.c:447).\nBecause\sof\sthis\n\s\schange\sof\sownership\sit\sis\snot\sfreed\sas\spart\sof\sTclFreeCompileEnv(),\sbut\swhen\nthe\s\n\s\sbytecode\sstructure\sis\sreleased,\si.e.\sTclCleanupByteCode\n(tclCompile.c:711-743).\n\n*\sThis\shand-over\sis\showever\sconditional\son\sthe\scompilation\sresult\sbeing\sTCL_OK,\nand\sthat\n\s\sis\snot\sthe\scase\shere.\sThe\sstructure\sis\stherefore\snever\shanded\sover\sto\sa\nbytecode\n\s\sstructure,\sand\snot\sreleased\sat\sthat\spoint\seither.\sLEAK.\n\nTcl\s8.5+\sdo\snot\shave\sthis\sleak\sbecause\sfor\sthem\sbytecode\scompilation\scannot\nfail.\sI.e.\sis\salways\sok,\sand\sthus\sthe\shandover\sis\salways\sdone.\sThis\sis\sbecause\nin\s8.5+\sany\stype\sof\scompilation\sproblem,\si.e.\slike\sbad\ssyntax\sin\san\sexpression\nis\sconverted\sinto\sa\s__runtime__\serror\s(invokation\sof\s[error]\scommand),\sinstead\nof\sfailing\sthe\scompilation\sitself.\n\n
J login andreas_kupries
J mimetype text/plain
J username andreas_kupries
K 2949302fffffffffffffffffffffffffffffffff
U andreas_kupries
Z 6d67cda38e7a24f47beaba40404bc5be