Skip to content

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
charmitro pushed a commit to wasix-org/php that referenced this pull request Mar 13, 2025
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.

Closes phpGH-17534.
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