perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <>
Subject Re: segfault in worker mpm
Date Tue, 05 Oct 2004 06:28:12 GMT
Stas Bekman <> writes:

> Joe Schaefer wrote:


> > mod_perl is trying to deparse the anonymous sub, and it needs
> > B::Deparse for that.  (I'm still trying to grok the necessity/safety
> > of the deparse.)
> Right, that makes more sense. The necessity is explained in
> modperl_handler.c, and pasted here for your convenience (and comments):
>      /* XXX: perhaps we can optimize this further. At the moment when
>       * perl w/ ithreads is used, we always deparse the anon subs
>       * before storing them and then eval them each time they are
>       * used. This is because we don't know whether the same perl that
>       * compiled the anonymous sub is used to run it.

Can you explain under what circumstance it actually happens, or even 
matters?  AFAICT the sub is compiled into an optree as soon as the 
module is loaded.  Here are the two cases I'm struggling to understand:

  1) If the module loads before the interpreter are cloned, won't the cloning 
     operation allow the anon sub to run safely in any interpreter?

  2) If it isn't loaded before cloning, than doesn't each individual
     interpreter load the module before running the code?  If so,  how
     could the issue present itself in this case?

Joe Schaefer

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message