com php-src: Only do this in debug build: Zend/zend_closures .c Zend/zend_object_handlers.c
| From: | Xinchen Hui | Date: | Sat, 21 Feb 2015 14:44:51 +0000 |
| Subject: | com php-src: Only do this in debug build: Zend/zend_closures .c Zend/zend_object_handlers.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85045@lists.php.net to get a copy of this message | ||
Commit: f25419f8e362faf96005ae6f78a7f901dfbcb971
Author: Xinchen Hui <laruence@php.net> Sat, 21 Feb 2015 22:44:51 +0800
Parents: 865a719a3f88514dfb5570e682435d5720e52ec4
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f25419f8e362faf96005ae6f78a7f901dfbcb971
Log:
Only do this in debug build
Changed paths:
M Zend/zend_closures.c
M Zend/zend_object_handlers.c
Diff:
diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c
index 3943b71..37f8d55 100644
--- a/Zend/zend_closures.c
+++ b/Zend/zend_closures.c
@@ -63,7 +63,9 @@ ZEND_METHOD(Closure, __invoke) /* {{{ */
/* destruct the function also, then - we have allocated it in get_method */
zend_string_release(func->internal_function.function_name);
efree(func);
- EX(func) = NULL;
+#if ZEND_DEBUG
+ execute_data->func = NULL;
+#endif
}
/* }}} */
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index eba9cea..6c0e2f3 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers..c
@@ -934,7 +934,9 @@ ZEND_API void zend_std_call_user_call(INTERNAL_FUNCTION_PARAMETERS) /* {{{ */
/* destruct the function also, then - we have allocated it in get_method */
efree_size(func, sizeof(zend_internal_function));
+#if ZEND_DEBUG
execute_data->func = NULL;
+#endif
}
/* }}} */
@@ -1155,7 +1157,9 @@ ZEND_API void zend_std_callstatic_user_call(INTERNAL_FUNCTION_PARAMETERS) /*
{{{
/* destruct the function also, then - we have allocated it in get_method */
efree_size(func, sizeof(zend_internal_function));
+#if ZEND_DEBUG
execute_data->func = NULL;
+#endif
}
/* }}} */