https://bugs.exim.org/show_bug.cgi?id=1749

--- Comment #25 from Petr Pisar <ppi...@redhat.com> ---
Created attachment 961
  --> https://bugs.exim.org/attachment.cgi?id=961&action=edit
Attempt to propagate mprotect() failure

Attached patch tries to handle failed mprotect() call so that an application
receives PCRE2_ERROR_JIT_BADOPTION on pcre2_jit_compile().

It works besides failing some tests like testinput17 because pcre2test calls
pcre2_jit_match() unconditionally for /fastjit patterns. Also RunGrepTest and
pcre2_jit_test seems unhappy with failing pcre2_jit_compile().

I think this is the best approach because it's already documented that
pcre2_jit_compile() can fail so applications should be written that way and we
could have transparent fall-back into non-JIT matching if JIT techniques are
disallowed by the operating system.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev 

Reply via email to