In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/5de6cd706e406902d8d24f62fe0fb81ebbb8c0dc?hp=28269cae37d6d6f78b7f04769d89a56f5a11c2f4>

- Log -----------------------------------------------------------------
commit 5de6cd706e406902d8d24f62fe0fb81ebbb8c0dc
Author: David Mitchell <[email protected]>
Date:   Mon Aug 5 16:22:30 2019 +0100

    op_dump(): display a wild parent pointer.
    
    Normally the PARENT is displayed only for top-level ops: lower-level
    ops have the obvious parent.
    
    This commit adds a check that a lower-level op has a valid parent (i.e.
    non-null, points to an op with OPf_KIDS and one of the kids is us).
    If these checks fails, the raw content of op_sibparent is displayed.

-----------------------------------------------------------------------

Summary of changes:
 dump.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/dump.c b/dump.c
index 9de1941b5a..188d267426 100644
--- a/dump.c
+++ b/dump.c
@@ -1004,6 +1004,26 @@ S_do_op_dump_bar(pTHX_ I32 level, UV bar, PerlIO *file, 
const OP *o)
         S_opdump_indent(aTHX_ o, level, bar, file, "PARENT");
         S_opdump_link(aTHX_ o, op_parent((OP*)o), file);
     }
+    else if (!OpHAS_SIBLING(o)) {
+        bool ok = TRUE;
+        OP *p = o->op_sibparent;
+        if (!p || !(p->op_flags & OPf_KIDS))
+            ok = FALSE;
+        else {
+            OP *kid = cUNOPx(p)->op_first;
+            while (kid != o) {
+                kid = OpSIBLING(kid);
+                if (!kid) {
+                    ok = FALSE;
+                    break;
+                }
+            }
+        }
+        if (!ok) {
+            S_opdump_indent(aTHX_ o, level, bar, file,
+                            "*** WILD PARENT 0x%p\n", p);
+        }
+    }
 
     if (o->op_targ && optype != OP_NULL)
            S_opdump_indent(aTHX_ o, level, bar, file, "TARG = %ld\n",

-- 
Perl5 Master Repository

Reply via email to