Skip to content

Fix fake closure leaking when called from internal func #9884

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

Conversation

iluuu1994
Copy link
Member

Introduced in 8e49d7f.

ZEND_CALL_RELEASE_THIS was previously not handled for internal calls but just for user calls in the zend_leave_helper.

Introduced in 8e49d7f.

ZEND_CALL_RELEASE_THIS was previously not handled for internal calls but
just for user calls in the zend_leave_helper.
Copy link
Member

@bwoebi bwoebi left a comment

Choose a reason for hiding this comment

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

How have you spotted that :-D
Nice catch and looks right to me.

@iluuu1994
Copy link
Member Author

@bwoebi
Copy link
Member

bwoebi commented Nov 3, 2022

Looks like a simple oversight, because DO_FCALL does it, for user and internal functions. Might well be that it's an existing bug causing issues in other cases too.

@iluuu1994
Copy link
Member Author

@bwoebi You think this is worth back porting without a failing test?

@bwoebi
Copy link
Member

bwoebi commented Nov 3, 2022

@iluuu1994 Actually, just checked the code, no it is not worth it: ZEND_INIT_DYNAMIC_CALL is the only source of ZEND_CALL_RELEASE_THIS. I.e. can only happen in VM - now it can happen in zend_call_function too.

@iluuu1994 iluuu1994 closed this in cc9ddde Nov 3, 2022
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