Front page | perl.perl5.porters |
Postings from February 2011
[perl #84746] Accessing $2 causes the interpreter to crash
Thread Next
From:
cst @ dbs . uni-hannover . de
Date:
February 24, 2011 00:45
Subject:
[perl #84746] Accessing $2 causes the interpreter to crash
Message ID:
rt-3.6.HEAD-24085-1298457189-949.84746-75-0@perl.org
# New Ticket Created by cst@dbs.uni-hannover.de
# Please include the string: [perl #84746]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=84746 >
This is a bug report for perl from cst@dbs.uni-hannover.de,
generated with the help of perlbug 1.39 running under perl 5.12.2.
-----------------------------------------------------------------
The following small program causes the interpreter to crash
on my system:
#!/usr/bin/perl
my $rx = qr'\$ (?| {(.+?)} | (.+?); | (.+?)(\s) )'x;
my $test = '/home/$USERNAME ';
die unless $test =~ $rx;
print "1: $1\n";
print "2: $2\n" if defined $2;
The crash seems to be related to freeing memory; here is the dump:
*** glibc detected *** /usr/bin/perl: free(): invalid next size (fast): 0x0806d4c8 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6b6d1)[0xb75c36d1]
/lib/libc.so.6(+0x6cf38)[0xb75c4f38]
/lib/libc.so.6(cfree+0x6d)[0xb75c803d]
/usr/lib/libperl.so.5.12(Perl_safesysfree+0x1f)[0xb772733f]
======= Memory map: ========
08048000-08049000 r-xp 00000000 08:01 14823382 /usr/bin/perl5.12.2
08049000-0804a000 r--p 00000000 08:01 14823382 /usr/bin/perl5.12.2
0804a000-0804b000 rw-p 00001000 08:01 14823382 /usr/bin/perl5.12.2
0804b000-0808d000 rw-p 00000000 00:00 0 [heap]
b7100000-b7121000 rw-p 00000000 00:00 0
b7121000-b7200000 ---p 00000000 00:00 0
b725e000-b727a000 r-xp 00000000 08:01 14919147 /usr/lib/gcc/i686-pc-linux-gnu/4.4.4/libgcc_s.so.1
b727a000-b727b000 r--p 0001c000 08:01 14919147 /usr/lib/gcc/i686-pc-linux-gnu/4.4.4/libgcc_s.so.1
b727b000-b727c000 rw-p 0001d000 08:01 14919147 /usr/lib/gcc/i686-pc-linux-gnu/4.4.4/libgcc_s.so.1
b72a9000-b72e1000 r--p 02f8b000 08:01 14901747 /usr/lib/locale/locale-archive
b72e1000-b74e1000 r--p 00000000 08:01 14901747 /usr/lib/locale/locale-archive
b74e1000-b74e2000 rw-p 00000000 00:00 0
b74e2000-b74f7000 r-xp 00000000 08:01 7594193 /lib/libpthread-2.11.2.so
b74f7000-b74f8000 r--p 00014000 08:01 7594193 /lib/libpthread-2.11.2.so
b74f8000-b74f9000 rw-p 00015000 08:01 7594193 /lib/libpthread-2.11.2.so
b74f9000-b74fb000 rw-p 00000000 00:00 0
b74fb000-b7504000 r-xp 00000000 08:01 7594162 /lib/libcrypt-2.11.2.so
b7504000-b7505000 r--p 00008000 08:01 7594162 /lib/libcrypt-2.11.2.so
b7505000-b7506000 rw-p 00009000 08:01 7594162 /lib/libcrypt-2.11.2.so
b7506000-b752e000 rw-p 00000000 00:00 0
b752e000-b7552000 r-xp 00000000 08:01 7594173 /lib/libm-2.11.2.so
b7552000-b7553000 r--p 00023000 08:01 7594173 /lib/libm-2.11.2.so
b7553000-b7554000 rw-p 00024000 08:01 7594173 /lib/libm-2.11.2.so
b7554000-b7556000 r-xp 00000000 08:01 7594166 /lib/libdl-2.11.2.so
b7556000-b7557000 r--p 00001000 08:01 7594166 /lib/libdl-2.11.2.so
b7557000-b7558000 rw-p 00002000 08:01 7594166 /lib/libdl-2.11.2.so
b7558000-b7697000 r-xp 00000000 08:01 7594152 /lib/libc-2.11.2.so
b7697000-b7699000 r--p 0013f000 08:01 7594152 /lib/libc-2.11.2.so
b7699000-b769a000 rw-p 00141000 08:01 7594152 /lib/libc-2.11.2.so
b769a000-b769d000 rw-p 00000000 00:00 0
b769d000-b77f0000 r-xp 00000000 08:01 15090432 /usr/lib/libperl.so.5.12.2
b77f0000-b77f1000 ---p 00153000 08:01 15090432 /usr/lib/libperl.so.5.12.2
b77f1000-b77f3000 r--p 00153000 08:01 15090432 /usr/lib/libperl.so.5.12.2
b77f3000-b77f6000 rw-p 00155000 08:01 15090432 /usr/lib/libperl.so.5.12.2
b781c000-b781d000 r--p 02fc4000 08:01 14901747 /usr/lib/locale/locale-archive
b781d000-b7823000 r--p 02f60000 08:01 14901747 /usr/lib/locale/locale-archive
b7823000-b7824000 rw-p 00000000 00:00 0
b7824000-b7840000 r-xp 00000000 08:01 7594051 /lib/ld-2.11.2.so
b7840000-b7841000 r--p 0001b000 08:01 7594051 /lib/ld-2.11.2.so
b7841000-b7842000 rw-p 0001c000 08:01 7594051 /lib/ld-2.11.2.so
bf910000-bf932000 rw-p 00000000 00:00 0 [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl 5.12.2:
Configured by Gentoo at Wed Jan 19 10:20:36 CET 2011.
Summary of my perl5 (revision 5 version 12 subversion 2) configuration:
Platform:
osname=linux, osvers=2.6.36-gentoo-r5, archname=i686-linux-thread-multi
uname='linux serpens 2.6.36-gentoo-r5 #1 smp tue dec 28 10:25:07 cet 2010 i686 intel(r) core(tm)2 cpu 6600 @ 2.40ghz genuineintel gnulinux '
config_args='-des -Duseshrplib -Darchname=i686-linux-thread -Dcc=i686-pc-linux-gnu-gcc -Doptimize=-O2 -march=i686 -mmmx -fomit-frame-pointer -pipe -Dldflags=-Wl,-O1 -Wl,--as-needed -Dprefix=/usr -Dsiteprefix=/usr -Dvendorprefix=/usr -Dscriptdir=/usr/bin -Dprivlib=/usr/lib/perl5/5.12.2 -Darchlib=/usr/lib/perl5/5.12.2/i686-linux-thread-multi -Dsitelib=/usr/lib/perl5/site_perl/5.12.2 -Dsitearch=/usr/lib/perl5/site_perl/5.12.2/i686-linux-thread-multi -Dvendorlib=/usr/lib/perl5/vendor_perl/5.12.2 -Dvendorarch=/usr/lib/perl5/vendor_perl/5.12.2/i686-linux-thread-multi -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/share/man/man1 -Dsiteman3dir=/usr/share/man/man3 -Dvendorman1dir=/usr/share/man/man1 -Dvendorman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3pm -Dlibperl=libperl.so.5.12.2 -Dlocincpth= -Duselargefiles -Dd_semctl_semun -Dcf_by=Gentoo -Dmyhostname=localhost -Dperladmin=root@localhost -Dinstallusrbinperl=n -Ud_csh -Uusenm -Di_ndbm -Di_!
gdbm -Di_db -Dusethreads -DDEBUGGING=none -Dinc_version_list=5.12.1/i686-linux-thread-multi 5.12.1 5.12.0/i686-linux-thread-multi 5.12.0 '
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='i686-pc-linux-gnu-gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2 -march=i686 -mmmx -fomit-frame-pointer -pipe',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe'
ccversion='', gccversion='4.4.4', 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='i686-pc-linux-gnu-gcc', ldflags ='-Wl,-O1 -Wl,--as-needed -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.11.2.so, so=so, useshrplib=true, libperl=libperl.so.5.12.2
gnulibc_version='2.11.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -march=i686 -mmmx -fomit-frame-pointer -pipe -L/usr/local/lib -Wl,-O1 -Wl,--as-needed'
Locally applied patches:
0001-gentoo_MakeMaker-RUNPATH.diff
0002-gentoo_config_over.diff
0003-gentoo_cpan_definstalldirs.diff
0004-gentoo_cpanplus_definstalldirs.diff
0005-gentoo_create-libperl-soname.diff
0006-gentoo_MakeMaker-delete_packlist.diff
0007-fixes_8d66b3f9_h2hp_fix.diff
0008-fixes_f178b03b_h2ph_using_deprecated_goto.diff
0009-gentoo_mod-paths.diff
0010-gentoo_enc2xs.diff
0011-gentoo_IO-Compress_AutoLoader_dropped_from_Compress-Zlib.diff
0012-fixes_84601d63_CGI-3.50.diff
0013-fixes_2a1594f6_CGI-3.51.diff
0014-gentoo_drop-fstack-protector.diff
---
@INC for perl 5.12.2:
/etc/perl
/usr/lib/perl5/site_perl/5.12.2/i686-linux-thread-multi
/usr/lib/perl5/site_perl/5.12.2
/usr/lib/perl5/vendor_perl/5.12.2/i686-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.12.2
/usr/lib/perl5/5.12.2/i686-linux-thread-multi
/usr/lib/perl5/5.12.2
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl
/usr/local/lib/site_perl
.
---
Environment for perl 5.12.2:
HOME=/home/stahlhut
LANG=en_US.utf8
LANGUAGE (unset)
LC_ADDRESS=de_DE.utf8
LC_ALL=
LC_COLLATE=de_DE.utf8
LC_CTYPE=de_DE.utf8
LC_IDENTIFICATION=de_DE.utf8
LC_MEASUREMENT=de_DE.utf8
LC_MESSAGES=en_US.utf8
LC_MONETARY=de_DE.utf8
LC_NAME=de_DE.utf8
LC_NUMERIC=en_US.utf8
LC_PAPER=de_DE.utf8
LC_TELEPHONE=de_DE.utf8
LC_TIME=de_DE.utf8
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/stahlhut/bin:/usr/lib/oracle/10.2.0.3/client/bin:/software/pay/oracle-10-client/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.4.4:/opt/sun-jdk-1.4.2.19/bin:/opt/sun-jdk-1.4.2.19/jre/bin:/opt/sun-jdk-1.4.2.19/jre/javaws:/usr/lib/subversion/bin:/usr/games/bin
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Next
-
[perl #84746] Accessing $2 causes the interpreter to crash
by cst @ dbs . uni-hannover . de