Revision: 1474
http://vcs.pcre.org/viewvc?view=rev&revision=1474
Author: zherczeg
Date: 2014-04-24 07:43:50 +0100 (Thu, 24 Apr 2014)
Log Message:
-----------
Add missing match limit test to JIT.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/pcre_jit_compile.c
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2014-04-21 17:52:38 UTC (rev 1473)
+++ code/trunk/ChangeLog 2014-04-24 06:43:50 UTC (rev 1474)
@@ -15,7 +15,12 @@
3. Tidy code in pcre_exec.c where two branches that used to be different are
now the same.
+4. The JIT compiler did not generate match limit checks for certain
+ bracketed expressions with quantifiers. This may lead to exponential
+ backtracking, instead of returning with PCRE_ERROR_MATCHLIMIT. This
+ issue should be resolved now.
+
Version 8.35 04-April-2014
--------------------------
Modified: code/trunk/pcre_jit_compile.c
===================================================================
--- code/trunk/pcre_jit_compile.c 2014-04-21 17:52:38 UTC (rev 1473)
+++ code/trunk/pcre_jit_compile.c 2014-04-24 06:43:50 UTC (rev 1474)
@@ -7416,6 +7416,7 @@
if (repeat_type == OP_EXACT)
{
+ count_match(common);
OP2(SLJIT_SUB | SLJIT_SET_E, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_MEM1(SLJIT_LOCALS_REG), repeat_ptr, SLJIT_IMM, 1);
JUMPTO(SLJIT_C_NOT_ZERO, rmax_label);
}