.
D 2000-10-26T00:56:57
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s4553\sBug\nVersion:\s8.2\nSubmitDate:\s'2000-03-24'\nLastModified:\s'2000-03-27'\nSeverity:\sSER\nStatus:\sClosed\nSubmitter:\stechsupp\nChangedBy:\shobbs\nRelatedBugIDs:\s4552\s4503\nOS:\sWindows\sNT\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-03-27'\n\n\nName:\nKent\sBloomstrand\n\nReproducibleScript:\nIt\sseems\sredefining\sthe\ssame\sprocs\s(non-compiled)\swithin\sa\ssingle\s\nTCL\sinterp\screated\sby\sTCL_CreateInterp()\swill\salso\scause\smemory\s\nleak\s(per\sMark\sScheevel's\ssuggestion).\s\n\nHow\sto\sreproduce:\s\n\nCompile\sand\srun\sthe\sfollowing\sC\sprogram\s(similar\sto\sthe\sone\sfrom\sStep\s3).\s\nThe\sfile\s"d:/temp/plain.tcl"\s("*file"\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\s//\scode\sto\sre-eval\sthe\ssame\sset\sof\snon-compiled\sTCL\sprocs\s250,000\stimes\s\n\s\s\s\sint\si,\sj,\sstatus;\s\n\s\s\s\schar\stmp[32766];\s\n\s\s\s\schar\s*file\s=\s"d:/temp/plain.tcl";\s\n\s\s\s\schar\scmd_string[32766];\s\n\s\s\s\sFILE\s*fp;\s\n\s\s\s\sTcl_Interp\s*interp;\s\n\n\s\s\s\sif\s(NULL\s!=\s(fp\s=\sfopen(file,\s"r")))\s{\s\n\s\s\s\s\s\s\s\sstrcpy(cmd_string,\s"namespace\seval\s::\s{\\n");\s\n\s\s\s\s\s\s\s\swhile\s(!\sfeof(fp))\s{\s\n\s\s\s\s\s\s\s\s\s\s\s\s(void)\sfgets(tmp,\s2048,\sfp);\s\n\s\s\s\s\s\s\s\s\s\s\s\sstrcat(cmd_string,\stmp);\s\n\s\s\s\s\s\s\s\s}\s\n\s\s\s\s\s\s\s\sstrcat(cmd_string,\s"}\\n");\s\n\s\s\s\s}\s\n\s\s\s\sfclose(fp);\s\n\n\s\s\s\sinterp\s=\sTcl_CreateInterp();\s\n\s\s\s\sfor\s(i\s=\s0\s;\si\s<\s10000\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_string);\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("namespace\seval\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\n\nDesiredBehavior:\nno\sleak\n\n\n\nThis\sparticular\scase\sis\snot\sreproducable,\sbut\smay\sbe\srelated\sto\n4552\s(use\sof\s'namespace\sexport\scmd1'\scauses\smonotonic\smemory\ngrowth,\sbut\s*not*\sa\sleak),\sor\s4503,\swhich\spoints\sout\sthat\stbcload\nhas\sa\sleak\sin\srepeated\ssourcing\sof\sthe\ssame\sfile.\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 procs\screated\sby\sTCL_CreateInterp()\sleaks\smemory
J type Bug
K 218385ffffffffffffffffffffffffffffffffff
U nobody
Z 700f7be9b4ae396351c98b23fc005cdc