Revision: 362
http://www.exim.org/viewvc/pcre2?view=rev&revision=362
Author: zherczeg
Date: 2015-09-02 09:35:50 +0100 (Wed, 02 Sep 2015)
Log Message:
-----------
Fix two issues in JIT.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/src/pcre2_jit_compile.c
code/trunk/testdata/testinput17
code/trunk/testdata/testoutput17
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2015-09-01 17:32:42 UTC (rev 361)
+++ code/trunk/ChangeLog 2015-09-02 08:35:50 UTC (rev 362)
@@ -169,7 +169,10 @@
48. Implemented PCRE2_ALT_VERBNAMES.
+49. Fixed two issues in JIT. These were found by Karl Skomski with a custom
+LLVM fuzzer.
+
Version 10.20 30-June-2015
--------------------------
Modified: code/trunk/src/pcre2_jit_compile.c
===================================================================
--- code/trunk/src/pcre2_jit_compile.c 2015-09-01 17:32:42 UTC (rev 361)
+++ code/trunk/src/pcre2_jit_compile.c 2015-09-02 08:35:50 UTC (rev 362)
@@ -3748,6 +3748,7 @@
}
}
while (chars[0] != 255 && bytes < bytes_end);
+ bytes = bytes_end - 32;
}
consumed++;
@@ -9508,8 +9509,7 @@
OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(1), STR_PTR, 0);
}
BACKTRACK_AS(braminzero_backtrack)->matchingpath = LABEL();
- if (cc[1] > OP_ASSERTBACK_NOT)
- count_match(common);
+ count_match(common);
break;
case OP_ONCE:
Modified: code/trunk/testdata/testinput17
===================================================================
--- code/trunk/testdata/testinput17 2015-09-01 17:32:42 UTC (rev 361)
+++ code/trunk/testdata/testinput17 2015-09-02 08:35:50 UTC (rev 362)
@@ -249,4 +249,9 @@
/(x(?1)){4}/
+/[axm]{7}/
+
+/(.|.)*?bx/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabax
+
# End of testinput17
Modified: code/trunk/testdata/testoutput17
===================================================================
--- code/trunk/testdata/testoutput17 2015-09-01 17:32:42 UTC (rev 361)
+++ code/trunk/testdata/testoutput17 2015-09-02 08:35:50 UTC (rev 362)
@@ -198,7 +198,7 @@
Subject length lower bound = 0
JIT compilation was successful
/* this is a C style comment */\=find_limits
-Minimum match limit = 1
+Minimum match limit = 29
0: /* this is a C style comment */ (JIT)
1: /* this is a C style comment */
@@ -222,17 +222,17 @@
/a(?:.)*?a/ims
abbbbbbbbbbbbbbbbbbbbba\=find_limits
-Minimum match limit = 1
+Minimum match limit = 22
0: abbbbbbbbbbbbbbbbbbbbba (JIT)
/a(?:.(*THEN))*?a/ims
abbbbbbbbbbbbbbbbbbbbba\=find_limits
-Minimum match limit = 1
+Minimum match limit = 22
0: abbbbbbbbbbbbbbbbbbbbba (JIT)
/a(?:.(*THEN:ABC))*?a/ims
abbbbbbbbbbbbbbbbbbbbba\=find_limits
-Minimum match limit = 1
+Minimum match limit = 22
0: abbbbbbbbbbbbbbbbbbbbba (JIT)
/^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
@@ -483,4 +483,10 @@
/(x(?1)){4}/
+/[axm]{7}/
+
+/(.|.)*?bx/
+ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabax
+Failed: error -47: match limit exceeded
+
# End of testinput17