https://bugzilla.redhat.com/show_bug.cgi?id=859910
Bug ID: 859910 QA Contact: extras-qa@fedoraproject.org Severity: unspecified URL: https://rt.perl.org/rt3/Public/Bug/Display.html?id=107 000 Version: 17 Priority: unspecified CC: cweyl@alumni.drew.edu, iarnell@gmail.com, jplesnik@redhat.com, kasal@ucw.cz, lkundrak@v3.sk, mmaslano@redhat.com, perl-devel@lists.fedoraproject.org, ppisar@redhat.com, psabata@redhat.com, rc040203@freenet.de, tcallawa@redhat.com Assignee: ppisar@redhat.com Summary: Hint-hash copying can leak Regression: --- Story Points: --- Classification: Fedora OS: Unspecified Reporter: ppisar@redhat.com Type: Bug Documentation: --- Hardware: Unspecified Mount Type: --- Status: ASSIGNED Component: perl Product: Fedora
Dying in tied %^H leaks memory:
use Config; use Test::LeakTrace;
# [perl #107000] package hhtie { sub TIEHASH { bless [] } sub STORE { $_[0][0]{$_[1]} = $_[2] } sub FETCH { die if $explosive; $_[0][0]{$_[1]} } sub FIRSTKEY { keys %{$_[0][0]}; each %{$_[0][0]} } sub NEXTKEY { each %{$_[0][0]} } } leaktrace { eval q` BEGIN { $hhtie::explosive = 0; tie %^H, hhtie; $^H{foo} = bar; $hhtie::explosive = 1; } { 1; } `; };
Fixed in upstream with commit:
commit 0db511c03fa45894d146905ba3408b3be3f5baa0 Author: Father Chrysostomos sprout@cpan.org Date: Sun Sep 23 12:42:15 2012 -0700
[perl #107000] Don’t leak if hh copying dies
Perl 5.14.2 as well as 5.16.1 (all Fedoras) are affected.