[Bug 859910] New: Hint-hash copying can leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=859910

            Bug ID: 859910
        QA Contact: extras-qa@xxxxxxxxxxxxxxxxx
          Severity: unspecified
               URL: https://rt.perl.org/rt3/Public/Bug/Display.html?id=107
                    000
           Version: 17
          Priority: unspecified
                CC: cweyl@xxxxxxxxxxxxxxx, iarnell@xxxxxxxxx,
                    jplesnik@xxxxxxxxxx, kasal@xxxxxx, lkundrak@xxxxx,
                    mmaslano@xxxxxxxxxx,
                    perl-devel@xxxxxxxxxxxxxxxxxxxxxxx, ppisar@xxxxxxxxxx,
                    psabata@xxxxxxxxxx, rc040203@xxxxxxxxxx,
                    tcallawa@xxxxxxxxxx
          Assignee: ppisar@xxxxxxxxxx
           Summary: Hint-hash copying can leak
        Regression: ---
      Story Points: ---
    Classification: Fedora
                OS: Unspecified
          Reporter: ppisar@xxxxxxxxxx
              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@xxxxxxxx>
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel



[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux