Skip to content

Conversation

iluuu1994
Copy link
Member

We're executing in the VM, so EG(exception) has to be unset. ZEND_THROW itself already has HANDLE_EXCEPTION() calls when it throws, i.e. when the subject is not a throwable object.

We're executing in the VM, so EG(exception) has to be unset. ZEND_THROW itself
already has HANDLE_EXCEPTION() calls when it throws, i.e. when the subject is
not a throwable object.
ZEND_ASSERT(!EG(exception));
Z_TRY_ADDREF_P(value);
zend_throw_exception_object(value);
zend_exception_restore();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the restore also be removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought EG(prev_exception) could be set, but I'll double check. zend_exception_save() is called in very few places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants