summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2018-06-12 09:40:34 +0800
committerXinchen Hui <laruence@gmail.com>2018-06-12 09:40:34 +0800
commit72104d2b6ecbbabd18de15f10739be5ce3dc9ce0 (patch)
treed1b76f7a79aa3e3eee1ec815586942282e7e9ad3
parentf2be6e732a0c18d5415b8372aee102829374545a (diff)
downloadphp-git-72104d2b6ecbbabd18de15f10739be5ce3dc9ce0.tar.gz
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)
-rw-r--r--Zend/zend_generators.c3
1 files changed, 2 insertions, 1 deletions
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));
}