Skip Menu |
 
Report information
Id: 9336
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: ton [at] infonet-europe.net
Cc:
AdminCc:

Operating System: Solaris
PatchStatus: (no value)
Severity: low
Type: core
Perl Version: 5.7.0
Fixed In: (no value)



Date: 14 May 2002 13:47:31 -0000
From: ton [...] infonet-europe.net
To: perlbug [...] perl.org
Subject: Changing a for array dumps core
Download (untitled) / with headers
text/plain 3.2k
This is a bug report for perl from hostmaster@eqip.net, generated with the help of perlbug 1.32 running under perl v5.7.0. ----------------------------------------------------------------- [Please enter your report here] Ok, i know the docs say not to do things like this, but it still shouldn't dump core: perl -wle '$#F-- for@F=1..5' Attempt to free unreferenced scalar. Attempt to free unreferenced scalar. Attempt to free unreferenced scalar. Attempt to free unreferenced scalar. Attempt to free unreferenced scalar. Attempt to free unreferenced scalar. Attempt to free unreferenced scalar. Bus Error (core dumped) [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=low --- Site configuration information for perl v5.7.0: Configured by ton at Wed Nov 8 00:26:07 MET 2000. Summary of my perl5 (revision 5.0 version 7 subversion 0) configuration: Platform: osname=solaris, osvers=2.7, archname=sun4-solaris uname='sunos freya 5.7 generic_106541-12 sun4u sparc sunw,ultra-2 ' config_args='' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='gcc', ccflags ='-fno-strict-aliasing -I/opt/gnu/include -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2 -fomit-frame-pointer -mcpu=ultrasparc', cppflags='-fno-strict-aliasing -I/opt/gnu/include -I/usr/local/include' ccversion='', gccversion='egcs-2.91.60 19981201 (egcs-1.1.1 release)', gccosandvers='solaris2.7' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='gcc', ldflags ='-L/opt/gnu/lib -L/usr/local/lib -R/opt/gnu/lib -R/usr/local/lib ' libpth=/opt/gnu/lib /usr/local/lib /lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lcrypt -lsec libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-E' cccdlflags='-fPIC', lddlflags=' -W,l-E -G -L/opt/gnu/lib -L/usr/local/lib -R/opt/gnu/lib -R/usr/local/lib' Locally applied patches: --- @INC for perl v5.7.0: /opt/gnu/lib/perl5/5.7.0/sun4-solaris /opt/gnu/lib/perl5/5.7.0 /opt/gnu/lib/perl5/site_perl/5.7.0/sun4-solaris /opt/gnu/lib/perl5/site_perl/5.7.0 /opt/gnu/lib/perl5/site_perl . --- Environment for perl v5.7.0: HOME=/home/ton LANG=C LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/ton/bin.SunOS:/home/ton/bin:/home/ton/bin.SampleSetup:/opt/gnu/share/bin:/opt/gnu/bin:/opt/Acrobat3/bin:/opt/SUNWrtvc/bin:/opt/StarOffice/bin:/usr/local/bin:/usr/local/sbin:/usr/java/bin:/home/oracle/app/oracle/product/8.0.5/bin:/usr/local/games/bin:/usr/X11R6/bin:/usr/openwin/bin:/usr/ccs/bin:/usr/ucb:/usr/bin:/usr/sbin:/sbin:. PERL_BADLANG (unset) SHELL=/usr/bin/bash
Date: Tue, 14 May 2002 16:21:16 +0200
From: Rafael Garcia-Suarez <raphel.garcia-suarez [...] hexaflux.com>
To: ton [...] infonet-europe.net
Cc: perl5-porters [...] perl.org
Subject: Re: [ID 20020514.009] Changing a for array dumps core
Download (untitled) / with headers
text/plain 380b
ton@infonet-europe.net wrote: Show quoted text
> Ok, i know the docs say not to do things like this, but it still > shouldn't dump core: > perl -wle '$#F-- for@F=1..5'
You play too much golf, don't you. This bug is confirmed with bleadperl. Strangely, moving the assignment out of the for() statement : $ bleadperl -e '@x=1..5; $#x-- for @x' doesn't dump core. -- Rafael Garcia-Suarez
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 575b
Show quoted text
> [RT_System - Tue May 14 00:25:37 2002]: > > ton@infonet-europe.net wrote:
> > Ok, i know the docs say not to do things like this, but it still > > shouldn't dump core: > > perl -wle '$#F-- for@F=1..5'
> > You play too much golf, don't you. > > This bug is confirmed with bleadperl. > Strangely, moving the assignment out of the for() statement : > $ bleadperl -e '@x=1..5; $#x-- for @x' > doesn't dump core. > >
This coredump seems to have been resolved sometime prior to Perl 5.8.7. Show quoted text
> perl -wle '$#F-- for@F=1..5'
Use of freed value in iteration at -e line 1.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org