Herve Guillemet wrote:
Stas Bekman wrote:
Herve, you've uncovered a bloody global perl context switch bug.
Please try this patch (the reproducing tar ball now works for me under
worker)
This test does run successfully with your patch.
Now define two directives.
Use one inside the Location, another outside, and core dumps again.
Test tarball attached.
Thanks Herve. Please try this patch on top of the one I've sent before.
Index: src/modules/perl/modperl_module.c
===================================================================
--- src/modules/perl/modperl_module.c (revision 171168)
+++ src/modules/perl/modperl_module.c (working copy)
@@ -191,6 +191,12 @@
add_obj = modperl_svptr_table_fetch(aTHX_ table, add);
if (!base_obj || (base_obj == add_obj)) {
+#ifdef USE_ITHREADS
+ modperl_interp_unselect(interp);
+ if (orig_perl) {
+ MP_PERL_CONTEXT_RESTORE;
+ }
+#endif
return addv;
}
@@ -241,7 +247,9 @@
#ifdef USE_ITHREADS
modperl_interp_unselect(interp);
- MP_PERL_CONTEXT_RESTORE;
+ if (orig_perl) {
+ MP_PERL_CONTEXT_RESTORE;
+ }
#endif
return (void *)mrg;
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com