mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Revert "Mangle PCRE regex cache key with JIT option"
This commit is contained in:
commit
7f9ad4a83a
3
NEWS
3
NEWS
@ -2,9 +2,6 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 8.2.9
|
||||
|
||||
- PCRE:
|
||||
. Mangle PCRE regex cache key with JIT option. (mvorisek)
|
||||
|
||||
- PDO SQLite:
|
||||
. Fix GH-11492 (Make test failure: ext/pdo_sqlite/tests/bug_42589.phpt).
|
||||
(KapitanOczywisty, CViniciusSDias)
|
||||
|
@ -612,24 +612,11 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, in
|
||||
pcre_cache_entry *ret;
|
||||
|
||||
if (locale_aware && BG(ctype_string)) {
|
||||
key = zend_string_concat3(
|
||||
ZSTR_VAL(BG(ctype_string)), ZSTR_LEN(BG(ctype_string)),
|
||||
ZSTR_VAL(regex), ZSTR_LEN(regex),
|
||||
#ifdef HAVE_PCRE_JIT_SUPPORT
|
||||
PCRE_G(jit) ? "1" : "0", 1
|
||||
#else
|
||||
"", 0
|
||||
#endif
|
||||
);
|
||||
} else {
|
||||
#ifdef HAVE_PCRE_JIT_SUPPORT
|
||||
key = zend_string_concat2(
|
||||
ZSTR_VAL(regex), ZSTR_LEN(regex),
|
||||
PCRE_G(jit) ? "1" : "0", 1
|
||||
);
|
||||
#else
|
||||
ZSTR_VAL(BG(ctype_string)), ZSTR_LEN(BG(ctype_string)),
|
||||
ZSTR_VAL(regex), ZSTR_LEN(regex));
|
||||
} else {
|
||||
key = regex;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Try to lookup the cached regex entry, and if successful, just pass
|
||||
@ -783,7 +770,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache_ex(zend_string *regex, in
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (locale_aware && BG(ctype_string)) {
|
||||
if (key != regex) {
|
||||
tables = (uint8_t *)zend_hash_find_ptr(&char_tables, BG(ctype_string));
|
||||
if (!tables) {
|
||||
zend_string *_k;
|
||||
|
Loading…
Reference in New Issue
Block a user