summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-01-11 22:15:45 +0300
committerDmitry Stogov <dmitry@zend.com>2018-01-11 22:15:45 +0300
commit12c386f5b90387ce373e16cdf74fd4d3155d5aa7 (patch)
tree2103adb0a72abeba6cffd90b96e1ab8392747d1c /Zend/zend_execute_API.c
parent0ec631c99676039f7056e939cfd34a7918c1246c (diff)
downloadphp-git-12c386f5b90387ce373e16cdf74fd4d3155d5aa7.tar.gz
Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse. (reapply 781e1573afdc7c336b3577ceabc9c65cafea17e8, now it should be OK).
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 61d92914bb..f66bd66304 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -776,8 +776,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
if (UNEXPECTED(func->op_array.fn_flags & ZEND_ACC_CLOSURE)) {
uint32_t call_info;
- ZEND_ASSERT(GC_TYPE((zend_object*)func->op_array.prototype) == IS_OBJECT);
- GC_ADDREF((zend_object*)func->op_array.prototype);
+ GC_ADDREF(ZEND_CLOSURE_OBJECT(func));
call_info = ZEND_CALL_CLOSURE;
if (func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE) {
call_info |= ZEND_CALL_FAKE_CLOSURE;