develooper Front page | perl.perl5.porters | Postings from September 2014

Re: [perl #122747] Assertion failed in Perl_reg_numbered_buff_fetch,file regcomp.c, line 7459

Thread Previous | Thread Next
From:
demerphq
Date:
September 14, 2014 22:04
Subject:
Re: [perl #122747] Assertion failed in Perl_reg_numbered_buff_fetch,file regcomp.c, line 7459
Message ID:
CANgJU+U0hV00YT=Osg8wh+9DX=61xgXuBqeEZFC_oCnRmQJutw@mail.gmail.com
On 14 September 2014 23:30, Father Chrysostomos via RT <
perlbug-followup@perl.org> wrote:

> On Sun Sep 14 14:15:18 2014, demerphq wrote:
> > On 14 September 2014 21:49, Father Chrysostomos via RT <
> > perlbug-followup@perl.org> wrote:
> >
> > > On Sun Sep 14 09:57:14 2014, demerphq wrote:
> > > > On 11 September 2014 23:42, Father Chrysostomos via RT <
> > > > perlbug-followup@perl.org> wrote:
> > > > > • Can we remove the $1 localisation?
> > > > >
> > > > > That localisation doesn’t make much sense to me, even without your
> > > > > PL_curpm change.  Saving and restoring the value of something that
> is
> > > just
> > > > > a proxy for a value stored elsewhere is weird.  Can we just delete
> > > > > save_re_context?
> > > > >
> > > >
> > > > Did you already follow up on this?
> > >
> > > Yes, in these commits (in reverse order):
> > >
> > > 2018906 pp_ctl.c: Remove junk from #endif
> > > 0ddd4a5 Mathomise save_re_context
> > > e32ff4e pp_ctl.c: Remove PL_curcop assignment
> > > 1a419e6 utf8.c: Move an #ifndef for clarity
> > > 1ca1bae Remove obsolete comment from utf8.c
> > > d28a925 Don’t call save_re_context
> > > b4fa55d Gut Perl_save_re_context
> > >
> > >
> > Great. Thanks. BTW, did you dig into the history of the function to see
> why
> > it was added in the first place?
>
> 7d75537e explains the history.
>
> > Did it ever make sense?
>
> Yes, originally save_re_context saved a whole list of global variables
> used by the regexp engine (which no longer exist).
>
> The localisation of $1 etc. was added later.  I’m not sure that part ever
> made sense.  I’m not sure either that it’s worth trying to figure it out.
> It was commit ada6e8a992 that did it, to fix bug #18107.
>
>
Cool thanks, that was very educational.

Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About