BUG/MINOR: regex: Properly handle PCRE2 lib compiled without JIT support

The PCRE2 JIT support is buggy. If HAProxy is compiled with USE_PCRE2_JIT
option while the PCRE2 library is compiled without the JIT support, any
matching will fail because pcre2_jit_compile() return value is not properly
handled. We must fall back on pcre2_match() if PCRE2_ERROR_JIT_BADOPTION
error is returned.

This patch should fix the issue #1848. It must be backported as far as 2.4.

(cherry picked from commit f348ecd67ae64ba9b2a10e9efe84e9091af42bb2)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit f884b230f80ab378283aabbdff19229f05e65be6)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit efadb70f8c7c01ae69ca42576230b046a40cb2d5)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed