Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing a for array dumps core #5463

Closed
p5pRT opened this issue May 14, 2002 · 4 comments
Closed

Changing a for array dumps core #5463

p5pRT opened this issue May 14, 2002 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented May 14, 2002

Migrated from rt.perl.org#9336 (status was 'resolved')

Searchable as RT9336$

@p5pRT
Copy link
Author

p5pRT commented May 14, 2002

From ton@infonet-europe.net

Created by hostmaster@eqip.net

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)

Perl Info

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


@p5pRT
Copy link
Author

p5pRT commented May 14, 2002

From @rgarcia

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.

--
Rafael Garcia-Suarez

@p5pRT
Copy link
Author

p5pRT commented Jul 13, 2005

From @smpeters

[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.

perl -wle '$#F-- for@​F=1..5'
Use of freed value in iteration at -e line 1.

@p5pRT p5pRT closed this as completed Jul 13, 2005
@p5pRT
Copy link
Author

p5pRT commented Jul 13, 2005

@smpeters - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant