.
D 2000-10-26T01:10:06
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s4552\sBug\nVersion:\s8.2\nSubmitDate:\s'2000-03-24'\nLastModified:\s'2000-03-27'\nSeverity:\sLOW\nStatus:\sReleased\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sWindows\sNT\nFixedDate:\s'2000-03-27'\nFixedInVersion:\s8.3.1\nClosedDate:\s'2000-10-25'\n\n\nName:\nKent\sBloomstrand\n\nReproducibleScript:\nThe\sleak\sis\snot\slimited\sto\sonly\sthe\sTclPro\slibrary.\sI\sjust\sran\s\nanother\stest\sthis\smorning\sagainst\sboth\sthe\s"tcl82.dll"\sthat\s\nships\swith\sSS\s5.0\sand\sthat\sof\sTcl\s8.2.3\sand\shere\sis\swhat\sI\sfound:\n\nBeside\sthe\sTclPro\s1.3\stbcload\sleak\sproblem,\sthere\sis\sa\sdefinite\sleak\s\nin\sthe\sbase\s"source"\scommand\snot\sgetting\sproperly\scleaned\sup\safter\s\nTCL_DeleteInterp()\sis\scalled.\sThis\shappens\swith\seither\sthe\s"tcl82.dll"\s\nthat\sships\swith\sStoryServer\s5.0\s(w/\s5.0.1\sQA-8\spatch)\sor\swith\sthe\s\nTcl\s8.2.3\s"tcl82.dll".\sI\sdon't\sthink\swe\scan\sallow\sleaks\slike\sthis\sto\s\noccur\sin\sour\sproducts.\s\n\nIn\sa\ssimple\stest\scase,\sI\srun\sthe\sprogram\sbelow\sto\ssimulate\sa\stotal\s\nof\s40000\scalls\sto\srepeatedly\s"source"\sthe\ssame\snon-compiled\sTCL\sfile\s\n(with\s600\ssimple\sprocedures\sinside)\sand\sthe\stotal\sleak\swas\sabout\s10MB\s\non\smy\sNT\sbox.\s\n\nHow\sto\sreproduce:\s\nCompile\sand\srun\sthe\sfollowing\sC\sprogram\s(similar\sto\sthe\sone\sfrom\sStep\s3).\s\nThe\sfile\s"d:/temp/plain.tcl"\s(cmd_2\sin\sthe\sfollowing\sprogram)\sis\sthe\s\nsame\ssimple\sTCL\sfile\sfrom\sStep\s1\sbefore\swith\s600\ssimple\sprocedures\s\nsuch\sas\s'proc\s::ns::proc_a\s{}\s{return\s1}':\s\n\nint\smain(int\sargc,\schar*\sargv[])\s\n{\s\n\s\s\s\sint\si,\sj,\sstatus;\s\n\s\s\s\schar\s*cmd_2\s=\s"source\s{d:/temp/plain.tcl}";\s\n\s\s\s\sTcl_Interp\s*interp;\s\n\n\s\s\s\sinterp\s=\sTcl_CreateInterp();\s\n\s\s\s\sfor\s(i\s=\s0\s;\si\s<\s400\s;\si++)\s{\s\n\s\s\s\s\s\s\s\sprintf("%d...",\si);\s\n\s\s\s\s\s\s\s\sfor\s(j\s=\s0\s;\sj\s<\s100\s;\sj++)\s{\s\n\s\s\s\s\s\s\s\s\s\s\s\sprintf(".");\s\n\s\s\s\s\s\s\s\s\s\s\s\sstatus\s=\sTcl_GlobalEval(interp,\scmd_2);\s\n\s\s\s\s\s\s\s\s\s\s\s\sif\s(status\s!=\sTCL_OK)\s{\s\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sprintf("Source\sfailed\\n");\s\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sreturn\s1;\s\n\s\s\s\s\s\s\s\s\s\s\s\s}\s\n\s\s\s\s\s\s\s\s}\s\n\s\s\s\s\s\s\s\sprintf("\\n");\s\n\s\s\s\s}\s\n\s\s\s\sTcl_DeleteInterp(interp);\s\n\n\s\s\s\sprintf("Hit\sRETURN\swhen\sdone...");\s\n\s\s\s\sgetchar();\s\n\s\s\s\sreturn\s0;\s\n}\n\nObservedBehavior:\nit\sleaks\smemory\n\nDesiredBehavior:\nit\sdoesn't\sleak\n\n\n\nThis\sturned\sout\sto\sbe\sa\s"bug"\sin\sthe\sprovided\sscript\swhich\snever\ncleared\sthe\snamespace\sexport\sarray\s(given\sthe\soptional\s-clear\nargument).\s\s8.3.1\shas\sa\sfix\sto\sfurther\simprove\sthis\sby\schecking\nfor\sduplicates\sbefore\sadding\sto\sthe\sexport\sarray.\s\n--\s03/27/2000\shobbs
J foundin obsolete:\s8.2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 69.\sOther
J title leak\srelated\sto\sSOURCE\scommand
J type Bug
K 219066ffffffffffffffffffffffffffffffffff
U nobody
Z 6a3c32028af796851e68a0965208ba65