com php-src: Fixed refcounting: Zend/zend_execute.c
| From: | Dmitry Stogov | Date: | Fri, 21 Mar 2014 07:33:20 +0000 |
| Subject: | com php-src: Fixed refcounting: Zend/zend_execute.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77565@lists.php.net to get a copy of this message | ||
Commit: 2f4e8aa5d76816952205ecf3469794b6f0086976
Author: Dmitry Stogov <dmitry@zend.com> Fri, 21 Mar 2014 11:33:20 +0400
Parents: 6123deb30fcd04e3f4c3e7d388705591e44142f9
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2f4e8aa5d76816952205ecf3469794b6f0086976
Log:
Fixed refcounting
Changed paths:
M Zend/zend_execute.c
Diff:
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 25ac339..ecbe67a 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1266,24 +1266,14 @@ convert_to_array:
if (!Z_ISREF_P(overloaded_result)) {
if (Z_REFCOUNTED_P(overloaded_result) &&
Z_REFCOUNT_P(overloaded_result) > 1) {
-//???
-#if 1
-// if (Z_TYPE_P(overloaded_result) != IS_OBJECT) {
+ if (Z_TYPE_P(overloaded_result) != IS_OBJECT) {
Z_DELREF_P(overloaded_result);
ZVAL_DUP(result, overloaded_result);
overloaded_result = result;
-// } else {
- ZVAL_COPY_VALUE(result, overloaded_result);
+ } else {
+ ZVAL_COPY(result, overloaded_result);
overloaded_result = result;
-// }
-#else
-//??? zval *tmp = overloaded_result;
-//???
-//??? ALLOC_ZVAL(overloaded_result);
-//??? ZVAL_DUP(overloaded_result, tmp);
-//??? Z_UNSET_ISREF_P(overloaded_result);
-//??? Z_SET_REFCOUNT_P(overloaded_result, 0);
-#endif
+ }
}
if (Z_TYPE_P(overloaded_result) != IS_OBJECT) {
zend_class_entry *ce = Z_OBJCE_P(container);