From 72104d2b6ecbbabd18de15f10739be5ce3dc9ce0 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Tue, 12 Jun 2018 09:40:34 +0800 Subject: [PATCH] supplemental fix for bug #76427 there are two parts to make this problem visible , the first is our new gc new freeing zvals in an opposite direction(compare to 7.2) the second is zend_object_store_del doesn't check IS_VALID since 7.3 (using assertion instead) --- Zend/zend_generators.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index f4dd33b95c..8408cc32f4 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -125,7 +125,8 @@ ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished /* always free the CV's, in the symtable are only not-free'd IS_INDIRECT's */ zend_free_compiled_variables(execute_data); - if (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) { + if ((EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) && + EXPECTED(GC_TYPE(Z_OBJ(execute_data->This)) == IS_OBJECT)) { OBJ_RELEASE(Z_OBJ(execute_data->This)); } -- 2.40.0