develooper Front page | perl.perl5.porters | Postings from August 2019

Re: [perl #134316] Bleadperl v5.31.1-59-g6eebe43d5f breaksGUGOD/invoker-0.35.tar.gz

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
August 5, 2019 14:48
Subject:
Re: [perl #134316] Bleadperl v5.31.1-59-g6eebe43d5f breaksGUGOD/invoker-0.35.tar.gz
Message ID:
20190805164831.6ae00b68@pc09.procura.nl
On Mon, 5 Aug 2019 14:34:45 +0100, Dave Mitchell <davem@iabyn.com>
wrote:

> On Thu, Jul 25, 2019 at 10:51:34PM -0700, (Andreas J. Koenig) (via
> RT) wrote:
> > commit 6eebe43d5f2ac9b216b560316068531384f5a3dd
> > Author: David Mitchell <davem@iabyn.com>
> > Date:   Tue May 14 16:47:06 2019 +0100
> > 
> >     S_optimize_op(): remove anti-recursion deferring
> > 
> > Xref: https://rt.cpan.org/Ticket/Display.html?id=130167
> > 
> > Sample fail
> > report:http://www.cpantesters.org/cpan/report/4233a800-9930-11e9-be61-77a676735216
> >  
> 
> invoker wasn't correctly setting OP_PARENT when slicing in a new op.
> 
> The diff below fixes it, at least for blead - haven't tested with
> older perls, especially pre-5.26.
> 
> Can't update the rt.cpan ticket at the momement as I have forgotten my
> account details, and am not physically located where I have them
> written down.
> 
> 
> 
> --- invoker.xs-	2019-08-05 14:21:57.499383885 +0100
> +++ invoker.xs	2019-08-05 14:28:05.560706198 +0100
> @@ -63,11 +63,17 @@
>                  gv = gv_fetchpvn_flags("self", 4, GV_NOINIT, SVt_PV);
>                  if (SvOK(gv) && SvTYPE(gv) == SVt_PVGV) {
>                      // "$self" was defined as a package variable -- use it

/me spots C++ comments ^^

> -                    cUNOPx(arg)->op_first = newGVOP(
> +                    OP *new_gvop = newGVOP(
>                          gvop->op_type,
>                          gvop->op_flags,
>                          gv
>                      );
> +#if PERL_REVISION == 5 && PERL_VERSION >= 26
> +                    op_sibling_splice(arg, NULL, 1, new_gvop);
> +#else
> +                    cUNOPx(arg)->op_first = new_gvop;
> +#endif
> +                    op_free(gvop);
>                  }
>                  else {
>                      croak("$self not found");


-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.31      porting perl5 on HP-UX, AIX, and Linux
https://useplaintext.email  https://tux.nl  http://www.test-smoke.org
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

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