In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/704b97aa6fbde2d13d9db5c7615d8baa5dbb885f?hp=ddb555489955f48649cfd58f4f43830d9203728a>

- Log -----------------------------------------------------------------
commit 704b97aa6fbde2d13d9db5c7615d8baa5dbb885f
Author: Father Chrysostomos <[email protected]>
Date:   Thu Dec 4 11:16:27 2014 -0800

    dump.c: Don’t dump CvOUTSIDE SV when there is none
    
    $ ./perl -Ilib -MDevel::Peek -Mfeature=:all -Xle 'my sub f; Dump \&f'
    SV = IV(0x7fd7138312b0) at 0x7fd7138312c0
      REFCNT = 1
      FLAGS = (TEMP,ROK)
      RV = 0x7fd713831b90
      SV = PVCV(0x7fd7138303d0) at 0x7fd713831b90
        REFCNT = 2
        FLAGS = (CLONED,DYNFILE,NAMED,LEXICAL)
        COMP_STASH = 0x7fd713807ce8     "main"
        ROOT = 0x0
        NAME = "f"
        FILE = "-e"
        DEPTH = 0
        FLAGS = 0x19040
        OUTSIDE_SEQ = 187
        PADLIST = 0x7fd7134067e8
        PADNAME = 0x7fd713411f88(0x7fd713406d48) PAD = 
0x7fd713807e68(0x7fd71340d2f8)
        OUTSIDE = 0x0 (null)
        SV = 0
    
    That final ‘SV = 0’ is very confusing!
-----------------------------------------------------------------------

Summary of changes:
 dump.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dump.c b/dump.c
index fc98ccd..cc8ff70 100644
--- a/dump.c
+++ b/dump.c
@@ -1982,7 +1982,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, 
I32 nest, I32 maxnest, bo
                                 GvNAMEUTF8(CvGV(outside)))
                         : "UNDEFINED"));
        }
-       if (nest < maxnest && (CvCLONE(sv) || CvCLONED(sv)))
+       if (CvOUTSIDE(sv)
+        && (nest < maxnest && (CvCLONE(sv) || CvCLONED(sv))))
            do_sv_dump(level+1, file, MUTABLE_SV(CvOUTSIDE(sv)), nest+1, 
maxnest, dumpops, pvlim);
        break;
 

--
Perl5 Master Repository

Reply via email to