From f58e8dda1be825d364ac4634c5f231b755210a1f Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Wed, 15 Dec 2021 10:57:15 -0500 Subject: [PATCH] [core] ignore pcre2 "bad JIT option" warning ignore pcre2 bad JIT option warning for use of PCRE2_JIT_COMPLETE flag with pcre2_jit_compile() returning PCRE2_ERROR_JIT_BADOPTION x-ref: "pcre2 - Probable user knowledge bug, but suggestions will be welcome" https://redmine.lighttpd.net/boards/2/topics/10202 --- src/data_config.c | 2 +- src/keyvalue.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data_config.c b/src/data_config.c index f8cacb97..d194e096 100644 --- a/src/data_config.c +++ b/src/data_config.c @@ -99,7 +99,7 @@ int data_config_pcre_compile(data_config * const dc, const int pcre_jit, log_err if (pcre_jit) { errcode = pcre2_jit_compile(dc->code, PCRE2_JIT_COMPLETE); - if (0 != errcode) { + if (0 != errcode && errcode != PCRE2_ERROR_JIT_BADOPTION) { pcre2_get_error_message(errcode, errbuf, sizeof(errbuf)); log_error(errh, __FILE__, __LINE__, "pcre2_jit_compile: %s, regex: %s", diff --git a/src/keyvalue.c b/src/keyvalue.c index d44f812c..e2a69a22 100644 --- a/src/keyvalue.c +++ b/src/keyvalue.c @@ -85,7 +85,7 @@ int pcre_keyvalue_buffer_append(log_error_st *errh, pcre_keyvalue_buffer *kvb, c if (pcre_jit) { errcode = pcre2_jit_compile(kv->code, PCRE2_JIT_COMPLETE); - if (0 != errcode) { + if (0 != errcode && errcode != PCRE2_ERROR_JIT_BADOPTION) { pcre2_get_error_message(errcode, errbuf, sizeof(errbuf)); log_error(errh, __FILE__, __LINE__, "pcre2_jit_compile: %s, regex: %s", (char *)errbuf, key->ptr);