Front page | perl.perl5.porters |
Postings from July 2013
[perl #119049] referencing some variables hides others from PadWalker starting 5.17.2
Thread Previous
From:
Ricardo SIGNES
Date:
July 28, 2013 00:05
Subject:
[perl #119049] referencing some variables hides others from PadWalker starting 5.17.2
Message ID:
rt-3.6.HEAD-2552-1374969939-1439.119049-75-0@perl.org
# New Ticket Created by Ricardo SIGNES
# Please include the string: [perl #119049]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=119049 >
This is a bug report for perl from rjbs@cpan.org,
generated with the help of perlbug 1.39 running under perl 5.19.2.
-----------------------------------------------------------------
[Please describe your issue here]
I received a user report along with an excellent reproducer, here converted to a test:
use PadWalker 'peek_my';
use Test::More;
my ($var1, $var2, $var3);
our $want = { map {; $_ => \undef } qw($var1 $var2 $var3) };
sub { is_deeply( peek_my(0), $want, 'anon A' ); }->();
sub { is_deeply( peek_my(0), $want, 'anon B' ); $var2 }->();
sub named1 { is_deeply( peek_my(0), $want, 'named A'); }; named1();
sub named2 { is_deeply( peek_my(0), $want, 'named B'); $var2 }; named2();
{ is_deeply( peek_my(0), $want, 'block A'); };
{ is_deeply( peek_my(0), $want, 'block B'); $var2 };
I am reporting this to perlbug because I am assuming it is not a bug in
PadWalker, but rather in perl. 5.17.2 is when the slab allocator landed, as
well as changes to closures (mostly mentioned w/r/t formats). I had a quick
run at testing on a single commit, but got segfaults.
I can't spend any more time on this tonight, so am filing this report.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=high
---
Site configuration information for perl 5.19.2:
Configured by rjbs at Mon Jul 22 14:23:38 PDT 2013.
Summary of my perl5 (revision 5 version 19 subversion 2) configuration:
Platform:
osname=darwin, osvers=12.4.0, archname=darwin-2level
uname='darwin walrus.local 12.4.0 darwin kernel version 12.4.0: wed may 1 17:57:12 pdt 2013; root:xnu-2050.24.15~1release_x86_64 x86_64 '
config_args='-de -Dprefix=/Users/rjbs/perl5/perlbrew/perls/19.2 -Dusedtrace -Dusedevel -Aeval:scriptdir=/Users/rjbs/perl5/perlbrew/perls/19.2/bin'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include',
optimize='-O3',
cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include'
ccversion='', gccversion='4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.57))', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -L/usr/local/lib -L/opt/local/lib'
libpth=/usr/local/lib /opt/local/lib /usr/lib
libs=-lgdbm -ldbm -ldl -lm -lutil -lc
perllibs=-ldl -lm -lutil -lc
libc=, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib -fstack-protector'
---
@INC for perl 5.19.2:
/Users/rjbs/.perlbrew/libs/19.2@std/lib/perl5/darwin-2level
/Users/rjbs/.perlbrew/libs/19.2@std/lib/perl5
/Users/rjbs/perl5/perlbrew/perls/19.2/lib/site_perl/5.19.2/darwin-2level
/Users/rjbs/perl5/perlbrew/perls/19.2/lib/site_perl/5.19.2
/Users/rjbs/perl5/perlbrew/perls/19.2/lib/5.19.2/darwin-2level
/Users/rjbs/perl5/perlbrew/perls/19.2/lib/5.19.2
.
---
Environment for perl 5.19.2:
DYLD_LIBRARY_PATH (unset)
HOME=/Users/rjbs
LANG=en_US.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/Users/rjbs/.perlbrew/libs/19.2@std/bin:/Users/rjbs/perl5/perlbrew/bin:/Users/rjbs/perl5/perlbrew/perls/19.2/bin:/Users/rjbs/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/rjbs/code/hla
PERL5LIB=/Users/rjbs/.perlbrew/libs/19.2@std/lib/perl5
PERLBREW_BASHRC_VERSION=0.63
PERLBREW_HOME=/Users/rjbs/.perlbrew
PERLBREW_LIB=std
PERLBREW_MANPATH=/Users/rjbs/.perlbrew/libs/19.2@std/man:/Users/rjbs/perl5/perlbrew/perls/19.2/man
PERLBREW_PATH=/Users/rjbs/.perlbrew/libs/19.2@std/bin:/Users/rjbs/perl5/perlbrew/bin:/Users/rjbs/perl5/perlbrew/perls/19.2/bin
PERLBREW_PERL=19.2
PERLBREW_ROOT=/Users/rjbs/perl5/perlbrew
PERLBREW_VERSION=0.63
PERLDOC=-n/opt/local/bin/groff
PERL_AUTOINSTALL=--skipdeps
PERL_BADLANG (unset)
PERL_LOCAL_LIB_ROOT=/Users/rjbs/.perlbrew/libs/19.2@std
PERL_MAILERS=sendmail:/Users/rjbs/bin/sendmail
PERL_MB_OPT=--install_base /Users/rjbs/.perlbrew/libs/19.2@std
PERL_MM_OPT=INSTALL_BASE=/Users/rjbs/.perlbrew/libs/19.2@std
SHELL=/opt/local/bin/zsh
Thread Previous