.
D 2000-10-26T05:03:39
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s3851\sBug\nVersion:\s8.2.2\nSubmitDate:\s'1999-12-10'\nLastModified:\s'1999-12-11'\nSeverity:\sMED\nStatus:\sAssigned\nSubmitter:\stechsupp\nChangedBy:\shobbs\nOS:\sAll\nFixedDate:\s'2000-10-25'\nClosedDate:\s'2000-10-25'\n\n\nName:\sEdwin\sDiekemper\n\nReproducibleScript:\n%\sproc\stestleak\s{}\s{\nset\sfoo(1)\sone\nset\sfoo(2)\stwo\nfor\s{\sset\sidx\s0\s}\s{\s$idx\s<\s200000\s}\s{\sincr\sidx\s}\s{\ninfo\sexists\sfoo($idx)\n}\n}\n%\stestleak\n\nObservedBehavior:\nThe\ssize\sof\sthe\sprocess\sgets\svery\slarge.\n$\sps\s-p\s6804\n\s\s\sPID\sTTY\s\s\s\s\s\sTIME\sCOMD\n\s\s6804\spts/20\s\s\s0:05\stclsh\nBefore\srunning\stestleak:\n$\sls\s-l\s/proc/6804\s\n-rw-------\s\s\s1\suser\s\sbanknet\s\s1622016\sDec\s10\s14:07\s/proc/6804\nAfter\srunning\stestleak:\n$\sls\s-l\s/proc/6804\n-rw-------\s\s\s1\suser\s\sbanknet\s\s15613952\sDec\s10\s14:07\s/proc/6804\n\nDesiredBehavior:\nVery\slittle\schange\sin\sthe\ssize\sof\sthe\sprocess.\n\n\n\nI've\sverified\sthat\sthe\sgrowth\soccurs,\sbut\swhen\sI\srun\sthis\sthrough\npurify,\sit\sdoesn't\scomplain\sabout\sany\smemory\sleaks.\nIt\sonly\soccurs\swhen\sthe\sarray\svariable\son\swhich\syou\sare\ndoing\s'info\sexists'\salready\soccurs.\s\n--\s12/10/1999\shobbs\nFound\sthe\sproblem.\s\sEach\stime\syou\sdo\s'info\sexists'\son\sa\sknown\narray,\sit\swill\screate\sthe\shash\sentry\sfor\sthe\skey\sitem\sif\sit\ndidn't\salready\sexist.\s\sThis\swill\soccur\sjust\sonce\sfor\seach\skey,\nbut\swhen\syou\sjust\swant\sto\sknow\sit\sexists,\sthat's\sbad.\s\sIf\syou\nwere\sto\sset\sthe\svar\sfollowing,\sthen\sit\swouldn't\stake\sany\smore\nmem\s(except\sfor\sthe\slength\sof\sthe\svalue),\sso\syou\sonly\sreach\nthe\sextreme\scase\sof\swaste\sin\sthe\sexample\sabove.\n\nThe\scomments\sin\sthe\scode\sjustifying\sthis\swere\sto\suse\sexisting\nC\sfunctions\sand\smaintain\scompatibility\swith\s7.6\sbehavior.\s\sIt\nlooks\slike\sthe\sinternal\sC\sfuncs\shave\sto\sbe\srewritten\sto\sprevent\nthis\squasi-leak\s(really\sa\smem\swaste,\sno\sleak).\s\n--\s12/11/1999\shobbs
J foundin obsolete:\s8.2.2
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 07.\sVariables
J title Memory\sleak\sin\s"info\sexists\sarray()"
J type Bug
K 219213ffffffffffffffffffffffffffffffffff
U nobody
Z fdfc456984a6163310d275aa1831884f