(Bob)
. Fixed bug #71529 (Variable references on array elements don't work when
using count). (Nikita)
+ . Fixed bug #71601 (finally block not executed after yield from). (Bob)
- CLI server:
. Fixed bug #71559 (Built-in HTTP server, we can download file in web by bug).
causing date_date_set issues). (Sean DuBois)
- FPM:
- . Fixed #71269 (php-fpm dumped core). (Mickaël)
+ . Fixed bug #71269 (php-fpm dumped core). (Mickaël)
- Opcache:
- . Fixed bug #71584 (Possible use-after-free of ZCG(cwd) in Zend Opcache).
+ . Fixed bug #71584 (Possible use-after-free of ZCG(cwd) in Zend Opcache).
(Yussuf Khalil)
- PCRE:
ZEND_API void zend_generator_close(zend_generator *generator, zend_bool finished_execution) /* {{{ */
{
- if (UNEXPECTED(Z_TYPE(generator->values) != IS_UNDEF)) {
- zval_ptr_dtor(&generator->values);
- ZVAL_UNDEF(&generator->values);
- }
-
if (EXPECTED(generator->execute_data)) {
zend_execute_data *execute_data = generator->execute_data;
}
/* }}} */
+static zend_generator *zend_generator_get_child(zend_generator_node *node, zend_generator *leaf);
+
static void zend_generator_dtor_storage(zend_object *object) /* {{{ */
{
zend_generator *generator = (zend_generator*) object;
uint32_t op_num, finally_op_num, finally_op_end;
int i;
+ /* leave yield from mode to properly allow finally execution */
+ if (UNEXPECTED(Z_TYPE(generator->values) != IS_UNDEF)) {
+ zval_ptr_dtor(&generator->values);
+ ZVAL_UNDEF(&generator->values);
+ }
+
+ if (EXPECTED(generator->node.children == 0)) {
+ zend_generator *root = generator->node.ptr.root, *next;
+ while (UNEXPECTED(root != generator)) {
+ next = zend_generator_get_child(&root->node, generator);
+ OBJ_RELEASE(&root->std);
+ root = next;
+ }
+ generator->node.parent = NULL;
+ }
+
if (EXPECTED(!ex) || EXPECTED(!(ex->func->op_array.fn_flags & ZEND_ACC_HAS_FINALLY_BLOCK))) {
return;
}
}
/* }}} */
-static zend_generator *zend_generator_get_child(zend_generator_node *node, zend_generator *leaf);
-
static void zend_generator_free_storage(zend_object *object) /* {{{ */
{
zend_generator *generator = (zend_generator*) object;
if (generator->iterator) {
zend_iterator_dtor(generator->iterator);
}
-
- if (EXPECTED(generator->node.children == 0)) {
- zend_generator *root = generator->node.ptr.root, *next;
- while (UNEXPECTED(root != generator)) {
- next = zend_generator_get_child(&root->node, generator);
- OBJ_RELEASE(&root->std);
- root = next;
- }
- }
}
/* }}} */