.
D 2011-08-11T17:57:37
J icomment Continuing\son\sthis\svein.\sApparently\sthe\sleak\soccurs\swhen\sthe\s""\sshimmers\sfrom\sbytecode\sto\spath:\n\npackage\srequire\stcltest\nproc\sbad\ss\s{\n\s\s\s\sputs\s[tcl::unsupported::representation\s$s]\n\s\s\s\scatch\s{file\smkdir\s$s}\n\s\s\s\sputs\s[tcl::unsupported::representation\s$s]\n}\nset\sz\s""\ntcltest::test\sblah\sBlah\s-setup\s{\s\s\s}\s-constraints\s{\s\s\s}\s-returnCodes\serror\s-body\s{\n\s\s\s\s#bad\s$::z\n\s\s\s\sbad\s""\n}\s-result\s{can't\screate\sdirectory\s"":\sno\ssuch\sfile\sor\sdirectory}\n\n\nLeaking\scase\s(bad\s""):\nvalue\sis\sa\sbytecode\swith\sa\srefcount\sof\s58,\sobject\spointer\sat\s0x424bfb8,\sinternal\srepresentation\s0x43547c0:(nil),\sstring\srepresentation\s"".\nvalue\sis\sa\spath\swith\sa\srefcount\sof\s60,\sobject\spointer\sat\s0x424bfb8,\sinternal\srepresentation\s0x52a1910:(nil),\sstring\srepresentation\s"".\n\nNon-leaking\scase\s(bad\s$::z):\nvalue\sis\sa\spure\sstring\swith\sa\srefcount\sof\s4,\sobject\spointer\sat\s0x45918d0,\sstring\srepresentation\s"".\nvalue\sis\sa\spath\swith\sa\srefcount\sof\s6,\sobject\spointer\sat\s0x45918d0,\sinternal\srepresentation\s0x52a0e88:(nil),\sstring\srepresentation\s"".\n\n(note\sthe\s+2\son\srefcount\shere\sis\sin\sboth\scases\sand\sis\sa\sred\sherring,\sdue\sto\serrorstack\sconservation.\scan\sbe\savoided\sby\ssprinkling\s[catch\s{error\sfoo}]\sin\sthe\scode)\n
J login ferrieux
J mimetype text/plain
J username ferrieux
K 3389764fffffffffffffffffffffffffffffffff
U ferrieux
Z 9bab2f1822edd5b1be7d2a816792a17a