develooper Front page | perl.perl5.porters | Postings from January 2008

[perl #49298] B::Deparse fails to deparse a reference to an anonymous hash

Thread Next
From:
David Leadbeater
Date:
January 2, 2008 13:57
Subject:
[perl #49298] B::Deparse fails to deparse a reference to an anonymous hash
Message ID:
rt-3.6.HEAD-20998-1199272791-1172.49298-75-0@perl.org
# New Ticket Created by  David Leadbeater 
# Please include the string:  [perl #49298]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=49298 >


This is a bug report for perl from dgl@dgl.cx,
generated with the help of perlbug 1.36 running under perl 5.10.0.


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

B::Deparse fails to deparse a reference to an anonymous hash under 5.10, the
same code works fine under 5.8.8.

Code to reproduce:

  #!/usr/local/bin/perl
  use B::Deparse; 
  print B::Deparse->new->coderef2text(sub { \{} }); 
 
This results in: 
 
Can't use an undefined value as an ARRAY reference at 
/usr/local/lib/perl5/5.10.0/i686-linux/B/Deparse.pm line 1795. 
 
It seems that anon_hash_or_list in Deparse.pm isn't expecting to get passed an 
op where $op->name is srefgen. My understanding of the internals isn't good 
enough to figure much more out.. 
 
David 

[Please do not change anything below this line] 
----------------------------------------------------------------- 
--- 
Flags: 
    category=library 
    severity=medium 
--- 
Site configuration information for perl 5.10.0: 
 
Configured by dleadbeater at Wed Jan  2 10:17:53 UTC 2008. 
 
Summary of my perl5 (revision 5 version 10 subversion 0) configuration: 
  Platform: 
    osname=linux, osvers=2.6.12-xenu, archname=i686-linux 
    uname='linux bara.devel.messagelabs.com 2.6.12-xenu #1 mon aug 15 15:47:25 bst 2005 i686 i686 i386 gnulinux ' 
    config_args='-de -Doptimize=-g' 
    hint=previous, useposix=true, d_sigaction=define 
    useithreads=undef, usemultiplicity=undef 
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef 
    use64bitint=undef, use64bitall=undef, uselongdouble=undef 
    usemymalloc=n, bincompat5005=undef 
  Compiler: 
    cc='cc', ccflags ='-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', 
    optimize='-g', 
    cppflags='-fno-strict-aliasing -pipe -I/usr/local/include -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' 
    ccversion='', gccversion='4.1.1 20070105 (Red Hat 4.1.1-52)', gccosandvers='' 
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.5.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.5'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -g -L/usr/local/lib'

Locally applied patches:


---
@INC for perl 5.10.0:
    /usr/local/lib/perl5/5.10.0/i686-linux
    /usr/local/lib/perl5/5.10.0
    /usr/local/lib/perl5/site_perl/5.10.0/i686-linux
    /usr/local/lib/perl5/site_perl/5.10.0
    .

---
Environment for perl 5.10.0:
    HOME=/home/dleadbeater
    LANG=en_GB.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/dleadbeater/bin:/sbin:/usr/sbin:/usr/local/sbin:/sw/bin:/sw/sbin:/usr/local/bin:/usr/local/bin:/bin:/usr/bin:/home/dleadbeater/bin:/var/qmail/bin:/home/dleadbeater/bin
    PERL_BADLANG (unset)
    SHELL=/bin/zsh


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