diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index f6c49664379..8777e67c173 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -4759,6 +4759,10 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par } goto done; case ZEND_CHECK_UNDEF_ARGS: + if (JIT_G(current_frame) + && JIT_G(current_frame)->call) { + TRACE_FRAME_SET_UNKNOWN_NUM_ARGS(JIT_G(current_frame)->call); + } if (!zend_jit_check_undef_args(&dasm_state, opline)) { goto jit_failure; } diff --git a/ext/opcache/tests/jit/send_var_ex_002.phpt b/ext/opcache/tests/jit/send_var_ex_002.phpt new file mode 100644 index 00000000000..dc848bcdb31 --- /dev/null +++ b/ext/opcache/tests/jit/send_var_ex_002.phpt @@ -0,0 +1,23 @@ +--TEST-- +JIT SEND_VAR_EX may leak with named args +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=1M +--FILE-- + +--EXPECT-- +int(1) +int(1) +int(1)