add fallback for JIT_STACKLIMIT

This commit is contained in:
Jabasukuriputo Wang
2022-11-30 23:13:29 +08:00
committed by GitHub
parent 6518973464
commit 1550e3017e
2 changed files with 20 additions and 10 deletions

View File

@@ -148,8 +148,10 @@ bool VerifyCC::evaluate(Transaction *t, RuleWithActions *rule,
if (m_pcje == 0) {
ret = pcre2_jit_match(m_pc, pcre2_i, target_length, offset, 0, match_data, NULL);
} else {
ret = pcre2_match(m_pc, pcre2_i, target_length, offset, 0, match_data, NULL);
}
if (m_pcje != 0 || ret == PCRE2_ERROR_JIT_STACKLIMIT) {
ret = pcre2_match(m_pc, pcre2_i, target_length, offset, PCRE2_NO_JIT, match_data, NULL);
}
/* If there was no match, then we are done. */