I forgot that tech@ removes attachment. Patch inlined:

Index: usr.bin/perl/hv.c
===================================================================
RCS file: /cvs/src/gnu/usr.bin/perl/hv.c,v
retrieving revision 1.12
diff -u usr.bin/perl/hv.c
--- usr.bin/perl/hv.c   29 Sep 2008 17:35:57 -0000      1.12
+++ usr.bin/perl/hv.c   14 Oct 2009 20:54:26 -0000
@@ -1961,6 +1961,7 @@
     if (av) {
        HvAUX(hv)->xhv_backreferences = 0;
        Perl_sv_kill_backrefs(aTHX_ (SV*) hv, av);
+       SvREFCNT_dec(av);
     }
 }

Index: usr.bin/perl/sv.c
===================================================================
RCS file: /cvs/src/gnu/usr.bin/perl/sv.c,v
retrieving revision 1.15
diff -u usr.bin/perl/sv.c
--- usr.bin/perl/sv.c   29 Sep 2008 17:35:59 -0000      1.15
+++ usr.bin/perl/sv.c   14 Oct 2009 20:54:29 -0000
@@ -10266,7 +10266,7 @@
                        daux->xhv_backreferences =
                            saux->xhv_backreferences
                                ? (AV*) SvREFCNT_inc(
-                                       sv_dup((SV*)saux->xhv_backreferences, 
param))
+                                       
sv_dup_inc((SV*)saux->xhv_backreferences, param))
                                : 0;

                         daux->xhv_mro_meta = saux->xhv_mro_meta


On Wed, Oct 14, 2009 at 11:08 PM, Srebrenko Sehic <[email protected]> wrote:
> Hi,
>
> I'm not sure this tech@ is appropriate place to post this, but given
> that DBI is heavily used by people running any kind of Perl/database
> combo on OpenBSD, you might want to know about it.
>
> It turns out, that in Perl 5.10, DBI leaks memory on pretty much any
> database operation. The problem is described here:
> http://rt.perl.org/rt3//Public/Bug/Display.html?id=56908
>
> It is fixed in Perl 5.10.1:
> http://perl5.git.perl.org/perl.git/commitdiff/b17f5ab768c4daa8faac6c85c0c20d3895f406e1
>
> Backported patch attached. Test successfully on i386/4.5 with DBI-1.604.
>
> Should this be considered for inclusion in 4.5-STABLE and 4.6-STABLE?
>
> Regards,
> Srebrenko

Reply via email to