[SCM] Debian packaging of libapache2-mod-perl2 branch, master, updated. debian/2.0.5-4-5-g141a4c9

Dominic Hargreaves dom at earth.li
Sat Jan 14 18:51:35 UTC 2012


The following commit has been merged in the master branch:
commit 855c600c92a278a0a6624b265b01d5a0f61fabd5
Author: Dominic Hargreaves <dom at earth.li>
Date:   Sat Jan 14 18:42:54 2012 +0000

    Add patches from Niko fixing reference counting bugs when using perl 5.14 (Closes: #650675)

diff --git a/debian/changelog b/debian/changelog
index 70e93c6..657bc45 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ libapache2-mod-perl2 (2.0.5-5) UNRELEASED; urgency=low
   [ Dominic Hargreaves ]
   * Add Build-Conflicts on apache2-mpm-event (marked as experimental)
     since it causes this package to FTBFS (Closes: #652331)
+  * Add patches from Niko fixing reference counting bugs when using perl
+    5.14 (Closes: #650675)
 
  -- gregor herrmann <gregoa at debian.org>  Sun, 04 Dec 2011 15:27:34 +0100
 
diff --git a/debian/patches/260-perl-5.13-reference-counting-bug.patch b/debian/patches/260-perl-5.13-reference-counting-bug.patch
new file mode 100644
index 0000000..391911d
--- /dev/null
+++ b/debian/patches/260-perl-5.13-reference-counting-bug.patch
@@ -0,0 +1,41 @@
+From 2099956795016f3bd08768dda195aeec7dc2267b Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni at debian.org>
+Date: Wed, 14 Dec 2011 22:51:27 +0200
+Subject: [PATCH] Fix a reference counting bug uncovered by Perl 5.13.6
+
+Forwarded: http://mail-archives.apache.org/mod_mbox/perl-modperl/201201.mbox/%3C20120107065332.GA17481%40madeleine.local.invalid%3E
+
+As seen in
+ http://bugs.debian.org/650675
+ http://article.gmane.org/gmane.comp.apache.mod-perl.devel/9928
+
+perl since 5.13.6 with -Dusethreads makes mod_perl2 issue warnings like
+
+ Attempt to free unreferenced scalar: SV 0x7f9c0c347490, Perl interpreter: 0x7f9c0c1a2dd0 during global destruction.
+
+on startup regardless of the Perl code executed.
+
+The double-freed scalar is the CV pointer for ModPerl::Util::exit()
+whose reference count wasn't increased properly.
+---
+ src/modules/perl/modperl_perl.c |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/src/modules/perl/modperl_perl.c b/src/modules/perl/modperl_perl.c
+index e992df4..1a2b3ce 100644
+--- a/src/modules/perl/modperl_perl.c
++++ b/src/modules/perl/modperl_perl.c
+@@ -55,7 +55,9 @@ void modperl_perl_core_global_init(pTHX)
+ 
+     while (cglobals->name) {
+         GV *gv = gv_fetchpv(cglobals->core_name, TRUE, SVt_PVCV);
+-        GvCV_set(gv, get_cv(cglobals->sub_name, TRUE));
++        CV *cv = get_cv(cglobals->sub_name, TRUE);
++        GvCV_set(gv, cv);
++        SvREFCNT_inc(cv);
+         GvIMPORTED_CV_on(gv);
+         cglobals++;
+     }
+-- 
+1.7.7.3
+
diff --git a/debian/patches/261-another-perl-5.13-reference-counting-bug.patch b/debian/patches/261-another-perl-5.13-reference-counting-bug.patch
new file mode 100644
index 0000000..066b264
--- /dev/null
+++ b/debian/patches/261-another-perl-5.13-reference-counting-bug.patch
@@ -0,0 +1,42 @@
+From cbf08a2de6f967863d764eb0bc620178c4ed43fe Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni at debian.org>
+Date: Sat, 17 Dec 2011 09:16:22 +0200
+Subject: [PATCH 2/2] Fix another reference counting bug uncovered by Perl
+ 5.13.6
+
+Forwarded: http://mail-archives.apache.org/mod_mbox/perl-modperl/201201.mbox/%3C20120107065332.GA17481%40madeleine.local.invalid%3E
+
+
+As seen in
+ http://bugs.debian.org/650675
+ http://article.gmane.org/gmane.comp.apache.mod-perl.devel/9928
+
+perl since 5.13.6 with -Dusethreads makes mod_perl2 issue warnings like
+
+ Attempt to free unreferenced scalar: SV 0x7f9c0c347490, Perl interpreter: 0x7f9c0c1a2dd0 during global de
+struction.
+
+An earlier commit fixed some of these in modperl_perl_core_global_init(),
+follow the suit with new_constsub().
+---
+ src/modules/perl/modperl_const.c |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/src/modules/perl/modperl_const.c b/src/modules/perl/modperl_const.c
+index 8732d4f..39a3ec9 100644
+--- a/src/modules/perl/modperl_const.c
++++ b/src/modules/perl/modperl_const.c
+@@ -51,7 +51,9 @@ static void new_constsub(pTHX_ constants_lookup lookup,
+             gv_init(alias, caller_stash, name, name_len, TRUE);
+         }
+ 
+-        GvCV_set(alias, GvCV(*gvp));
++        CV *cv = GvCV(*gvp);
++        GvCV_set(alias, cv);
++        SvREFCNT_inc(cv);
+     }
+ }
+ 
+-- 
+1.7.7.3
+
diff --git a/debian/patches/series b/debian/patches/series
index b551376..afda126 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,5 @@ avoid-db-linkage.patch
 230-test-failures-fix.patch
 240-perl-5.14-svrefcnt.patch
 250-lfs-perl-5.14.patch
+260-perl-5.13-reference-counting-bug.patch
+261-another-perl-5.13-reference-counting-bug.patch

-- 
Debian packaging of libapache2-mod-perl2



More information about the Pkg-perl-cvs-commits mailing list