<i>Exit reform lost valgrindability</i> status still Open with 4 other changes
by
.
D 2009-12-22T21:24:52
J icomment OK,\sproceeding\sanyway.\nThe\sattached\s'val2'\spatch\sis\sa\ssuperset\sof\sthe\sprevious\sone;\sin\saddition,\sit\sestablishes\san\sexit\shandler\sto\scall\sFreeMainInterp,\sa\snew\sroutine\sdoing\sthe\sfinal\sDeleteInterp+Release+SetStartupScript(NULL,NULL).\nThe\sexisting\sTclInExit()\sMODULE_SCOPE-visible\spredicate\sis\sused\sto\sdisable\sseveral\spanics\sfrom\sthe\srunning\sinterpreter\s(solving\sthe\sMuenchhausen\seffect).\n\nWith\sthis\spatch,\sand\sthe\sTCL_FINALIZE_ON_EXIT\svariable\sset,\svalgrind\sshows\stwo\sinteresting\sthings\s(valgring\s--leak-check==full\s./tclsh\s/dev/null):\n\n\s\s\s(1)\sa\sfew\sbytes\sare\sleaked\sdue\sto\sthe\sactive\sbytecode\sand\sstack\sframes\sbeing\sleft\sover\s(associated\swith\sa\ssuppressed\spanic\scomplaining\sabout\sthem).\n\n\s\s\s(2)\sseveral\sbig\sblocks\sof\sTclAllocateFreeObjects's\s\s(2400\sbytes)\sare\sleaked.\n\nOf\scourse,\s(1)\sis\sexpected,\spending\sdedicated\swork\sfor\scleaning\sup\sthe\srunning\sinterp.\sNo\sbig\sdeal.\n\nHowever,\s(2)\sis\sfunny\sin\sthe\slight\sof\sthe\sfollowing\scomment\sin\sTclAllocateFreeObjects:\n\n\s\s\s\s\s*\sThis\shas\sbeen\snoted\sby\sPurify\sto\sbe\sa\spotential\sleak.\sThe\sproblem\sis\n\s\s\s\s\s*\sthat\sTcl,\swhen\snot\sTCL_MEM_DEBUG\scompiled,\skeeps\saround\sall\sallocated\n\s\s\s\s\s*\sTcl_Obj's,\spointed\sto\sby\stclFreeObjList,\swhen\sfreed\sinstead\sof\sactually\n\s\s\s\s\s*\sfreeing\sthe\smemory.\sTclFinalizeObjects()\sdoes\snot\sckfree()\sthis\smemory,\n\s\s\s\s\s*\sbut\sleaves\sit\sto\sTcl's\smemory\ssubsystem\sfinalization\sto\srelease\sit.\n\s\s\s\s\s*\sPurify\sapparently\scan't\sfigure\sthat\sout,\sand\sfires\sa\sfalse\salarm.\n\nIt\sis\sfunny,\sbecause\sthere\sis\sno\smystery.\sPurify\sis\snot\sat\sfault.\sIt\sjust\sturns\sout\sthat\sin\sthe\sdefault\s-DTCL_ALLOC=0\s-UTCL_MEM_DEBUG\sused\sin\sunix,\sthose\sblocks\sare\ssimply\smalloc'ed\swith\sno\slinking\sor\sexternal\sreferencing.\sAnother\sproof\sof\sthat\sis\sthat\sin\sthat\scase,\sTclFinalizeMemorySubsystem\sis\san\sempty\sfunction\s!\n\nOf\scourse\sthis\smerits\sanother\sbugreport;\sin\sthe\smeantime\splease\svalidate\sthe\sapproach\sof\sthe\scurrent\spatch.\n
J login ferrieux
J mimetype text/plain
J username ferrieux
K 2919042fffffffffffffffffffffffffffffffff
U ferrieux
Z 6640008ee5404e06c7a1c5b474a30a29