Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on JIT in pcre2_compile.c #128

Closed
az-airtech opened this issue Jun 17, 2022 · 4 comments
Closed

Remove dependency on JIT in pcre2_compile.c #128

az-airtech opened this issue Jun 17, 2022 · 4 comments

Comments

@az-airtech
Copy link

Hi,

I have a hard requirement in a project to not use JIT. While there are CMake flags available (SUPPORT_JIT) available to effectuate this by configuration, the requirement is such that we do not even want to link with pcre2_jit_compile.c.o.

This worked fine in the old PCRE2 repository of pcre2-10.36 that we used, but one necessary #ifdef SUPPORT_JIT disappeared in the current Github repository. Diff below. If there is no particular reason why this #ifdef disappeared, I would request to put it back.

diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c
index d9eb7e5..3e4a44f 100644
--- a/src/pcre2_compile.c
+++ b/src/pcre2_compile.c
@@ -1266,9 +1266,10 @@ PCRE2_SIZE* ref_count;
 
 if (code != NULL)
   {
+#ifdef SUPPORT_JIT
   if (code->executable_jit != NULL)
     PRIV(jit_free)(code->executable_jit, &code->memctl);
-
+#endif
   if ((code->flags & PCRE2_DEREF_TABLES) != 0)
     {
     /* Decoded tables belong to the codes after deserialization, and they must

Arnoud.

@PhilipHazel
Copy link
Collaborator

I cannot see the code that you quote in the 10.36 tarball or indeed in an earlier one. Was this perhaps a local patch you made?
However, it seems a non-controversial patch; I will look in more detail in due course.

@az-airtech
Copy link
Author

az-airtech commented Jun 17, 2022 via email

@PhilipHazel
Copy link
Collaborator

I have committed this patch so it will be in the next release, whenever that is.

@az-airtech
Copy link
Author

az-airtech commented Jun 30, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants