[pcre-dev] [Bug 841] Segmentation fault

Top Page
Delete this message
Author: jkrzyz
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 841] Segmentation fault
------- You are receiving this mail because: -------
You are on the CC list for the bug.

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




--- Comment #2 from jkrzyz <jkrzyz@???> 2009-04-15 09:33:50 ---
(In reply to comment #1)
> On Tue, 14 Apr 2009, jkrzyz wrote:
>
>
> Have you read the "pcrestack" man page? Segfault is a common response to
> running out of stack in a runaway regex. What is the regex that causes
> this problem?
>
> Regards,
> Philip
>


Regex is part of zend framewok striptags filter:

    ~(</?)(\w*)((/(?!>)|[^/>])*)(/?>)~s


Default linux stack size is 8MB.
Pcre crashes on utf-8 encoded 10KB long piece of html with 20 tags.
Html contains very long anchor tag (6.7KB).

I have increased stack size tenfold and now script works well.
Thanks for your help.


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