summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>2020-05-06 11:18:31 +0000
committerzherczeg <zherczeg@6239d852-aaf2-0410-a92c-79f79f948069>2020-05-06 11:18:31 +0000
commitfee74f6d6852849aec99108caa3440da45880621 (patch)
tree19ca3c806c8a715f20f7088c5cffe187125b7cf1
parent488dde94db43fbb89631f84fdc899f90d5314939 (diff)
downloadpcre2-fee74f6d6852849aec99108caa3440da45880621.tar.gz
Force match limit for JIT tests.
git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@1253 6239d852-aaf2-0410-a92c-79f79f948069
-rw-r--r--src/pcre2_jit_test.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/pcre2_jit_test.c b/src/pcre2_jit_test.c
index 619e738..a29fffa 100644
--- a/src/pcre2_jit_test.c
+++ b/src/pcre2_jit_test.c
@@ -1356,10 +1356,11 @@ static int regression_tests(void)
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 @@ static int regression_tests(void)
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 @@ static int regression_tests(void)
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 @@ static int regression_tests(void)
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 @@ static int regression_tests(void)
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);