Niko Tyni wrote:
On Mon, Mar 10, 2008 at 12:06:54AM -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).Does this patch make the problem go away? (untested)- handler->attrs = *modperl_code_attrs(aTHX_ cv);+ memcpy(&(handler->attrs),modperl_code_attrs(aTHX_ cv), sizeof(handler->attrs));No, unfortunately I can't see any change at all with this patch. The backtrace looks just the same.
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. -- Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5 http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
Index: src/modules/perl/modperl_types.h =================================================================== --- src/modules/perl/modperl_types.h (revision 635455) +++ src/modules/perl/modperl_types.h (working copy) @@ -195,7 +195,7 @@ const char *name; CV *cv; U8 flags; - U16 attrs; + U32 attrs; modperl_handler_t *next; }; Index: src/modules/perl/modperl_util.c =================================================================== --- src/modules/perl/modperl_util.c (revision 635455) +++ src/modules/perl/modperl_util.c (working copy) @@ -900,7 +900,7 @@ return newRV_inc((SV *)*pnotes); } -U16 *modperl_code_attrs(pTHX_ CV *cv) { +U32 *modperl_code_attrs(pTHX_ CV *cv) { MAGIC *mg; if (!SvMAGICAL(cv)) { Index: src/modules/perl/modperl_util.h =================================================================== --- src/modules/perl/modperl_util.h (revision 635455) +++ src/modules/perl/modperl_util.h (working copy) @@ -149,6 +149,6 @@ SV *modperl_pnotes(pTHX_ HV **pnotes, SV *key, SV *val, request_rec *r, conn_rec *c); -U16 *modperl_code_attrs(pTHX_ CV *cv); +U32 *modperl_code_attrs(pTHX_ CV *cv); #endif /* MODPERL_UTIL_H */ Index: xs/Apache2/Filter/Apache2__Filter.h =================================================================== --- xs/Apache2/Filter/Apache2__Filter.h (revision 635455) +++ xs/Apache2/Filter/Apache2__Filter.h (working copy) @@ -86,7 +86,7 @@ return len; } -static MP_INLINE U16 *modperl_filter_attributes(pTHX_ SV *package, SV *cvrv) +static MP_INLINE U32 *modperl_filter_attributes(pTHX_ SV *package, SV *cvrv) { return modperl_code_attrs(aTHX_ (CV*)SvRV(cvrv)); } @@ -118,7 +118,7 @@ MP_STATIC XS(MPXS_modperl_filter_attributes) { dXSARGS; - U16 *attrs = modperl_filter_attributes(aTHX_ ST(0), ST(1)); + U32 *attrs = modperl_filter_attributes(aTHX_ ST(0), ST(1)); I32 i; #ifdef MP_TRACE HV *stash = gv_stashsv(ST(0), TRUE); Index: xs/tables/current/ModPerl/FunctionTable.pm =================================================================== --- xs/tables/current/ModPerl/FunctionTable.pm (revision 635455) +++ xs/tables/current/ModPerl/FunctionTable.pm (working copy) @@ -1239,7 +1239,7 @@ ] }, { - 'return_type' => 'U16 *', + 'return_type' => 'U32 *', 'name' => 'modperl_code_attrs', 'args' => [ {
signature.asc
Description: OpenPGP digital signature