From 6ba10a03e7b14089e2f53305dec9a6ec06a7eb64 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 11 Jan 2018 17:27:26 +0300 Subject: Revert "Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse." (this patch is incomplete or wrong) This reverts commit 781e1573afdc7c336b3577ceabc9c65cafea17e8. --- Zend/zend_execute_API.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Zend/zend_execute_API.c') diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index f66bd66304..61d92914bb 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -776,7 +776,8 @@ 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; - GC_ADDREF(ZEND_CLOSURE_OBJECT(func)); + ZEND_ASSERT(GC_TYPE((zend_object*)func->op_array.prototype) == IS_OBJECT); + GC_ADDREF((zend_object*)func->op_array.prototype); call_info = ZEND_CALL_CLOSURE; if (func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE) { call_info |= ZEND_CALL_FAKE_CLOSURE; -- cgit v1.2.1