1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

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)
This commit is contained in:
Xinchen Hui
2018-06-12 09:40:34 +08:00
parent f2be6e732a
commit 72104d2b6e

View File

@@ -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));
}