[Pcre-svn] [1217] code/trunk: Fix control verb chain restora…

Kezdőlap
Üzenet törlése
Szerző: Subversion repository
Dátum:  
Címzett: pcre-svn
Tárgy: [Pcre-svn] [1217] code/trunk: Fix control verb chain restoration issue in JIT.
Revision: 1217
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1217
Author:   zherczeg
Date:     2020-02-10 10:18:01 +0000 (Mon, 10 Feb 2020)
Log Message:
-----------
Fix control verb chain restoration issue 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-31 10:09:38 UTC (rev 1216)
+++ code/trunk/ChangeLog    2020-02-10 10:18:01 UTC (rev 1217)
@@ -60,7 +60,10 @@
 nested groups for starting code units, in order to avoid stack overflow issues. 
 If the limit is reached, it just gives up trying for this optimization.


+16. The control verb chain list must always be restored when exiting from a
+recurse function 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-31 10:09:38 UTC (rev 1216)
+++ code/trunk/src/pcre2_jit_compile.c    2020-02-10 10:18:01 UTC (rev 1217)
@@ -2693,8 +2693,8 @@
       }
     if (common->control_head_ptr != 0 && !control_head_found)
       {
-      shared_srcw[0] = common->control_head_ptr;
-      shared_count = 1;
+      private_srcw[0] = common->control_head_ptr;
+      private_count = 1;
       control_head_found = TRUE;
       }
     cc += 1 + 2 + cc[1];
@@ -2704,8 +2704,8 @@
     SLJIT_ASSERT(common->control_head_ptr != 0);
     if (!control_head_found)
       {
-      shared_srcw[0] = common->control_head_ptr;
-      shared_count = 1;
+      private_srcw[0] = common->control_head_ptr;
+      private_count = 1;
       control_head_found = TRUE;
       }
     cc++;


Modified: code/trunk/src/pcre2_jit_test.c
===================================================================
--- code/trunk/src/pcre2_jit_test.c    2020-01-31 10:09:38 UTC (rev 1216)
+++ code/trunk/src/pcre2_jit_test.c    2020-02-10 10:18:01 UTC (rev 1217)
@@ -861,6 +861,7 @@
     { 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: ))* ", " " },
+    { MU, A, 0, 0, "a(*THEN)(?R) |", "a" },


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