Subject: | memory leak fetching $! |
Date: | Sat, 26 Jun 2010 08:30:51 +1000 |
To: | bug-Errno-AnyString [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
With Errno::AnyString 1.03 and recent i386 debian perl 5.10.1 a
program
use Errno::AnyString;
while (1) {
"$!";
}
uses ever more memory. I hoped repeated fetching of $! would happen in
more or less constant space, as it does if Errno::AnyString is not
loaded.
It seems to happen if a custom error string is applied too. I suspect
in the fetch magic that hkey_sv is unfreed. I get some joy from
chucking an SvREFCNT_dec(hkey_sv) immediately after the hv_fetch.