[Pcre-svn] [1187] code/trunk: Fixed the incorrect computatio…

トップ ページ
このメッセージを削除
著者: Subversion repository
日付:  
To: pcre-svn
題目: [Pcre-svn] [1187] code/trunk: Fixed the incorrect computation of jump sizes on x86 CPUs in JIT.
Revision: 1187
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1187
Author:   zherczeg
Date:     2019-11-19 12:25:32 +0000 (Tue, 19 Nov 2019)
Log Message:
-----------
Fixed the incorrect computation of jump sizes on x86 CPUs in JIT.


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


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2019-11-17 17:38:53 UTC (rev 1186)
+++ code/trunk/ChangeLog    2019-11-19 12:25:32 UTC (rev 1187)
@@ -182,7 +182,10 @@
 right, and the assertion failed to match a character in the other case if it
 did not start with the same code unit.


+39. Fixed the incorrect computation of jump sizes on x86 CPUs in JIT. A masking
+operation was incorrectly removed in r1136. Reported by Ralf Junker.

+
Version 10.33 16-April-2019
---------------------------


Modified: code/trunk/src/pcre2_jit_test.c
===================================================================
--- code/trunk/src/pcre2_jit_test.c    2019-11-17 17:38:53 UTC (rev 1186)
+++ code/trunk/src/pcre2_jit_test.c    2019-11-19 12:25:32 UTC (rev 1187)
@@ -196,6 +196,8 @@
     { CMUP, A, 0, 0, "\xf0\x90\x90\xa8{2}", "\xf0\x90\x90\x80#\xf0\x90\x90\xa8\xf0\x90\x90\x80" },
     { CMUP, A, 0, 0, "\xe1\xbd\xb8\xe1\xbf\xb8", "\xe1\xbf\xb8\xe1\xbd\xb8" },
     { M, A, 0, 0, "[3-57-9]", "5" },
+    { PCRE2_AUTO_CALLOUT, A, 0, 0, "12345678901234567890123456789012345678901234567890123456789012345678901234567890",
+        "12345678901234567890123456789012345678901234567890123456789012345678901234567890" },


     /* Assertions. */
     { MU, A, 0, 0, "\\b[^A]", "A_B#" },


Modified: code/trunk/src/sljit/sljitNativeX86_common.c
===================================================================
--- code/trunk/src/sljit/sljitNativeX86_common.c    2019-11-17 17:38:53 UTC (rev 1186)
+++ code/trunk/src/sljit/sljitNativeX86_common.c    2019-11-19 12:25:32 UTC (rev 1187)
@@ -2515,6 +2515,7 @@
     jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
     PTR_FAIL_IF_NULL(jump);
     set_jump(jump, compiler, (type & SLJIT_REWRITABLE_JUMP) | ((type & 0xff) << TYPE_SHIFT));
+    type &= 0xff;


     /* Worst case size. */
 #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)