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.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c
index d22cc7ffd7..7b04d0d2df 100644
--- a/ext/opcache/zend_accelerator_util_funcs.c
+++ b/ext/opcache/zend_accelerator_util_funcs.c
@@ -232,6 +232,14 @@ static void zend_hash_clone_prop_info(HashTable *ht)
if (IN_ARENA(prop_info->ce)) {
prop_info->ce = ARENA_REALLOC(prop_info->ce);
}
+
+ if (ZEND_TYPE_IS_CE(prop_info->type)) {
+ zend_class_entry *ce = ZEND_TYPE_CE(prop_info->type);
+ if (IN_ARENA(ce)) {
+ ce = ARENA_REALLOC(ce);
+ prop_info->type = ZEND_TYPE_ENCODE_CE(ce, ZEND_TYPE_ALLOW_NULL(prop_info->type));
+ }
+ }
}
}
}
@@ -304,6 +312,16 @@ static void zend_class_copy_ctor(zend_class_entry **pce)
/* constants table */
zend_hash_clone_constants(&ce->constants_table);
+ if (ce->properties_info_table) {
+ int i;
+ ce->properties_info_table = ARENA_REALLOC(ce->properties_info_table);
+ for (i = 0; i < ce->default_properties_count; i++) {
+ if (IN_ARENA(ce->properties_info_table[i])) {
+ ce->properties_info_table[i] = ARENA_REALLOC(ce->properties_info_table[i]);
+ }
+ }
+ }
+
if (ce->num_interfaces) {
zend_class_name *interface_names;