Front page | perl.perl5.porters |
Postings from April 2014
[perl #121646] while each %$ref clobbers @_ in some circumstances
Thread Next
From:
yves orton
Date:
April 13, 2014 17:26
Subject:
[perl #121646] while each %$ref clobbers @_ in some circumstances
Message ID:
rt-4.0.18-8082-1397409987-1187.121646-75-0@perl.org
# New Ticket Created by yves orton
# Please include the string: [perl #121646]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=121646 >
This is a bug report for perl from demerphq@gmail.com,
generated with the help of perlbug 1.40 running under perl 5.19.11.
-----------------------------------------------------------------
[Please describe your issue here]
The following should print "ok". The triggers seems to be the
condition clause in C< 1 while each %$r; >. Changing this
in simple ways, such as removing the while just calling each,
or other simple changes seem to eliminate the problem.
perl -le'
t(["foo"],
sub {
my $got= $_[0];
my $r={};
1 while each %$r;
print $_[0] ne $got ? "not " : "", "ok"
});
sub t{my ($ary,$sub)=@_; $sub->($_) for @$ary; }
'
not ok
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl 5.19.11:
Configured by yorton at Sun Apr 13 18:56:14 CEST 2014.
Summary of my perl5 (revision 5 version 19 subversion 11) configuration:
Snapshot of: 0c5ea01913265b717b8615a704acd13ddde5b078
Platform:
osname=linux, osvers=3.8.0-19-generic, archname=x86_64-linux
uname='linux shire 3.8.0-19-generic #30-ubuntu smp wed may 1
16:35:23 utc 2013 x86_64 x86_64 x86_64 gnulinux '
config_args='-de -Dcc=ccache gcc -Dld=gcc
-Dprefix=/home/yorton/perl5/perlbrew/perls/perl-blead -Dusedevel
-Aeval:scriptdir=/home/yorton/perl5/perlbrew/perls/perl-blead/bin'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='ccache gcc', ccflags ='-fwrapv -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector
-I/usr/local/include'
ccversion='', gccversion='4.7.3', 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='gcc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/4.7/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu
/lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
libs=-lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.17.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.17'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib
-fstack-protector'
---
@INC for perl 5.19.11:
/home/yorton/perl5/perlbrew/perls/perl-blead/lib/site_perl/5.19.11/x86_64-linux
/home/yorton/perl5/perlbrew/perls/perl-blead/lib/site_perl/5.19.11
/home/yorton/perl5/perlbrew/perls/perl-blead/lib/5.19.11/x86_64-linux
/home/yorton/perl5/perlbrew/perls/perl-blead/lib/5.19.11
.
---
Environment for perl 5.19.11:
HOME=/home/yorton
LANG=en_GB.utf8
LANGUAGE (unset)
LC_ADDRESS=en_CA.UTF-8
LC_IDENTIFICATION=en_CA.UTF-8
LC_MEASUREMENT=en_CA.UTF-8
LC_MONETARY=en_CA.UTF-8
LC_NAME=en_CA.UTF-8
LC_NUMERIC=en_CA.UTF-8
LC_PAPER=en_CA.UTF-8
LC_TELEPHONE=en_CA.UTF-8
LC_TIME=en_CA.UTF-8
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/yorton/perl5/perlbrew/bin:/home/yorton/perl5/perlbrew/perls/perl-blead/bin:/home/yorton/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/yorton/bin
PERLBREW_BASHRC_VERSION=0.67
PERLBREW_HOME=/home/yorton/.perlbrew
PERLBREW_MANPATH=/home/yorton/perl5/perlbrew/perls/perl-blead/man
PERLBREW_PATH=/home/yorton/perl5/perlbrew/bin:/home/yorton/perl5/perlbrew/perls/perl-blead/bin
PERLBREW_PERL=perl-blead
PERLBREW_ROOT=/home/yorton/perl5/perlbrew
PERLBREW_VERSION=0.67
PERL_BADLANG (unset)
SHELL=/bin/bash
--
perl -Mre=debug -e "/just|another|perl|hacker/"
Thread Next
-
[perl #121646] while each %$ref clobbers @_ in some circumstances
by yves orton