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

[perl #119147] Devel::Peek::Dump regression on closures in 5.18

Thread Previous
From:
Brian Fraser
Date:
August 4, 2013 23:09
Subject:
[perl #119147] Devel::Peek::Dump regression on closures in 5.18
Message ID:
rt-3.6.HEAD-2552-1375657746-631.119147-75-0@perl.org
# New Ticket Created by  Brian Fraser 
# Please include the string:  [perl #119147]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=119147 >


5.16:
$ perl -MDevel::Peek -le 'sub doof { my $x; return sub { $x } }
Dump(doof())'
SV = IV(0x13b5c10) at 0x13b5c20
  REFCNT = 1
  FLAGS = (TEMP,ROK)
  RV = 0x1396b00
  SV = PVCV(0x13db030) at 0x1396b00
    REFCNT = 2
    FLAGS = (ANON,CLONED,CVGV_RC,DYNFILE)
    COMP_STASH = 0x1396968    "main"
    START = 0x13c4720 ===> 1
    ROOT = 0x13c46e0
    GVGV::GV = 0x13c1c60    "main" :: "__ANON__"
    FILE = "-e"
    DEPTH = 0
    FLAGS = 0x14c0
    OUTSIDE_SEQ = 44
    PADLIST = 0x1396d10
    PADNAME = 0x13b5bf0(0x13b9f58) PAD = 0x13b5c08(0x13b9b98)
       1. 0x13c1b10<1> FAKE "$x" flags=0x2 index=1
    OUTSIDE = 0x13c1ae0 (doof)
    SV = PVCV(0x13b44e8) at 0x13c1ae0
      REFCNT = 2
      FLAGS = (DYNFILE)
      COMP_STASH = 0x1396968    "main"
      START = 0x13c4680 ===> 2
      ROOT = 0x13d62a0
      GVGV::GV = 0x13c1d38    "main" :: "doof"
      FILE = "-e"
      DEPTH = 0
      FLAGS = 0x1000
      OUTSIDE_SEQ = 43
      PADLIST = 0x13c1af8
      PADNAME = 0x13c1b88(0x13c47b8) PAD = 0x13c1b40(0x13c49c8)
         1. 0x13b5cc8<1> (43,45) "$x"
         2. 0x1396bd8<1> (0,0) "&"
      OUTSIDE = 0x1396d28 (MAIN)


5.18, blead:
$ ./perl -Ilib -MDevel::Peek -le 'sub doof { my $x; return sub { $x } }
Dump(doof())'
SV = IV(0x1922758) at 0x1922768
  REFCNT = 1
  FLAGS = (TEMP,ROK)
  RV = 0x190dfc8
  SV = PVCV(0x19472e8) at 0x190dfc8
    REFCNT = 2
    FLAGS = (ANON,CLONED,CVGV_RC)
    COMP_STASH = 0x190de30    "main"
    START = 0x192eff0 ===> 1
    ROOT = 0x192ef68
    GVGV::GV = 0x192f3f8    "main" :: "__ANON__"
    FILE = "-e"
    DEPTH = 0
    FLAGS = 0x4c0
    OUTSIDE_SEQ = 44
    PADLIST = 0x191c1a0
    PADNAME = 0x192fd40(0x19334d0) PAD = 0x190e208(0x1925b90)
       1. 0x1923260<1> FAKE "$x" flags=0x2 index=1
    OUTSIDE = 0x0 (null)
    SV = 0

Both OUTSIDE and SV now point to null, and some information is missing. I
imagine that the work on lexical subs might've broken this.

I've added some tests adding coverage for Devel::Peek and dump.c in
https://github.com/Hugmeir/utf8mess/tree/dump_c_cleanliness -- could
someone look into maybe merging that?

Thread Previous


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