------- You are receiving this mail because: -------
You are on the CC list for the bug.
http://bugs.exim.org/show_bug.cgi?id=616
Summary: Crash
Product: PCRE
Version: 7.2
Platform: x86
OS/Version: Linux
Status: NEW
Severity: bug
Priority: medium
Component: Code
AssignedTo: ph10@???
ReportedBy: felipensp@???
CC: pcre-dev@???
Code:
<?php
for ($str = '<', $i = 0; $i < 9999; $i++) {
$str .= str_repeat(md5(time()), 100);
}
preg_match_all('/<((?:(?!>).)+)>/s', $str, $matches);
?>
---------------------------
Test:
felipe@bl4ck:~/public_html$ php test.php
Falha de segmentação (core dumped)
---------------------------
GDB:
felipe@bl4ck:~/public_html$ gdb -q php
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) r test.php
Starting program: /usr/local/bin/php test.php
[Thread debugging using libthread_db enabled]
[New Thread -1212098144 (LWP 4950)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212098144 (LWP 4950)]
match (
eptr=0x847f6c4
"f9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5"...,
ecode=0x84aec70 "\033>T",
mstart=0x847cd18
"<1f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77"...,
offset_top=2, md=0xbf9731fc, ims=4,
eptrb=0x0, flags=0, rdepth=10669) at
/home/felipe/php-5.2.4/ext/pcre/pcrelib/pcre_exec.c:400
400 {
---------------------------
Backtrace:
(gdb) bt
#0 match (
eptr=0x847f6c4
"f9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5"...,
ecode=0x84aec70 "\033>T",
mstart=0x847cd18
"<1f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77"...,
offset_top=2, md=0xbf9731fc, ims=4,
eptrb=0x0, flags=0, rdepth=10669) at
/home/felipe/php-5.2.4/ext/pcre/pcrelib/pcre_exec.c:400
#1 0x08095423 in match (eptr=<value optimized out>, ecode=<value optimized
out>, mstart=<value optimized out>, offset_top=2,
md=0xbf9731fc, ims=4, eptrb=0x0, flags=<value optimized out>, rdepth=10668)
at /home/felipe/php-5.2.4/ext/pcre/pcrelib/pcre_exec.c:856
#2 0x08093b07 in match (
eptr=0x847f6c4
"f9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5"...,
ecode=<value optimized out>,
mstart=0x847cd18
"<1f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77"...,
offset_top=2, md=0xbf9731fc, ims=4,
eptrb=0x0, flags=<value optimized out>, rdepth=10667) at
/home/felipe/php-5.2.4/ext/pcre/pcrelib/pcre_exec.c:1234
#3 0x08093b07 in match (
eptr=0x847f6c4
"f9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5"...,
ecode=<value optimized out>,
mstart=0x847cd18
"<1f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77"...,
offset_top=2, md=0xbf9731fc, ims=4,
eptrb=0x0, flags=<value optimized out>, rdepth=10666) at
/home/felipe/php-5.2.4/ext/pcre/pcrelib/pcre_exec.c:1234
#4 0x08093b07 in match (
eptr=0x847f6c4
"f9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5"...,
ecode=<value optimized out>,
mstart=0x847cd18
"<1f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77"...,
offset_top=2, md=0xbf9731fc, ims=4,
eptrb=0x0, flags=<value optimized out>, rdepth=10665) at
/home/felipe/php-5.2.4/ext/pcre/pcrelib/pcre_exec.c:1234
#5 0x08093b07 in match (
eptr=0x847f6c4
"f9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5"...,
ecode=<value optimized out>,
mstart=0x847cd18
"<1f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77"...,
offset_top=2, md=0xbf9731fc, ims=4,
eptrb=0x0, flags=<value optimized out>, rdepth=10664) at
/home/felipe/php-5.2.4/ext/pcre/pcrelib/pcre_exec.c:1234
#6 0x08093b07 in match (
eptr=0x847f6c4
"f9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5bbddcbd6529021f99d77543ef9ba1aa5"...,
ecode=<value optimized out>,
...
Regards,
Felipe.
--
Configure bugmail:
http://bugs.exim.org/userprefs.cgi?tab=email