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:
Dave Mitchell
Date:
August 5, 2019 13:34
Subject:
Re: [perl #134316] Bleadperl v5.31.1-59-g6eebe43d5f breaksGUGOD/invoker-0.35.tar.gz
Message ID:
20190805133445.GD2245@iabyn.com
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
-                    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");
-- 
You're only as old as you look.

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