Skip to content

Move EG(exception) check outside the loop for unpacking #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Zend/zend_vm_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -5186,15 +5186,14 @@ ZEND_VM_C_LABEL(send_again):
const zend_object_iterator_funcs *funcs = iter->funcs;
if (funcs->rewind) {
funcs->rewind(iter);
if (UNEXPECTED(EG(exception) != NULL)) {
ZEND_VM_C_GOTO(after_loop);
}
}

for (; funcs->valid(iter) == SUCCESS; ++arg_num) {
zval *arg, *top;

if (UNEXPECTED(EG(exception) != NULL)) {
break;
}

arg = funcs->get_current_data(iter);
if (UNEXPECTED(EG(exception) != NULL)) {
break;
Expand Down Expand Up @@ -5277,6 +5276,7 @@ ZEND_VM_C_LABEL(send_again):
funcs->move_forward(iter);
}

ZEND_VM_C_LABEL(after_loop):
zend_iterator_dtor(iter);
}
} else if (EXPECTED(Z_ISREF_P(args))) {
Expand Down
8 changes: 4 additions & 4 deletions Zend/zend_vm_execute.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.