List Info

Thread: Blead segfaults on local *@; eval




Blead segfaults on local *@; eval
user name
2007-05-29 23:26:54
# New Ticket Created by  eirikallverden.no 
# Please include the string:  [perl #43073]
# in the subject line of all future correspondence about
this issue. 
# <URL: h
ttp://rt.perl.org/rt3/Ticket/Display.html?id=43073 >



This is a bug report for perl from eirikblackbox.dav,
generated with the help of perlbug 1.35 running under perl
5.9.5.


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

To demonstrate:

eirikblackbox[05:14:50]~$ bleadperl -e 'local *; eval
'
Segmentation fault
eirikblackbox[05:16:50]~$ 

If I trace or step through the code in the debugger, it
terminates
successfully at the end of the code (which made this failure
a pain to
track down).  Otherwise it segfaults in the debugger as
well.

It's just blead, as far as I can tell.  This runs just fine
in 5.8.8
and older releases, as well as in maint (as of a week ago,
at least).

[Please do not change anything below this line]
------------------------------------------------------------
-----
---
Flags:
    category=core
    severity=low
---
Site configuration information for perl 5.9.5:

Configured by eirik at Wed May 30 04:30:09 CEST 2007.

Summary of my perl5 (revision 5 version 9 subversion 5 patch
31308) configuration:
  Platform:
    osname=linux, osvers=2.6.17.1320070524,
archname=i686-linux
    uname='linux blackbox 2.6.17.1320070524 #1 thu may 24
11:29:03 cest 2007 i686 pentium4 i386 gnulinux '
    config_args='-des -Dusedevel -Dprefix=/opt/perl-blead'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define,
usesocks=undef
    use64bitint=undef, use64bitall=undef,
uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -pipe
-I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-fno-strict-aliasing -pipe
-I/usr/local/include'
    ccversion='', gccversion='3.4.6', 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, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.3.6.so, so=so, useshrplib=false,
libperl=libperl.a
    gnulibc_version='2.3.6'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef,
ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2
-L/usr/local/lib'

Locally applied patches:
    DEVEL

---
INC
for perl 5.9.5:
    /opt/perl-blead/lib/5.9.5/i686-linux
    /opt/perl-blead/lib/5.9.5
    /opt/perl-blead/lib/site_perl/5.9.5/i686-linux
    /opt/perl-blead/lib/site_perl/5.9.5
    .

---
Environment for perl 5.9.5:
    HOME=/home/eirik
    LANG=en_US
    LANGUAGE (unset)
    LC_COLLATE=C
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
   
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/sbin:/usr/sb
in:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/ga
mes:/usr/lib/java/bin:/usr/lib/java/jre/bin:/usr/local/apach
e/bin:/local/bin:/home/eirik/bin:/home/eirik/reddwarf/bin:/o
pt/kde/bin
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Re: Blead segfaults on local *@; eval
user name
2007-05-30 12:20:47
On Tue, May 29, 2007 at 09:26:54PM -0700, eirik 
allverden. no wrote:

Thanks for the report

> eirikblackbox[05:14:50]~$ bleadperl -e 'local *; eval
'
> Segmentation fault
> eirikblackbox[05:16:50]~$ 

> It's just blead, as far as I can tell.  This runs just
fine in 5.8.8
> and older releases, as well as in maint (as of a week
ago, at least).

==10919== Invalid read of size 4
==10919==    at 0x8107B0D: Perl_sv_setpvn (sv.c:3859)
==10919==    by 0x81641CD: Perl_create_eval_scope
(pp_ctl.c:3620)
==10919==    by 0x81641FF: Perl_pp_entertry (pp_ctl.c:3630)
==10919==    by 0x80AD2F2: Perl_runops_debug (dump.c:1920)
==10919==  Address 0x8 is not stack'd, malloc'd or
(recently) free'd
==10919== 
==10919== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c]
---- y

0x08107b0d in Perl_sv_setpvn (sv=0x0, ptr=0x8254c40
"", len=0) at sv.c:3859
3859        SV_CHECK_THINKFIRST_COW_DROP(sv);
(gdb) up
#1  0x081641ce in Perl_create_eval_scope (flags=0) at
pp_ctl.c:3620
3620            sv_setpvn(ERRSV,"",0);
(gdb) P PL_errgv
$1 = (GV *) 0x1bab42c0

(gdb) p *(PL_errgv->sv_u.svu_gp)
$4 = {gp_sv = 0x0, gp_io = 0x0, gp_cv = 0x0, gp_cvgen = 0,
gp_refcnt = 1,
  gp_hv = 0x0, gp_av = 0x0, gp_form = 0x0, gp_egv =
0x1bab42c0, gp_line = 1,
  gp_file_hek = 0x1bac4d64}

so, ERRSV is clearly a NULL pointer. But quite why, I don't
know.
And whether it's "allowed" to be, I also don't
know.

Nicholas Clark

Re: Blead segfaults on local *@; eval
user name
2007-05-30 16:00:12
On 5/29/07, via RT eirik  allverden. no
<perlbug-followupperl.org> wrote:
> eirikblackbox[05:14:50]~$ bleadperl -e 'local *; eval
'

> It's just blead, as far as I can tell.  This runs just
fine in 5.8.8
> and older releases, as well as in maint (as of a week
ago, at least).

I've just moved to a new house and don't have easy access to
my stack
of perls but I've expected for quite some time now that
that
localizing * is asking for segfaults. I'm just now realizing I
should
have filed a bug against that and perhaps fixed it...

Anyway, my memory is that this has existed as a problem for
a while
now and wouldn't be new to blead.

Josh

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )