You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2019/11/18 13:10:23 UTC
[trafficserver] branch 9.0.x updated: Fixed issue with macOS
Catalina and pcre 8.43 enabling pcre-jit (#6189)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new eaa23ac Fixed issue with macOS Catalina and pcre 8.43 enabling pcre-jit (#6189)
eaa23ac is described below
commit eaa23ac8b0508f917ac2d432c8ce9c9006c8a929
Author: Bryan Call <bc...@apache.org>
AuthorDate: Mon Nov 18 18:38:34 2019 +0800
Fixed issue with macOS Catalina and pcre 8.43 enabling pcre-jit (#6189)
(cherry picked from commit 093317c808b01304abf0a6b4aaf9c34791e3e08e)
---
src/tscore/Regex.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/tscore/Regex.cc b/src/tscore/Regex.cc
index 33487d1..9d93c8d 100644
--- a/src/tscore/Regex.cc
+++ b/src/tscore/Regex.cc
@@ -28,7 +28,7 @@
#include "tscore/ink_memory.h"
#include "tscore/Regex.h"
-#ifdef PCRE_CONFIG_JIT
+#if defined(PCRE_CONFIG_JIT) && !defined(darwin) // issue with macOS Catalina and pcre 8.43
struct RegexThreadKey {
RegexThreadKey() { ink_thread_key_create(&this->key, reinterpret_cast<void (*)(void *)>(&pcre_jit_stack_free)); }
ink_thread_key key;
@@ -82,13 +82,13 @@ Regex::compile(const char *pattern, const unsigned flags)
return false;
}
-#ifdef PCRE_CONFIG_JIT
+#if defined(PCRE_CONFIG_JIT) && !defined(darwin) // issue with macOS Catalina and pcre 8.43
study_opts |= PCRE_STUDY_JIT_COMPILE;
#endif
regex_extra = pcre_study(regex, study_opts, &error);
-#ifdef PCRE_CONFIG_JIT
+#if defined(PCRE_CONFIG_JIT) && !defined(darwin) // issue with macOS Catalina and pcre 8.43
if (regex_extra) {
pcre_assign_jit_stack(regex_extra, &get_jit_stack, nullptr);
}
@@ -127,7 +127,7 @@ Regex::exec(std::string_view const &str, int *ovector, int ovecsize)
Regex::~Regex()
{
if (regex_extra) {
-#ifdef PCRE_CONFIG_JIT
+#if defined(PCRE_CONFIG_JIT) && !defined(darwin) // issue with macOS Catalina and pcre 8.43
pcre_free_study(regex_extra);
#else
pcre_free(regex_extra);