[Pcre-svn] [1253] code/trunk/src/pcre2_jit_test.c: Force mat…

Page principale
Supprimer ce message
Auteur: Subversion repository
Date:  
À: pcre-svn
Sujet: [Pcre-svn] [1253] code/trunk/src/pcre2_jit_test.c: Force match limit for JIT tests.
Revision: 1253
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1253
Author:   zherczeg
Date:     2020-05-06 12:18:31 +0100 (Wed, 06 May 2020)
Log Message:
-----------
Force match limit for JIT tests.


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


Modified: code/trunk/src/pcre2_jit_test.c
===================================================================
--- code/trunk/src/pcre2_jit_test.c    2020-04-28 15:29:18 UTC (rev 1252)
+++ code/trunk/src/pcre2_jit_test.c    2020-05-06 11:18:31 UTC (rev 1253)
@@ -1356,10 +1356,11 @@
                 ovector8_1[i] = -2;
             for (i = 0; i < OVECTOR_SIZE * 2; ++i)
                 ovector8_2[i] = -2;
+            pcre2_set_match_limit_8(mcontext8, 10000000);
         }
         if (re8) {
             return_value8[1] = pcre2_match_8(re8, (PCRE2_SPTR8)current->input, strlen(current->input),
-                current->start_offset & OFFSET_MASK, current->match_options, mdata8_2, NULL);
+                current->start_offset & OFFSET_MASK, current->match_options, mdata8_2, mcontext8);


             if (pcre2_jit_compile_8(re8, jit_compile_mode)) {
                 printf("\n8 bit: JIT compiler does not support \"%s\"\n", current->pattern);
@@ -1395,6 +1396,7 @@
                 ovector16_1[i] = -2;
             for (i = 0; i < OVECTOR_SIZE * 2; ++i)
                 ovector16_2[i] = -2;
+            pcre2_set_match_limit_16(mcontext16, 10000000);
         }
         if (re16) {
             if ((current->compile_options & PCRE2_UTF) || (current->start_offset & F_FORCECONV))
@@ -1403,7 +1405,7 @@
                 length16 = copy_char8_to_char16((PCRE2_SPTR8)current->input, regtest_buf16, REGTEST_MAX_LENGTH16);


             return_value16[1] = pcre2_match_16(re16, regtest_buf16, length16,
-                current->start_offset & OFFSET_MASK, current->match_options, mdata16_2, NULL);
+                current->start_offset & OFFSET_MASK, current->match_options, mdata16_2, mcontext16);


             if (pcre2_jit_compile_16(re16, jit_compile_mode)) {
                 printf("\n16 bit: JIT compiler does not support \"%s\"\n", current->pattern);
@@ -1439,6 +1441,7 @@
                 ovector32_1[i] = -2;
             for (i = 0; i < OVECTOR_SIZE * 2; ++i)
                 ovector32_2[i] = -2;
+            pcre2_set_match_limit_32(mcontext32, 10000000);
         }
         if (re32) {
             if ((current->compile_options & PCRE2_UTF) || (current->start_offset & F_FORCECONV))
@@ -1447,7 +1450,7 @@
                 length32 = copy_char8_to_char32((PCRE2_SPTR8)current->input, regtest_buf32, REGTEST_MAX_LENGTH32);


             return_value32[1] = pcre2_match_32(re32, regtest_buf32, length32,
-                current->start_offset & OFFSET_MASK, current->match_options, mdata32_2, NULL);
+                current->start_offset & OFFSET_MASK, current->match_options, mdata32_2, mcontext32);


             if (pcre2_jit_compile_32(re32, jit_compile_mode)) {
                 printf("\n32 bit: JIT compiler does not support \"%s\"\n", current->pattern);