$this should only be included in the generator GC buffer, if it
will be released on destruction.
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2019, PHP 7.2.23
+- Core:
+ . Fixed bug #78412 (Generator incorrectly reports non-releasable $this as GC
+ child). (Nikita)
+
29 Aug 2019, PHP 7.2.22
- Core:
if (EX_CALL_INFO() & ZEND_CALL_FREE_EXTRA_ARGS) {
size += EX_NUM_ARGS() - op_array->num_args;
}
- size += Z_TYPE(execute_data->This) == IS_OBJECT; /* $this */
+ size += (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) != 0; /* $this */
size += (EX_CALL_INFO() & ZEND_CALL_CLOSURE) != 0; /* Closure object */
/* Live vars */
}
}
- if (Z_TYPE(execute_data->This) == IS_OBJECT) {
+ if (EX_CALL_INFO() & ZEND_CALL_RELEASE_THIS) {
ZVAL_OBJ(gc_buffer++, Z_OBJ(execute_data->This));
}
if (EX_CALL_INFO() & ZEND_CALL_CLOSURE) {