Skip to content

Zend: is_callable() wrongly accepts objects with no get_closure handler. - #23123

Closed
devnexen wants to merge 1 commit into
php:masterfrom
devnexen:gh23121
Closed

Zend: is_callable() wrongly accepts objects with no get_closure handler.#23123
devnexen wants to merge 1 commit into
php:masterfrom
devnexen:gh23121

Conversation

@devnexen

@devnexen devnexen commented Aug 8, 2026

Copy link
Copy Markdown
Member

Fix #23121

zend_is_callable_at_frame() tested get_closure && get_closure(...) == FAILURE, so a NULL handler short circuited past the error branch into the success path, leaving fcc->function_handler NULL. zend_fcc_addref() then asserted and call_user_func() dereferenced the null zend_function.

Fix php#23121

zend_is_callable_at_frame() tested `get_closure && get_closure(...) == FAILURE`,
so a NULL handler short circuited past the error branch into the success path,
leaving fcc->function_handler NULL. zend_fcc_addref() then asserted and
call_user_func() dereferenced the null zend_function.
@devnexen
devnexen marked this pull request as ready for review August 8, 2026 06:13
@devnexen
devnexen requested a review from dstogov as a code owner August 8, 2026 06:13
@devnexen
devnexen requested a review from arnaud-lb August 8, 2026 06:13

@arnaud-lb arnaud-lb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me!

@devnexen devnexen closed this in bb0ab98 Aug 8, 2026
@NickSdot NickSdot mentioned this pull request Aug 9, 2026
@devnexen
devnexen deleted the gh23121 branch August 23, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants