* debian/patches/015-nonvoid-return.patch: make modperl_thx_interp_get()
authorNiko Tyni <ntyni@debian.org>
Wed, 12 Mar 2008 13:04:55 +0000 (13:04 +0000)
committerNiko Tyni <ntyni@debian.org>
Wed, 12 Mar 2008 13:04:55 +0000 (13:04 +0000)
  always return a value, fixing undefined behaviour that led to a SIGBUS
  on sparc (Closes: #468327).

debian/changelog
debian/patches/015-nonvoid-return.patch [new file with mode: 0644]
debian/patches/series

index 29b5de2..4080518 100644 (file)
@@ -1,3 +1,11 @@
+libapache2-mod-perl2 (2.0.3-4) UNRELEASED; urgency=low
+
+  * debian/patches/015-nonvoid-return.patch: make modperl_thx_interp_get()
+    always return a value, fixing undefined behaviour that led to a SIGBUS 
+    on sparc (Closes: #468327).
+
+ -- Niko Tyni <ntyni@debian.org>  Wed, 12 Mar 2008 14:44:17 +0200
+
 libapache2-mod-perl2 (2.0.3-3) unstable; urgency=low
 
   [ gregor herrmann ]
diff --git a/debian/patches/015-nonvoid-return.patch b/debian/patches/015-nonvoid-return.patch
new file mode 100644 (file)
index 0000000..d050637
--- /dev/null
@@ -0,0 +1,13 @@
+Make modperl_thx_interp_get() always return a value, fixing
+undefined behaviour that led to a SIGBUS on sparc (#468327).
+--- libapache2-mod-perl2.orig/src/modules/perl/modperl_interp.c
++++ libapache2-mod-perl2/src/modules/perl/modperl_interp.c
+@@ -581,7 +581,7 @@
+     modperl_interp_t *interp;
+     dTHXa(thx);
+     SV **svp = hv_fetch(PL_modglobal, MP_THX_INTERP_KEY, strlen(MP_THX_INTERP_KEY), 0);
+-    if (!svp) return;
++    if (!svp) return NULL;
+     interp = INT2PTR(modperl_interp_t *, SvIV(*svp));
+     return interp;
+ }
index e195bcf..fc3c8f7 100644 (file)
@@ -8,3 +8,4 @@
 011-svn-fix-perl5.10-build.patch
 012-svn-more-perl5.10-fixes.patch 
 013-test-apache-status.patch 
+015-nonvoid-return.patch