Front page | perl.perl5.porters |
Postings from February 2003
[perl #21261] B::Terse not outputting correct constants or variable names
Thread Next
From:
Philip Newton
Date:
February 17, 2003 06:20
Subject:
[perl #21261] B::Terse not outputting correct constants or variable names
Message ID:
rt-21261-52243.8.8320580542036@bugs6.perl.org
# New Ticket Created by Philip Newton
# Please include the string: [perl #21261]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=21261 >
This is a bug report for perl from Philip.Newton@datenrevision.de,
generated with the help of perlbug 1.34 running under perl v5.8.0.
-----------------------------------------------------------------
[Please enter your report here]
B::Terse does not give correct values for variable names or constants,
while
previous versions did. (I'm not sure whether this is related to the
fact that
the newer version of Perl is compiled with ithreads and the older one I
tried
isn't. I also tried it on two version of ActivePerl; one based on 5.8.0
at
home [Win98] and one based on 5.6.0 at work [NT] -- both also give the
spurious results.)
Observe -
bad results:
lx pne/home/pne> perl -MO=Terse -e 'for(1..10) { $x = $_ * 10 }'
LISTOP (0x814b110) leave [1]
OP (0x814b138) enter
COP (0x81af608) nextstate
BINOP (0x81af5e0) leaveloop
LOOP (0x81b0660) enteriter
OP (0x814a6d0) null [3]
UNOP (0x81b0618) null [141]
OP (0x81b0640) pushmark
SVOP (0x814b5e8) const SPECIAL #0 Nullsv
SVOP (0x813dca8) const SPECIAL #0 Nullsv
PADOP (0x81b05f8) gv 6
UNOP (0x8150f20) null
LOGOP (0x81b03e8) and
OP (0x81b03a8) iter
LISTOP (0x81b05d0) lineseq
COP (0x81b0590) nextstate
BINOP (0x81b0568) sassign
BINOP (0x81b0540) multiply [5]
UNOP (0x81b04c8) null [15]
PADOP (0x81b04a8) gvsv 4
SVOP (0x81b0520) const SPECIAL #0 Nullsv
UNOP (0x81b0488) null [15]
PADOP (0x81b0410) gvsv 3
OP (0x81b03c8) unstack
COP (0x8150ee0) nextstate
-e syntax OK
As you can see, the variables "$x" and "$_" have been reduced to "gvsv
3" and
"gvsv 4" in the loop, and to "gv 6" in the foreach statement. Also, the
constants all show up as "SPECIAL #0 Nullsv".
Compare this with the output from an earlier perl:
lx pne/home/pne> /usr/bin/perl -MO=Terse -e 'for(1..10) { $x = $_ * 10
}'
LISTOP (0x8182860) leave
OP (0x8182888) enter
COP (0x8182828) nextstate
BINOP (0x8182800) leaveloop
LOOP (0x81824d8) enteriter
OP (0x8106b10) null [3]
UNOP (0x8182718) null [141]
OP (0x8182740) pushmark
SVOP (0x8176590) const IV (0x80f64f0) 1
SVOP (0x81068b0) const IV (0x8100ef4) 10
SVOP (0x81826f8) gv GV (0x80f6400) *_
UNOP (0x81827e0) null
LOGOP (0x81827b8) and
OP (0x8176600) iter
LISTOP (0x81826d0) lineseq
COP (0x8182698) nextstate
BINOP (0x8182670) sassign
BINOP (0x8182648) multiply [3]
UNOP (0x8182608) null [15]
SVOP (0x81825e8) gvsv GV (0x80f6400)
*_
SVOP (0x8182628) const IV (0x8175d44) 10
UNOP (0x81825c8) null [15]
SVOP (0x8182518) gvsv GV (0x8175db0) *x
OP (0x8182760) unstack
COP (0x8182780) nextstate
-e syntax OK
This properly contains *_, *x, 1, and 10.
That perl is:
lx pne/home/pne> /usr/bin/perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0)
configuration:
Platform:
osname=linux, osvers=2.4.6-3.1enterprise, archname=i386-linux
uname='linux stripples.devel.redhat.com 2.4.6-3.1enterprise #1 smp
tue jul 24 14:03:17 edt 2001 i686 unknown '
config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dcc=gcc -
Dcccdlflags=-fPIC -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-
linux -Dd_dosuid -Dd_semctl_semun -Di_db -Di_ndbm -Di_gdbm -Di_shadow -
Di_syslog -Dman3ext=3pm -Uuselargefiles'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usesocks=undef
Compiler:
cc='gcc', optimize='-O2 -march=i386 -mcpu=i686', gccversion=2.96
20000731 (Red Hat Linux 7.1 2.96-96)
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccflags ='-fno-strict-aliasing -I/usr/local/include'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
alignbytes=4, usemymalloc=n, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -ldl -lm -lc -lcrypt
libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-
rdynamic'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options:
Built under linux
Compiled at Aug 9 2001 22:48:52
@INC:
/usr/lib/perl5/5.6.0/i386-linux
/usr/lib/perl5/5.6.0
/usr/lib/perl5/site_perl/5.6.0/i386-linux
/usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl
.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=library
severity=medium
---
Site configuration information for perl v5.8.0:
Configured by pne at Sat Feb 1 16:59:24 CET 2003.
Summary of my perl5 (revision 5.0 version 8 subversion 0)
configuration:
Platform:
osname=linux, osvers=2.4.7-10smp, archname=i686-linux-thread-multi-
64int-ld
uname='linux hamstux001 2.4.7-10smp #1 smp thu sep 6 17:09:31 edt
2001 i686 unknown '
config_args='-Accflags=-DPERL_Y2KWARN -Dcc=gcc -Dprefix=/home/pne -
Uinstallusrbinperl -Duselargefiles -Duse64bitint -Duselongdouble -
Dusethreads -Duseithreads'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=define
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DPERL_Y2KWARN -fno-
strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -
D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DPERL_Y2KWARN -fno-strict-
aliasing -I/usr/local/include -I/usr/include/gdbm'
ccversion='', gccversion='2.96 20000731 (Red Hat Linux 7.1 2.96-
98)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long long', ivsize=8, nvtype='long double', nvsize=12,
Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.2.4'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-
rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Locally applied patches:
---
@INC for perl v5.8.0:
/home/pne/lib/perl5/5.8.0/i686-linux-thread-multi-64int-ld
/home/pne/lib/perl5/5.8.0
/home/pne/lib/perl5/site_perl/5.8.0/i686-linux-thread-multi-64int-
ld
/home/pne/lib/perl5/site_perl/5.8.0
/home/pne/lib/perl5/site_perl
.
---
Environment for perl v5.8.0:
HOME=/home/pne
LANG=C
LANGUAGE (unset)
LC_CTYPE=de_DE.ISO8859-1
LD_LIBRARY_PATH=/usr/lib/X11:/users/dtm_vt/lib:/users/tegaron/bin:/appl/
tuxedo/8.0/lib:/appl/oracle/9.2.0.1.0/lib:/users/sde/sdeexe30/lib
LOGDIR (unset)
PATH=/home/pne/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/bin:
.:/usr/local/bin:/usr/bin/X11:/sbin:/home/pne/bin:/users/dtm_vt:/users/d
tm_vt/bin:/users/dtm_vt/bin/vtmake:/users/tegaron/bin:/users/tegaron/uti
l:/appl/tuxedo/8.0/bin:/appl/tuxedo/8.0/util:/appl/oracle/9.2.0.1.0/bin:
/users/sde/sdeexe30/bin:/bin:/home/vt/testdaten/testscripte
PERL_BADLANG (unset)
SHELL=/bin/ksh
--
Philip Newton <pnewton@gmx.de>
Thread Next
-
[perl #21261] B::Terse not outputting correct constants or variable names
by Philip Newton