perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niko Tyni <ntyni+modp...@mappi.helsinki.fi>
Subject Re: [mp2] Perl 5.10 fixes from SVN cause SIGBUS on sparc
Date Wed, 12 Mar 2008 07:41:00 GMT
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@debian.org

Mime
View raw message