[Pcre-svn] [1280] code/trunk: Fixed a word boundary check bu…

トップ ページ
このメッセージを削除
著者: Subversion repository
日付:  
To: pcre-svn
題目: [Pcre-svn] [1280] code/trunk: Fixed a word boundary check bug in JIT when partial matching is enabled.
Revision: 1280
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1280
Author:   zherczeg
Date:     2020-10-27 08:16:04 +0000 (Tue, 27 Oct 2020)
Log Message:
-----------
Fixed a word boundary check bug in JIT when partial matching is enabled.


Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/src/pcre2_jit_compile.c
    code/trunk/testdata/testinput10
    code/trunk/testdata/testoutput10


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2020-10-19 06:20:18 UTC (rev 1279)
+++ code/trunk/ChangeLog    2020-10-27 08:16:04 UTC (rev 1280)
@@ -90,7 +90,9 @@
 test for a version of sed that can handle binary zero, instead of assuming that 
 any Linux version will work.


+18. Fixed a word boundary check bug in JIT when partial matching is enabled.

+
Version 10.35 09-May-2020
---------------------------


Modified: code/trunk/src/pcre2_jit_compile.c
===================================================================
--- code/trunk/src/pcre2_jit_compile.c    2020-10-19 06:20:18 UTC (rev 1279)
+++ code/trunk/src/pcre2_jit_compile.c    2020-10-27 08:16:04 UTC (rev 1280)
@@ -6571,9 +6571,11 @@


   if (common->mode != PCRE2_JIT_COMPLETE)
     {
+    OP1(SLJIT_MOV, RETURN_ADDR, 0, TMP1, 0);
     OP1(SLJIT_MOV, TMP2, 0, STR_PTR, 0);
     move_back(common, NULL, TRUE);
     check_start_used_ptr(common);
+    OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0);
     OP1(SLJIT_MOV, STR_PTR, 0, TMP2, 0);
     }
   }


Modified: code/trunk/testdata/testinput10
===================================================================
--- code/trunk/testdata/testinput10    2020-10-19 06:20:18 UTC (rev 1279)
+++ code/trunk/testdata/testinput10    2020-10-27 08:16:04 UTC (rev 1280)
@@ -613,4 +613,8 @@
 /A/utf,match_invalid_utf,caseless
     \xe5A


+/\bch\b/utf,match_invalid_utf
+    qchq\=ph
+    qchq\=ps
+
 # End of testinput10


Modified: code/trunk/testdata/testoutput10
===================================================================
--- code/trunk/testdata/testoutput10    2020-10-19 06:20:18 UTC (rev 1279)
+++ code/trunk/testdata/testoutput10    2020-10-27 08:16:04 UTC (rev 1280)
@@ -1875,4 +1875,10 @@
     \xe5A
  0: A


+/\bch\b/utf,match_invalid_utf
+    qchq\=ph
+Partial match: 
+    qchq\=ps
+Partial match: 
+
 # End of testinput10