Uh oh!
There was an error while loading. Please reload this page.
Fix use-of-uninitialized-value in zend_get_arg_offset_by_name() - #19856
Fix use-of-uninitialized-value in zend_get_arg_offset_by_name()#19856iluuu1994 wants to merge 3 commits into
Conversation
Don't access fbc->op_array.refcount on internal function. Don't attempt to cache ZEND_ACC_USER_ARG_INFO at all, which is only used in zend_get_closure_invoke_method(). This may reuse arg_info from a temporary closure, and hence caching would also be unsafe.
Hmm, actually I guess this also needs a fix for the Edit: I don't think this should be necessary. |
arnaud-lb
commented
Sep 17, 2025
No you were right, I think you need to check for functioninvoke($closure) {
$closure->__invoke(a: 1);
}
invoke(eval('return function(...$a) { var_dump($a); };'));
invoke(eval('return function(...$b) { var_dump($b); };')); |
iluuu1994
commented
Sep 17, 2025
You're right. There are two calls to |
iluuu1994
commented
Sep 17, 2025
@arnaud-lb Check again please. 🙂 |
This may happen when a closure with a variadic parameter is called with $closure->__invoke().
d3a1ca0 to
d5d29a6CompareUh oh!
There was an error while loading. Please reload this page.
iluuu1994
commented
Sep 17, 2025
Thanks for catching this. Hopefully it's ok now. |
Don't access fbc->op_array.refcount on internal function. Don't attempt to cache ZEND_ACC_USER_ARG_INFO at all, which is only used in zend_get_closure_invoke_method(). This may reuse arg_info from a temporary closure, and hence caching would also be unsafe.
See https://github.com/php/php-src/actions/runs/17751635609/job/50447500518.
Introduced in #19654.