-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GH-11406: segfault with unpacking and magic method closure
The magic method trampoline closure may be variadic. However, the arg_info for the variadic argument was not set, resulting in a crash both in reflection and in the VM. Fix it by creating an arg_info containing a single element in case of the variadic case. The variadic argument is the last one (and in this case only one) in the arg_info array. We make sure the argument info is equivalent to the argument info of `$closure` of the following code snippet: ``` function foo(...$arguments) {} $closure = foo(...); ``` Closes GH-11417.
- Loading branch information
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters