[libapache2-mod-perl2] 03/05: Fix invalid code in modperl_env.c that was the root cause of the gcc-4.9 breakage.
Niko Tyni
ntyni at moszumanska.debian.org
Sun Aug 10 20:12:37 UTC 2014
This is an automated email from the git hooks/post-receive script.
ntyni pushed a commit to branch master
in repository libapache2-mod-perl2.
commit 3466aeed4851a94b54d8d7d026108aa71f3d5e14
Author: Niko Tyni <ntyni at debian.org>
Date: Sat Aug 9 16:56:40 2014 +0300
Fix invalid code in modperl_env.c that was the root cause of the gcc-4.9 breakage.
Thanks to Matthias Klose and Richard Biener. (Closes: #757240)
---
debian/changelog | 3 ++
...-code-that-breaks-with-GCC-4.9-ftree-dse-.patch | 41 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 45 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 704a807..e75e58e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
libapache2-mod-perl2 (2.0.9~1604013-2) UNRELEASED; urgency=medium
* Fix intermittent failures in t/apache/read3.t. (Closes: #697682)
+ * Fix invalid code in modperl_env.c that was the root cause of
+ the gcc-4.9 breakage. Thanks to Matthias Klose and Richard Biener.
+ (Closes: #757240)
-- Niko Tyni <ntyni at debian.org> Sat, 09 Aug 2014 16:48:01 +0300
diff --git a/debian/patches/440-Fix-invalid-code-that-breaks-with-GCC-4.9-ftree-dse-.patch b/debian/patches/440-Fix-invalid-code-that-breaks-with-GCC-4.9-ftree-dse-.patch
new file mode 100644
index 0000000..3059e6e
--- /dev/null
+++ b/debian/patches/440-Fix-invalid-code-that-breaks-with-GCC-4.9-ftree-dse-.patch
@@ -0,0 +1,41 @@
+From 8c5e3984155dd3c32f627a0bfe0e9e67e7ed873a Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni at debian.org>
+Date: Sat, 9 Aug 2014 16:42:49 +0300
+Subject: [PATCH] Fix invalid code that breaks with GCC 4.9 -ftree-dse
+ optimization
+
+This fixes SIGSEGVs at the start of the test suite when built with
+GCC-4.9 at -O2 (which includes -ftree-dse).
+
+Quoting Richard Biener in https://gcc.gnu.org/PR62035 :
+
+> so 'sv' is declared inside the 'else' but you make its address escape
+> through the 'svp' variable declared in the outer block.
+
+Bug-Debian: http://bugs.debian.org/754901
+---
+ src/modules/perl/modperl_env.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/modules/perl/modperl_env.c b/src/modules/perl/modperl_env.c
+index 769fd2c..c1a276b 100644
+--- a/src/modules/perl/modperl_env.c
++++ b/src/modules/perl/modperl_env.c
+@@ -37,12 +37,13 @@ static unsigned long modperl_interp_address(pTHX)
+ #define MP_ENV_HV_STORE(hv, key, val) STMT_START { \
+ I32 klen = strlen(key); \
+ SV **svp = hv_fetch(hv, key, klen, FALSE); \
++ SV *sv; \
+ \
+ if (svp) { \
+ sv_setpv(*svp, val); \
+ } \
+ else { \
+- SV *sv = newSVpv(val, 0); \
++ sv = newSVpv(val, 0); \
+ (void)hv_store(hv, key, klen, sv, FALSE); \
+ modperl_envelem_tie(sv, key, klen); \
+ svp = &sv; \
+--
+2.1.0.rc1
+
diff --git a/debian/patches/series b/debian/patches/series
index 24bf162..65cfafd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -19,3 +19,4 @@ avoid-db-linkage.patch
410-Restore-httpd-2.4-compatibility-in-lib-Apache2-compa.patch
420-Mark-failing-tests-in-t-perl-ithreads3.t-as-TODO.patch
430-Don-t-answer-anything-to-the-client-before-it-s-done.patch
+440-Fix-invalid-code-that-breaks-with-GCC-4.9-ftree-dse-.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libapache2-mod-perl2.git
More information about the Pkg-perl-cvs-commits
mailing list