Bug#468327: [mp2] Perl 5.10 fixes from SVN cause SIGBUS on sparc

Niko Tyni ntyni+modperl at mappi.helsinki.fi
Wed Mar 12 07:41:00 UTC 2008


On Mon, Mar 10, 2008 at 10:53:54PM -0700, Philippe M. Chiasson wrote:

> >>Niko Tyni wrote:
> >>>We're switching to Perl 5.10 in Debian soon, and I'm trying to update the
> >>>mod_perl2 package to keep it working. Unfortunately the ModPerl-Registry
> >>>test suite is failing on the Sparc architecture because apache2 is killed
> >>>by a bus error (SIGBUS).

> How about this s/U16/U32/ diff, basically keeping the flag type at U32,
> since it was not an essential part of the fix itself.

No, that doesn't help either.

It turns out the U16/U32 thing was a bad guess on my part. After
some code staring and debugging, I found the real bug. It's not
architecture-specific really, it just happens to bite worst on Sparc.

The non-void function modperl_thx_interp_get() function is doing a
plain 'return;' when it means to 'return NULL;'. The result is that the
MP_APR_POOL_SV_TAKES_OWNERSHIP() macro increments a more or less random
memory location, in this case my_perl->tScopestack aka. PL_scopestack,
making it non-aligned as a side effect.

Patch attached; this fixes the bus error for me.

Cheers,
-- 
Niko Tyni   ntyni at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 468327.patch
Type: text/x-diff
Size: 504 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20080312/6950c7c5/attachment-0001.patch 


More information about the pkg-perl-maintainers mailing list