Skip to content

Fix #78543: is_callable() on FFI\CData throws Exception #4718

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

cmb69
Copy link
Member

@cmb69 cmb69 commented Sep 18, 2019

If Z_OBJ_HANDLER_P(callable, get_closure) throws, we must not let the
exeception pass to userland, if called through is_callable().

If `Z_OBJ_HANDLER_P(callable, get_closure)` throws, we must not let the
exeception pass to userland, if called through `is_callable()`.
@dstogov
Copy link
Member

dstogov commented Sep 18, 2019

This looks good for PHP-7.4.

For master, it might be better to extend get_closure() with additional argument and prevent exception throwing in first place.

@cmb69
Copy link
Member Author

cmb69 commented Sep 18, 2019

Thanks @dstogov! So cmb69/php-src@9db334e for master?

@dstogov
Copy link
Member

dstogov commented Sep 18, 2019

Oh, I didn't mean master must be fixed in different way immediately.
I'll try to review cmb69@9db334e tomorrow.
It's OK to merge this PR first (may be with TODO comment).

@cmb69
Copy link
Member Author

cmb69 commented Sep 19, 2019

No problem. Take your time; I'll leave that branch open.

Merged into PHP 7.4 as 9dfbcd7 and added a TODO comment for master.

@cmb69 cmb69 closed this Sep 19, 2019
@cmb69 cmb69 deleted the fix-78543 branch September 19, 2019 07:21
@dstogov
Copy link
Member

dstogov commented Sep 19, 2019

9dfbcd7 looks fine for me. @nikic please take a look as well.

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