Front page | perl.perl5.porters |
Postings from November 2003
[perl #24382] qr((??{})) causes runaway perl process
Thread Previous
|
Thread Next
From:
D Wollmann
Date:
November 1, 2003 08:29
Subject:
[perl #24382] qr((??{})) causes runaway perl process
Message ID:
rt-24382-66894.8.53732534716606@rt.perl.org
# New Ticket Created by D Wollmann
# Please include the string: [perl #24382]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24382 >
This is a bug report for perl from boss@thumper.puttybox.local,
generated with the help of perlbug 1.34 running under perl v5.8.0.
-----------------------------------------------------------------
[Please enter your report here]
Recursive regular expression definition using qr// expression with
paren delimiters and a postponed regular subexpression (??{})
causes the perl process to run away, consuming resources until
OOM kill.
$p = qr/(??{$p})/x; /$p/ # works as expected
$p = qr((??{$p}))x; /$p/ # causes a runaway perl
This behavior occurs with perl versions 5.6.0, 5.6.1 and 5.8.0.
Limiting the user's stack size via ulimit -s 8192 (for example)
prevents the runaway, resulting in a segfault instead.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
category=core
severity=medium
---
Site configuration information for perl v5.8.0:
Configured by boss at Tue Jul 29 00:56:33 CDT 2003.
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
Platform:
osname=linux, osvers=2.4.20-gentoo-r5, archname=i686-linux
uname='linux thumper 2.4.20-gentoo-r5 #1 tue may 20 00:25:16 cdt 2003 i686
pentium iii (coppermine) genuineintel gnulinux '
config_args='-des -Darchname=i686-linux -Dcc=gcc -Dprefix=/usr
-Dvendorprefix=/usr -Dsiteprefix=/usr -Dlocincpth=
-Doptimize=-march=pentium3 -O3 -pipe -Duselargefiles -Dd_dosuid
-Dd_semctl_semun -Dscriptdir=/usr/bin -Dman3ext=3pm -Dcf_by=Gentoo -Ud_csh
-Di_gdbm -Di_db -Di_ndbm'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef 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='gcc', ccflags ='-DPERL5 -fno-strict-aliasing -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-march=pentium3 -O3 -pipe',
cppflags='-DPERL5 -DPERL5 -fno-strict-aliasing'
ccversion='', gccversion='3.2.2', 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='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lpthread -lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lcrypt -lutil
perllibs=-lpthread -lnsl -ldl -lm -lc -lcrypt -lutil
libc=/lib/libc-2.3.1.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.3.1'
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.8.0:
/home/boss/perllib
/etc/perl
/usr/lib/perl5/site_perl/5.8.0/i686-linux
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i686-linux
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i686-linux
/usr/lib/perl5/5.8.0
/usr/local/lib/site_perl
/usr/lib/perl5/site_perl/5.6.1
.
---
Environment for perl v5.8.0:
HOME=/home/boss
LANG=en_US
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/home/boss/bin:/bin:/usr/bin:/usr/local/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.2:/opt/Acrobat5:/usr/X11R6/bin:/opt/sun-jdk-1.4.2.01/bin:/opt/sun-jdk-1.4.2.01/jre/bin:/opt/sun-jdk-1.4.2.01/jre/javaws:/usr/qt/3/bin:/usr/kde/3.1/bin:/usr/kde/3.1/bin:/usr/qt/2/bin:/usr/kde/3/bin:/usr/games/bin:/opt/sun-jdk-1.4.2.01/bin:/opt/sun-jdk-1.4.2.01/jre/bin:/opt/sun-jdk-1.4.2.01/jre/javaws
PERL5LIB=/home/boss/perllib
PERL5TESTLIB=/home/boss/perltestlib
PERL_BADLANG (unset)
SHELL=/bin/bash
Thread Previous
|
Thread Next