Skip to content

Release call trampolines in zpp fcc #6073

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 2 commits into from
Closed

Release call trampolines in zpp fcc #6073

wants to merge 2 commits into from

Conversation

nikic
Copy link
Member

@nikic nikic commented Sep 4, 2020

When using zpp 'f' or Z_PARAM_FUNC, if the fcc points to a call trampoline release it immediately and force zend_call_function to refetch it (it will have to do so anyway if there is more than one call). Otherwise, there is no guarantee that it will actually get freed. I've been adding manual zend_release_fcall_info_cache calls to some functions, but it's easy to forget and pretty hard to deal with some situations (e.g. if a later zpp param after Z_PARAM_FUNC triggers a type error).

@nikic
Copy link
Member Author

nikic commented Sep 4, 2020

@dstogov What do you think about this?

@dstogov
Copy link
Member

dstogov commented Sep 4, 2020

I don't see any problems.

When using zpp 'f' or Z_PARAM_FUNC, if the fcc points to a call
trampoline release it immediately and force zend_call_function
to refetch it. Otherwise, there is no guarantee that it will
actually get freed.

This fixes oss-fuzz #25390.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants