[pcre-dev] [Bug 616] Crash

Top Page
Delete this message
Author: Felipe Nascimento S Pena
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 616] Crash
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=616




--- Comment #2 from Felipe Nascimento S. Pena <felipensp@???> 2007-10-13 20:55:47 ---
(In reply to comment #1)
> On Sat, 13 Oct 2007, Felipe Nascimento S. Pena wrote:
>
> > <?php
> >
> > for ($str = '<', $i = 0; $i < 9999; $i++) {
> >     $str .= str_repeat(md5(time()), 100);
> > }
> > preg_match_all('/<((?:(?!>).)+)>/s', $str, $matches);

> >
> > ?>
>
> I don't run PHP, so I can't test this directly. However, it looks like a
> classic out-of-stack error (because of the very long subject string).
> Have a read of the pcrestack man page. Have you tried increasing the
> runtime stack for your application?
>
> If you can send a literal string that is being matched, I can try it
> with pcretest in a later release of PCRE (7.4 is current) and confirm
> this diagnosis.
>
> Regards,
> Philip
>


I'm using PHP with 128M of memory limit.
And I forget of a details, when use with [^<]+, the error doesn't happen.

If decrease the loop of example to 4, generate 12801 chars, and the problem,
persist.

String: http://ecl.zoone.com.br/etc/test.txt


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email