1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

JIT: Fix named arguments handling

Fixes oss-fuzz #41486
This commit is contained in:
Dmitry Stogov
2021-11-29 18:37:49 +03:00
parent f3bd24a200
commit 8f4cfe04eb

View File

@@ -0,0 +1,23 @@
--TEST--
JIT SEND_VAL: 002 named arg
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
--FILE--
<?php
function o(){
var_dump(x:$x?1:0);
}
o();
?>
--EXPECTF--
Warning: Undefined variable $x in %ssend_val_002.php on line 3
Fatal error: Uncaught ArgumentCountError: var_dump() expects at least 1 argument, 0 given in %ssend_val_002.php:3
Stack trace:
#0 %ssend_val_002.php(3): var_dump(x: 0)
#1 %ssend_val_002.php(5): o()
#2 {main}
thrown in %ssend_val_002.php on line 3