develooper Front page | perl.perl5.porters | Postings from November 1999

Re: [ID 19991123.001] Perl segfault w/ specific weird syntax.

Thread Previous
From:
andreas.koenig
Date:
November 23, 1999 00:57
Subject:
Re: [ID 19991123.001] Perl segfault w/ specific weird syntax.
Message ID:
sfcvh6tfuvj.fsf@hohenstaufen.in-berlin.de
>>>>> On Tue, 23 Nov 1999 00:12:13 -0600, Ian Baker <ian@sonic.net> said:

 > Hi.  I'm running Perl, version 5.005_03 built for i386-linux

 > I'm getting a segfault under a particular little strange condition.  The
 > smallest bit of code I've managed to reproduce it with is as follows:

 > my $var1 = '';
 > my $var2 = '';
 > @arr1 = qw( );
 > sub

 > If you save that in a file, let's call it bug.pl, and then execute:

 > perl -e "require 'bug.pl'"

Confirmed for current snapshot of perl5.005_62+. Can be reduced to

perl -e '
eval q{my $var1 = ""; 
my $var2 = "";
@arr1 = qw();
sub};
'

As I have a debugging perl here, I'll add my stack trace:

(gdb) bt
#0  0x8080eb2 in Perl_pad_free (po=4) at op.c:508
#1  0x80812dd in S_op_clear (o=0x813c448) at op.c:786
#2  0x8081109 in Perl_op_free (o=0x813c448) at op.c:685
#3  0x80810ae in Perl_op_free (o=0x813c088) at op.c:673
#4  0x80810ae in Perl_op_free (o=0x813c508) at op.c:673
#5  0x80eaca7 in S_doeval (gimme=0, startop=0x0) at pp_ctl.c:2635
#6  0x80ec829 in Perl_pp_require () at pp_ctl.c:3010
#7  0x80aea4b in Perl_runops_debug () at run.c:56
#8  0x805b951 in S_run_body (args=0xbffffaec) at perl.c:1201
#9  0x80de113 in Perl_vdefault_protect (pcur_env=0xbffffb00, excpt=0xbffffbb0, 
    body=0x805b7e0 <S_run_body>, args=0xbffffacc) at scope.c:45
#10 0x80de029 in Perl_default_protect (pcur_env=0xbffffb00, excpt=0xbffffbb0, 
    body=0x805b7e0 <S_run_body>) at scope.c:26
#11 0x805b563 in perl_run (my_perl=0x812ec08) at perl.c:1134
#12 0x805898f in main (argc=3, argv=0xbffffbe4, env=0xbffffbf4)
    at perlmain.c:53


-- 
andreas


Summary of my perl5 (revision 5.0 version 5 subversion 63) configuration:
  Platform:
    osname=linux, osvers=2.2.12, archname=i586-linux
    uname='linux hohenstaufen.in-berlin.de 2.2.12 #2 smp sat oct 2 11:10:42 cest 1999 i586 unknown '
    config_args='-Dprefix=/sources-perl/inst/perl5.005_62..4590g -Doptimize=-g -des -Dusemymalloc'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
    use64bits=undef usemultiplicity=undef
  Compiler:
    cc='cc', optimize='-g', gccversion=2.7.2.3
    cppflags='-Dbool=char -DHAS_BOOL -DDEBUGGING -I/usr/local/include'
    ccflags ='-Dbool=char -DHAS_BOOL -DDEBUGGING -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
    alignbytes=4, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=/lib/libc-2.0.7.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: DEBUGGING
  Built under linux
  Compiled at Nov 18 1999 16:24:18
  @INC:
    /sources-perl/inst/perl5.005_62..4590g/lib/5.00563/i586-linux
    /sources-perl/inst/perl5.005_62..4590g/lib/5.00563
    /sources-perl/inst/perl5.005_62..4590g/lib/site_perl/5.00563/i586-linux
    /sources-perl/inst/perl5.005_62..4590g/lib/site_perl
    .

Thread Previous


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