Merge branch 'PHP-8.3'

* PHP-8.3:
  Don't set IS_STR_PERMANENT flag for strings stored in the file cache (#15643)
This commit is contained in:
Dmitry Stogov 2024-08-30 01:01:33 +03:00
commit eb89233800
No known key found for this signature in database

View file

@ -38,7 +38,9 @@
#define zend_set_str_gc_flags(str) do { \
GC_SET_REFCOUNT(str, 2); \
uint32_t flags = GC_STRING | (ZSTR_IS_VALID_UTF8(str) ? IS_STR_VALID_UTF8 : 0); \
if (file_cache_only) { \
if (file_cache_only \
|| (ZCG(current_persistent_script) && ZCG(current_persistent_script)->corrupted)) { \
GC_TYPE_INFO(str) = GC_STRING | (IS_STR_INTERNED << GC_FLAGS_SHIFT); \
flags |= (IS_STR_INTERNED << GC_FLAGS_SHIFT); \
} else { \
flags |= ((IS_STR_INTERNED | IS_STR_PERMANENT) << GC_FLAGS_SHIFT); \