summaryrefslogtreecommitdiff
path: root/ext/opcache/zend_accelerator_util_funcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/opcache/zend_accelerator_util_funcs.c')
-rw-r--r--ext/opcache/zend_accelerator_util_funcs.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c
index e74b7bb668..9eb6745478 100644
--- a/ext/opcache/zend_accelerator_util_funcs.c
+++ b/ext/opcache/zend_accelerator_util_funcs.c
@@ -233,7 +233,24 @@ static void zend_hash_clone_prop_info(HashTable *ht)
prop_info->ce = ARENA_REALLOC(prop_info->ce);
}
- if (ZEND_TYPE_IS_CE(prop_info->type)) {
+ if (ZEND_TYPE_HAS_LIST(prop_info->type)) {
+ zend_type_list *list = ZEND_TYPE_LIST(prop_info->type);
+ if (IN_ARENA(list)) {
+ list = ARENA_REALLOC(list);
+ ZEND_TYPE_SET_PTR(prop_info->type, list);
+
+ void **entry;
+ ZEND_TYPE_LIST_FOREACH_PTR(ZEND_TYPE_LIST(prop_info->type), entry) {
+ if (ZEND_TYPE_LIST_IS_CE(*entry)) {
+ zend_class_entry *ce = ZEND_TYPE_LIST_GET_CE(*entry);
+ if (IN_ARENA(ce)) {
+ ce = ARENA_REALLOC(ce);
+ *entry = ZEND_TYPE_LIST_ENCODE_CE(ce);
+ }
+ }
+ } ZEND_TYPE_LIST_FOREACH_END();
+ }
+ } else if (ZEND_TYPE_HAS_CE(prop_info->type)) {
zend_class_entry *ce = ZEND_TYPE_CE(prop_info->type);
if (IN_ARENA(ce)) {
ce = ARENA_REALLOC(ce);