[pcre-dev] [Bug 957] New: Unexpected PREG_BACKTRACK_LIMIT_ER…

Top Page
Delete this message
Author: Laurent Raufaste
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 957] New: Unexpected PREG_BACKTRACK_LIMIT_ERROR
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=957
           Summary: Unexpected PREG_BACKTRACK_LIMIT_ERROR
           Product: PCRE
           Version: 6.7
          Platform: x86-64
               URL: http://pastebin.com/fa42d78d
        OS/Version: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
        AssignedTo: ph10@???
        ReportedBy: analogue@???
                CC: pcre-dev@???



Hi,

I'm using PCRE 6.7.7.4 2008-07-04 with PHP, and I encountered a problem. The
PHP developpers told me to report it to you.

When I try to preg_replace a 2654 long string, I get a
PREG_BACKTRACK_LIMIT_ERROR

It's strange because as shown, the PHP pcre.backtrack_limit is set as
the default 100000 limit.

Why does it hits the limit with a short string like this ?

Thanks

Reproduce code:
---------------
<http://pastebin.com/fa42d78d>

Expected result:
----------------
100000
2653
2653

Actual result:
--------------
100000
2653
Error: PREG_BACKTRACK_LIMIT_ERROR


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