.
D 2024-07-14T01:04:34.590
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-plain
J comment The\scommit\shttps://core.tcl-lang.org/tcl/info/bacfccf1e2cbab78\r\nintroduced\sa\smemory\sleak.\sWhile\sI\sunderstand\sthe\sreasoning\sfor\r\n[bacfccf1e2cbab78]\sI\sso\sfar\snot\sunderstand\swhy\sit\shad\sthis\sunfortunate\r\n"side-effect".\r\n\r\nThe\sbuilds\sI\suse\sfor\sthis\sare\sall\smade\swith\s-DPURIFY.\r\n\r\nI'll\sappend\sthe\soutput\sof\sa\s"make\svalgrind"\srun\swith\r\n[95f9e8176ed0b552]\s-\sthe\sparent\scommit\sof\sbacfccf1e2cbab78\s-\sand\sthe\r\noutput\sof\sthe\ssame\swith\scurrent\strunk\sas\sof\swriting\s([08603ee649]).\r\nThe\soutput\sof\s"make\svalgrind"\swith\s[bacfccf1e2cbab78]\slooks\ssimilar\sto\r\nthe\sone\sof\s[08603ee649]\s(current\strunk).\r\n\r\nFor\sa\sshort\sverification\syou\sdon't\sneed\sthe\swhole\stime\sconsuming\srun\r\nof\sthe\stest\ssuite\sunder\svalgrind.\sWith\s[bacfccf1e2cbab78]\sand\sunder\r\nlinux\s\r\n\r\nmake\svalgrind\sTESTFLAGS='-file\sload.test'\r\n\r\nit\sreturns\s(amongst\smore\sdetails)\r\n\r\n\s\s\s\sdefinitely\slost:\s80\sbytes\sin\s5\sblocks\r\n\s\s\s\sindirectly\slost:\s176\sbytes\sin\s11\sblocks\r\n\s\s\s\s\s\spossibly\slost:\s0\sbytes\sin\s0\sblocks\r\n\s\s\s\sstill\sreachable:\s0\sbytes\sin\s0\sblocks\r\n\s\s\s\s\s\s\s\s\ssuppressed:\s0\sbytes\sin\s0\sblocks\r\n\r\nWith\s[95f9e8176ed0b552]\s-\sthe\sparent\scommit\sof\sbacfccf1e2cbab78\s-\sand\r\nthe\ssame\r\n\r\nmake\svalgrind\sTESTFLAGS='-file\sload.test'\r\n\r\nit\sreturns\r\n\r\n\s\s\s\sHEAP\sSUMMARY:\r\n\s\s\s\s\s\s\s\sin\suse\sat\sexit:\s0\sbytes\sin\s0\sblocks\r\n\s\s\s\s\s\stotal\sheap\susage:\s383,994\sallocs,\s383,994\sfrees,\s43,997,079\sbytes\sallocated\r\n\s\s\s\s\r\n\s\s\s\sAll\sheap\sblocks\swere\sfreed\s--\sno\sleaks\sare\spossible\r\n\r\nThis\scan\seasily\sbe\s"exploited"\sby\sa\sscript.\sAny\sTcl\s9\sbinary\sextension\r\nwill\sdo\sit\s(I'd\ssuppose).\sIn\sthe\sexample\sbelow\sI\sused\stdom\r\nde5237af97f2c1c\s(trunk\sat\sthe\smoment\sof\swriting\sthis).\sRun\s(your\smoral\r\nequivalent)\sof\r\n\r\nload\s./libtcl9tdom0.9.4.so\r\nwhile\s1\s{\r\n\s\s\s\sinterp\screate\schildinterp\r\n\s\s\s\sload\s{}\sTdom\schildinterp\r\n\s\s\s\sinterp\sdelete\schildinterp\r\n}\r\n\r\nwith\sa\s[bacfccf1e2cbab78]\stclsh\sand\swatch\sthe\sprocess\ssomewhat\sslowly\r\nbut\ssteady\sgrowing.\sIf\sI\srun\sthat\sscript\swith\sa\stclsh\swith\sthe\sparent\r\ncommit\sto\sthat\sthe\sprocess\sdoesn't\sshows\sthis.\s(At\sleast\swith\smem\r\nbuilds.)\sNeither\sdo\sI\ssee\sthe\sproblem\swith\s8.6
J foundin Tcl\s9
J is_private 0
J login pointsman
J priority 5\sMedium
J private_contact 4ca203a8e925aecdd9419645f936bccf18cd6ea7
J resolution None
J severity Important
J status Open
J submitter pointsman
J subsystem -\sNew\sBuiltin\sCommands
J title Mem\sleak\sin\strunk
J type Bug
K ae09f6b190ceec31747572edb9f9be8bb03a592f
U pointsman
Z 713b6b9f1f5a71300c01bd74a2e4e887