Stas Bekman <[EMAIL PROTECTED]> writes: > Joe Schaefer wrote:
[...] > > No luck. In fact, actually I am wondering why > > modperl_interp_pool_select() does not call PERL_SET_CONTEXT, but > > modperl_interp_select() does. > > I suppose these were added as the problems were appearing. > > > If it did, that would resolve my segfault: > > You mean with this patch, the segfault goes away? Yes- both with and without your patch. > > Index: src/modules/perl/modperl_interp.c > > =================================================================== > > RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.c,v > > retrieving revision 1.63 > > diff -u -p -r1.63 modperl_interp.c > > --- src/modules/perl/modperl_interp.c 18 Sep 2004 04:33:34 -0000 1.63 > > +++ src/modules/perl/modperl_interp.c 8 Oct 2004 02:36:29 -0000 > > @@ -368,6 +368,7 @@ modperl_interp_t *modperl_interp_pool_se > > } > > } > > + PERL_SET_CONTEXT(interp->perl); > > return interp; > > } > > I think it has a problem, since potentially you haven't had a chance > to save the original context yet, In this case the original context is bogus (the interpreter which first set it seems to have left the building), so restoring it doesn't offer any protection in this case. Indeed, as mentioned earlier modperl_callback_run_handlers segfaults when localization is attempted, because it seems to assume modperl_interp_select will call PERL_SET_CONTEXT (which isn't always so). > before calling ..._select, and this SET call will lose it. > I think we should write MACRO wrappers around these calls, which will > do the following: get the original context and store it in the interp > struct. the override the current context with the context of the > selected interpreter. On unselect it should make sure to restore the > original context. Perhaps. I'll think about this more after the "thread pools & dynamic config" enlightens me a bit more. -- Joe Schaefer --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]