Fix previous patch for non-JIT compilation.
This commit is contained in:
parent
16c046ce50
commit
5850cc5928
|
@ -14152,7 +14152,10 @@ PCRE2_EXP_DEFN int PCRE2_CALL_CONVENTION
|
||||||
pcre2_jit_compile(pcre2_code *code, uint32_t options)
|
pcre2_jit_compile(pcre2_code *code, uint32_t options)
|
||||||
{
|
{
|
||||||
pcre2_real_code *re = (pcre2_real_code *)code;
|
pcre2_real_code *re = (pcre2_real_code *)code;
|
||||||
executable_functions *functions;
|
|
||||||
|
#ifdef SUPPORT_JIT
|
||||||
|
executable_functions *functions = (executable_functions *)re->executable_jit;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (code == NULL)
|
if (code == NULL)
|
||||||
return PCRE2_ERROR_NULL;
|
return PCRE2_ERROR_NULL;
|
||||||
|
@ -14160,8 +14163,6 @@ if (code == NULL)
|
||||||
if ((options & ~PUBLIC_JIT_COMPILE_OPTIONS) != 0)
|
if ((options & ~PUBLIC_JIT_COMPILE_OPTIONS) != 0)
|
||||||
return PCRE2_ERROR_JIT_BADOPTION;
|
return PCRE2_ERROR_JIT_BADOPTION;
|
||||||
|
|
||||||
functions = (executable_functions *)re->executable_jit;
|
|
||||||
|
|
||||||
/* Support for invalid UTF was first introduced in JIT, with the option
|
/* Support for invalid UTF was first introduced in JIT, with the option
|
||||||
PCRE2_JIT_INVALID_UTF. Later, support was added to the interpreter, and the
|
PCRE2_JIT_INVALID_UTF. Later, support was added to the interpreter, and the
|
||||||
compile-time option PCRE2_MATCH_INVALID_UTF was created. This is now the
|
compile-time option PCRE2_MATCH_INVALID_UTF was created. This is now the
|
||||||
|
@ -14192,7 +14193,9 @@ if ((options & PCRE2_JIT_INVALID_UTF) != 0)
|
||||||
{
|
{
|
||||||
if ((re->overall_options & PCRE2_MATCH_INVALID_UTF) == 0)
|
if ((re->overall_options & PCRE2_MATCH_INVALID_UTF) == 0)
|
||||||
{
|
{
|
||||||
|
#ifdef SUPPORT_JIT
|
||||||
if (functions != NULL) return PCRE2_ERROR_JIT_BADOPTION;
|
if (functions != NULL) return PCRE2_ERROR_JIT_BADOPTION;
|
||||||
|
#endif
|
||||||
re->overall_options |= PCRE2_MATCH_INVALID_UTF;
|
re->overall_options |= PCRE2_MATCH_INVALID_UTF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue