develooper Front page | perl.perl5.porters | Postings from August 2001

[ID 20010823.013] Core dump new to 5.6.1

Thread Next
From:
Ian Phillipps
Date:
August 23, 2001 10:23
Subject:
[ID 20010823.013] Core dump new to 5.6.1
Message ID:
200108231722.f7NHMoi22013@homer.diplex.co.uk

This is a bug report for perl from Ian.Phillipps@iname.com,
generated with the help of perlbug 1.33 running under perl v5.6.1.


-----------------------------------------------------------------
[Please enter your report here]


The following produces a SEGV. It's a minimal reduction of a program that's
worked since Perl 2 (well, ok, this bit hasn't :-) This was OK in 5.6.0, now
broken.

Most of this is needed to tickle the bug; in particular removing the BEGIN
makes it ok, as does changing $_[1] to $_[0] with corresponding change to call.
So does changing $actions{'x'} to $bar. It doesn't matter if $foo is defined.

The config information is incorrect, but not misleading. The perl that produced
the backtrace is one I just built from sources, with '-g -O2' but otherwise
defaults; the one that perlbug mentions is the version that came with Slackware
8.0.

Now to try 5.7.1...

Ian

#! /usr/bin/perl
BEGIN {
    %actions = (
	'x' => sub {
		    eval $_[1];
		},
    );
}

&{$actions{'x'}}('x', '$foo' ) 
__END__

GDB backtrace is:

#0  Perl_av_fetch (av=0x1, key=0, lval=0) at av.c:187
#1  0x80789bb in S_pad_findlex (name=0x8101c60 "$foo", newoff=0, seq=0, 
    startcv=0x810d0e0, cx_ix=2, saweval=0, flags=0) at op.c:273
#2  0x8078ee3 in Perl_pad_findmy (name=0x8101c60 "$foo") at op.c:460
#3  0x80666dd in Perl_yylex () at toke.c:2173
#4  0x807652e in Perl_yyparse () at perly.c:1432
#5  0x80c43c8 in S_doeval (gimme=128, startop=0x0) at pp_ctl.c:2818
#6  0x80c5ae0 in Perl_pp_entereval () at pp_ctl.c:3362
#7  0x809d565 in Perl_runops_debug () at run.c:53
#8  0x805ca75 in S_run_body (oldscope=1) at perl.c:1471
#9  0x805c76b in perl_run (my_perl=0x8102520) at perl.c:1393
#10 0x8059f80 in main (argc=2, argv=0xbffff864, env=0xbffff870)
    at perlmain.c:52
#11 0x400782eb in __libc_start_main (main=0x8059f10 <main>, argc=2, 
    ubp_av=0xbffff864, init=0x8059134 <_init>, fini=0x80e3f9c <_fini>, 
    rtld_fini=0x4000c130 <_dl_fini>, stack_end=0xbffff85c)
    at ../sysdeps/generic/libc-start.c:129


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=high
---
Site configuration information for perl v5.6.1:

Configured by root at Wed Apr 11 22:55:30 PDT 2001.

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
    osname=linux, osvers=2.4.2, archname=i386-linux
    uname='linux grommet 2.4.2 #1 smp sun feb 25 16:33:33 pst 2001 i686 unknown '
    config_args='-de -Dprefix=/usr -Darchname=i386-linux -Dprivlib=/usr/lib/perl5 -Darchlib=/usr/lib/perl5/i386-linux -Dsitelib=/usr/lib/perl5/site_perl -Dsitearch=/usr/lib/perl5/site_perl/i386-linux'
    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='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.3 20010315 (release)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldl -lm -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
    libc=/lib/libc-2.2.2.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'

Locally applied patches:
    

---
@INC for perl v5.6.1:
    /u2/ian/lib/perl5
    /usr/lib/perl5/i386-linux
    /usr/lib/perl5
    /usr/lib/perl5/site_perl/i386-linux
    /usr/lib/perl5/site_perl
    /usr/lib/perl5/site_perl
    .

---
Environment for perl v5.6.1:
    HOME=/u2/ian
    LANG (unset)
    LANGUAGE (unset)
    LC_ALL=POSIX
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/u2/ian/cmd:/u2/ian/Linux:/usr/local/bin:/u2/ian/stocks/cmd:/opt/gnome/bin:/opt/kde/bin:/usr/openwin/bin:/usr/bin/X11:/usr/bin:/bin:/usr/etc:/sbin:/usr/sbin
    PERL5LIB=/u2/ian/lib/perl5
    PERL_BADLANG (unset)
    SHELL=/bin/zsh


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About