Skip to content
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

Fix may_have_extra_named_args flag for ZEND_AST_UNPACK #17534

Closed
wants to merge 1 commit into from

Conversation

nielsdos
Copy link
Member

The check for !fbc || (fbc->common.fn_flags & ZEND_ACC_VARIADIC) is performed after fbc is set to NULL, so this always returns true. This results in ZEND_FCALL_MAY_HAVE_EXTRA_NAMED_PARAMS always being set for unpack sends. Fix it by moving the flag updates to the point before setting fbc to NULL.

The check for `!fbc || (fbc->common.fn_flags & ZEND_ACC_VARIADIC)` is
performed after `fbc` is set to NULL, so this always returns true.
This results in `ZEND_FCALL_MAY_HAVE_EXTRA_NAMED_PARAMS` always being
set for unpack sends. Fix it by moving the flag updates to the point
before setting `fbc` to NULL.
@nielsdos nielsdos marked this pull request as ready for review January 21, 2025 08:03
@nielsdos nielsdos requested a review from dstogov January 21, 2025 08:03
@nielsdos nielsdos closed this in 0b3e637 Jan 21, 2025
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