Re: [PATCH] END blocks may segfault

Tim Bunce <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On Tue, Jun 29, 2010 at 09:50:00PM -0700, Fred Moyer wrote:
> On Mon, Jun 28, 2010 at 11:15 AM, Alex Hunsaker <[email protected]> wrote:
> 
> > Another option would be to copy/local() the array in
> > modpler_perl_call_list.  Of course that still wont get it "right"
> > because we wont run any newly defined subs... But at least we wont
> > segfault/crap out.
> >
> > Thoughts?
> 
> I think getting rid of the segfault is a good thing.  But if the main
> problem is issues with NYTProf, then it seems like this change won't
> solve the core problem of autogenerated null end blocks faulting.  I'm
> don't fully understand the scope of these issues yet, so my answers
> (and questions) may not be completely helpful.

I suggest the code shift items off the main array, like perl does,
but also push those items onto a new temp array.
When there are no more items in the main array it would copy
the items back again (av_make() is handy for that).

Tim.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.