[Pcre-svn] [1204] code/trunk: Fix *THEN verbs in lookahead …

Top Page
Delete this message
Author: Subversion repository
Date:  
To: pcre-svn
Subject: [Pcre-svn] [1204] code/trunk: Fix *THEN verbs in lookahead assertions in JIT.
Revision: 1204
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1204
Author:   zherczeg
Date:     2020-01-11 15:28:15 +0000 (Sat, 11 Jan 2020)
Log Message:
-----------
Fix *THEN verbs in lookahead assertions in JIT.


Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/src/pcre2_jit_compile.c
    code/trunk/src/pcre2_jit_test.c


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2020-01-05 12:32:29 UTC (rev 1203)
+++ code/trunk/ChangeLog    2020-01-11 15:28:15 UTC (rev 1204)
@@ -39,7 +39,9 @@
 that is now imposed is that an unlimited maximum is changed to one more than 
 the minimum.


+10. Fix *THEN verbs in lookahead assertions in JIT.

+
Version 10.34 21-November-2019
------------------------------


Modified: code/trunk/src/pcre2_jit_compile.c
===================================================================
--- code/trunk/src/pcre2_jit_compile.c    2020-01-05 12:32:29 UTC (rev 1203)
+++ code/trunk/src/pcre2_jit_compile.c    2020-01-11 15:28:15 UTC (rev 1204)
@@ -9597,7 +9597,8 @@
         }
       else
         {
-        OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), 0);
+        SLJIT_ASSERT(extrasize == 3);
+        OP1(SLJIT_MOV, STR_PTR, 0, SLJIT_MEM1(STACK_TOP), STACK(-1));
         OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(0), bra == OP_BRAZERO ? STR_PTR : SLJIT_IMM, 0);
         }
       }


Modified: code/trunk/src/pcre2_jit_test.c
===================================================================
--- code/trunk/src/pcre2_jit_test.c    2020-01-05 12:32:29 UTC (rev 1203)
+++ code/trunk/src/pcre2_jit_test.c    2020-01-11 15:28:15 UTC (rev 1204)
@@ -860,6 +860,7 @@
     { MU, A, 0, 0, "(?(?!a(*THEN)b)ad|add)", "add" },
     { MU, A, 0, 0 | F_NOMATCH, "(?(?=a)a(*THEN)b|ad)", "ad" },
     { MU, A, 0, 0, "(?!(?(?=a)ab|b(*THEN)d))bn|bnn", "bnn" },
+    { MU, A, 0, 0, "(?=(*THEN: ))* ", " " },


     /* Recurse and control verbs. */
     { MU, A, 0, 0, "(a(*ACCEPT)b){0}a(?1)b", "aacaabb" },