Revision: 953
http://vcs.pcre.org/viewvc?view=rev&revision=953
Author: zherczeg
Date: 2012-03-29 18:41:57 +0100 (Thu, 29 Mar 2012)
Log Message:
-----------
Fixed a bug for backward assertions with REVERSE 0 in the JIT compiler
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/pcre_jit_compile.c
code/trunk/testdata/testinput5
code/trunk/testdata/testoutput5
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2012-03-16 12:59:30 UTC (rev 952)
+++ code/trunk/ChangeLog 2012-03-29 17:41:57 UTC (rev 953)
@@ -75,7 +75,9 @@
20. The madvise function is renamed for posix_madvise for QNX compatibility
reasons. Fixed by Giuseppe D'Angelo.
+21. Fixed a bug for backward assertions with REVERSE 0 in the JIT compiler.
+
Version 8.30 04-February-2012
-----------------------------
Modified: code/trunk/pcre_jit_compile.c
===================================================================
--- code/trunk/pcre_jit_compile.c 2012-03-16 12:59:30 UTC (rev 952)
+++ code/trunk/pcre_jit_compile.c 2012-03-29 17:41:57 UTC (rev 953)
@@ -3746,7 +3746,8 @@
case OP_REVERSE:
length = GET(cc, 0);
- SLJIT_ASSERT(length > 0);
+ if (length == 0)
+ return cc + LINK_SIZE;
OP1(SLJIT_MOV, TMP1, 0, ARGUMENTS, 0);
#ifdef SUPPORT_UTF
if (common->utf)
Modified: code/trunk/testdata/testinput5
===================================================================
--- code/trunk/testdata/testinput5 2012-03-16 12:59:30 UTC (rev 952)
+++ code/trunk/testdata/testinput5 2012-03-29 17:41:57 UTC (rev 953)
@@ -795,4 +795,7 @@
/(?<=\x{1234}\x{1234})\bxy/I8
+/(?<!^)ETA/8
+ ETA
+
/-- End of testinput5 --/
Modified: code/trunk/testdata/testoutput5
===================================================================
--- code/trunk/testdata/testoutput5 2012-03-16 12:59:30 UTC (rev 952)
+++ code/trunk/testdata/testoutput5 2012-03-29 17:41:57 UTC (rev 953)
@@ -1880,4 +1880,8 @@
Need char = 'y'
Max lookbehind = 2
+/(?<!^)ETA/8
+ ETA
+No match
+
/-- End of testinput5 --/