Skip to content

Commit a0fb2f3

Browse files
committed
Store JIT/non-JIT regex in a different PCRE cache slot
1 parent 6e04050 commit a0fb2f3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/pcre/php_pcre.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,11 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, in
612612
pcre_cache_entry *ret;
613613

614614
if (locale_aware && BG(ctype_string)) {
615-
key = zend_string_concat2(
615+
key = zend_string_concat3(
616616
ZSTR_VAL(BG(ctype_string)), ZSTR_LEN(BG(ctype_string)),
617-
ZSTR_VAL(regex), ZSTR_LEN(regex));
617+
ZSTR_VAL(regex), ZSTR_LEN(regex),
618+
PCRE_G(jit) ? "1" : "0", 1
619+
);
618620
} else {
619621
key = regex;
620622
}

0 commit comments

Comments
 (0)