stas 2004/08/12 16:38:03
Modified: ModPerl-Registry/t/conf modperl_extra_startup.pl src/modules/perl modperl_error.c t/conf modperl_extra.pl Log: add a proper workaround for the requiring file when ERRSV is true within nested eval_sv. Thanks to Dave Mitchell for finding out that bug in perl (and solving it in perl Change 23209) Revision Changes Path 1.20 +0 -3 modperl-2.0/ModPerl-Registry/t/conf/modperl_extra_startup.pl Index: modperl_extra_startup.pl =================================================================== RCS file: /home/cvs/modperl-2.0/ModPerl-Registry/t/conf/modperl_extra_startup.pl,v retrieving revision 1.19 retrieving revision 1.20 diff -u -u -r1.19 -r1.20 --- modperl_extra_startup.pl 16 Jul 2004 22:43:11 -0000 1.19 +++ modperl_extra_startup.pl 12 Aug 2004 23:38:02 -0000 1.20 @@ -1,9 +1,6 @@ use strict; use warnings FATAL => 'all'; -# XXX: temp workaround for t/filter/TestFilter/in_error.pm -use APR::Error; - use ModPerl::RegistryLoader (); use Apache::ServerRec (); 1.5 +20 -4 modperl-2.0/src/modules/perl/modperl_error.c Index: modperl_error.c =================================================================== RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_error.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -u -r1.4 -r1.5 --- modperl_error.c 8 Jul 2004 06:59:38 -0000 1.4 +++ modperl_error.c 12 Aug 2004 23:38:02 -0000 1.5 @@ -43,6 +43,16 @@ return Perl_form(aTHX_ "%s", ptr); } + +/* modperl_croak notes: under -T we can't really do anything when die + * was called in the stacked eval_sv (which is the case when a + * response handler calls a filter handler and that filter calls die + * ""). for example trying to require a file in modperl_croak(), will + * cause 'panic: POPSTACK' and the process will exit. Dave fixed that + * in perl Change 23209 by [EMAIL PROTECTED] on 2004/08/09 19:48:57, + * which will hopefully appear in perl 5.8.6. + */ + /* croak with $@ as a APR::Error object * rc - set to apr_status_t value * file - set to the callers filename @@ -53,14 +63,20 @@ { HV *stash; HV *data; - - /* XXX: it'd be nice to arrange for it to load early */ - /* XXX: temp loaded from startup.pl + int is_tainted = PL_tainted; + + /* see the explanation above */ + if (is_tainted) { + TAINT_NOT; + } Perl_require_pv(aTHX_ "APR/Error.pm"); + if (is_tainted) { + TAINT; + } + if (SvTRUE(ERRSV)) { Perl_croak(aTHX_ "%s", SvPV_nolen(ERRSV)); } - */ stash = gv_stashpvn("APR::Error", 10, FALSE); data = newHV(); 1.60 +0 -3 modperl-2.0/t/conf/modperl_extra.pl Index: modperl_extra.pl =================================================================== RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v retrieving revision 1.59 retrieving revision 1.60 diff -u -u -r1.59 -r1.60 --- modperl_extra.pl 24 Jul 2004 07:27:03 -0000 1.59 +++ modperl_extra.pl 12 Aug 2004 23:38:02 -0000 1.60 @@ -7,9 +7,6 @@ use Apache2 (); -# XXX: temp workaround for t/filter/TestFilter/in_error.pm -use APR::Error; - use Apache::ServerRec (); use Apache::ServerUtil (); use Apache::Process ();