summaryrefslogtreecommitdiff
path: root/ext/date
diff options
context:
space:
mode:
authorJohannes Schlüter <johannes@php.net>2012-06-27 23:26:33 +0200
committerJohannes Schlüter <johannes@php.net>2012-06-27 23:26:33 +0200
commitb025b9d0cf9921d26fc4dad43cf26390d0a8c5dd (patch)
tree83283740921be3cb88d9f833c1a850d07fae5fbb /ext/date
parent4662151ea7d7b6920d115cf2a2d6e9d4232727a3 (diff)
downloadphp-git-b025b9d0cf9921d26fc4dad43cf26390d0a8c5dd.tar.gz
Fix #62432 ReflectionMethod random corrupt memory on high concurrent
This fixes the same issue in multiple extensions. This isn't needed in later branches as 5.4 introduced object_properties_init()
Diffstat (limited to 'ext/date')
-rw-r--r--ext/date/php_date.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index ab4cc49442..527894d223 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -2035,7 +2035,7 @@ static inline zend_object_value date_object_new_date_ex(zend_class_entry *class_
}
zend_object_std_init(&intern->std, class_type TSRMLS_CC);
- zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
+ zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_property_ctor, (void *) &tmp, sizeof(zval *));
retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) date_object_free_storage_date, NULL TSRMLS_CC);
retval.handlers = &date_object_handlers_date;
@@ -2159,7 +2159,7 @@ static inline zend_object_value date_object_new_timezone_ex(zend_class_entry *cl
}
zend_object_std_init(&intern->std, class_type TSRMLS_CC);
- zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
+ zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_property_ctor, (void *) &tmp, sizeof(zval *));
retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) date_object_free_storage_timezone, NULL TSRMLS_CC);
retval.handlers = &date_object_handlers_timezone;
@@ -2215,7 +2215,7 @@ static inline zend_object_value date_object_new_interval_ex(zend_class_entry *cl
}
zend_object_std_init(&intern->std, class_type TSRMLS_CC);
- zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
+ zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_property_ctor, (void *) &tmp, sizeof(zval *));
retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) date_object_free_storage_interval, NULL TSRMLS_CC);
retval.handlers = &date_object_handlers_interval;
@@ -2291,7 +2291,7 @@ static inline zend_object_value date_object_new_period_ex(zend_class_entry *clas
}
zend_object_std_init(&intern->std, class_type TSRMLS_CC);
- zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
+ zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_property_ctor, (void *) &tmp, sizeof(zval *));
retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) date_object_free_storage_period, NULL TSRMLS_CC);
retval.handlers = &date_object_handlers_period;