Front page | perl.perl5.porters |
Postings from June 2011
[perl #93320] local'izing @DB::args leads to coredump
From:
Sergey Aleynikov
Date:
June 22, 2011 12:32
Subject:
[perl #93320] local'izing @DB::args leads to coredump
Message ID:
rt-3.6.HEAD-16080-1308752600-734.93320-75-0@perl.org
# New Ticket Created by Sergey Aleynikov
# Please include the string: [perl #93320]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=93320 >
This is a bug report for perl from sergey.aleynikov@gmail.com,
generated with the help of perlbug 1.39 running under perl 5.14.0.
-----------------------------------------------------------------
[Please describe your issue here]
The following script produces core dump on perls from 5.8.8 to 5.14.0
#!/usr/bin/perl
sub cl{
package DB;
@DB::args = ();
return caller(shift);
}
sub f{
local @DB::args;
my @z = cl($_) for (1..3);
}
f(1,2,3); f(1,2,3);
GDB stack trace is
(gdb) bt
#0 0x0000000800b7e376 in memcpy () from /lib/libc.so.7
#1 0x00000000004bf4a1 in Perl_pp_caller () at pp_ctl.c:1965
#2 0x000000000048ce23 in Perl_runops_standard () at run.c:41
#3 0x0000000000430417 in perl_run (my_perl=Variable "my_perl" is not
#available.
) at perl.c:2350
#4 0x000000000041cc69 in main (argc=2, argv=0x7fffffffe998,
# env=0x7fffffffe9b0) at perlmain.c:120
(gdb) f 1
#1 0x00000000004bf4a1 in Perl_pp_caller () at pp_ctl.c:1965
1965 Copy(AvALLOC(ary), AvARRAY(PL_dbargs), AvFILLp(ary) + 1 + off, SV*);
(gdb) p PL_dbargs
$1 = (AV *) 0x703ac0
(gdb) p AvARRAY(PL_dbargs)
$2 = (SV **) 0x1
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=high
---
Site configuration information for perl 5.14.0:
Configured by inferno at Mon May 16 12:53:09 MSD 2011.
Summary of my perl5 (revision 5 version 14 subversion 0) configuration:
Platform:
osname=freebsd, osvers=7.3-stable, archname=amd64-freebsd
uname='freebsd sigeon.ru 7.3-stable freebsd 7.3-stable #2: wed oct 13 22:55:27 msd 2010 inferno@sigeon.ru:usrobjusrsrcsyssigeon amd64 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=y, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include',
optimize='-O -g -ggdb3',
cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.2.1 20070719 [FreeBSD]', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags ='-Wl,-E -fstack-protector -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lgdbm -ldb -lm -lcrypt -lutil -lc
perllibs=-lm -lcrypt -lutil -lc
libc=, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib -fstack-protector'
Locally applied patches:
---
@INC for perl 5.14.0:
/home/perltest/5.14.0-single-mymalloc/lib/site_perl/5.14.0/amd64-freebsd
/home/perltest/5.14.0-single-mymalloc/lib/site_perl/5.14.0
/home/perltest/5.14.0-single-mymalloc/lib/5.14.0/amd64-freebsd
/home/perltest/5.14.0-single-mymalloc/lib/5.14.0
.
---
Environment for perl 5.14.0:
HOME=/home/game
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/inferno/bin
PERL_BADLANG (unset)
SHELL=/usr/local/bin/zsh
-
[perl #93320] local'izing @DB::args leads to coredump
by Sergey Aleynikov