From 1271dae2c957a2d88b6b667e7e591c574322fd14 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 5 Sep 2023 15:34:59 +0300 Subject: [PATCH] Fixed incorrect register allocation --- ext/opcache/jit/zend_jit_trace.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 481deb68c87c4..db1469768ce2a 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -3172,6 +3172,12 @@ static zend_jit_reg_var* zend_jit_trace_allocate_registers(zend_jit_trace_rec *t idx++; while (opline->opcode == ZEND_RECV_INIT) { /* RECV_INIT doesn't support registers */ +#ifdef ZEND_JIT_IR + if (ssa_op->result_use >= 0 && RA_HAS_IVAL(ssa_op->result_use)) { + RA_IVAL_DEL(ssa_op->result_use); + count--; + } +#endif if (ssa_op->result_def >= 0) { RA_IVAL_CLOSE(EX_VAR_TO_NUM(opline->result.var), idx); SET_STACK_VAR(stack, EX_VAR_TO_NUM(opline->result.var), ssa_op->result_def);