From d550c8488a73fcc5fd5dddb2417e4673fdaaa94f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 13 Jul 2021 17:48:55 +0200 Subject: [PATCH] Fix unbalanced NEW call_level in JIT For NEW followed by DO_FCALL, we handle both together and skip over the DO_FCALL, which means that the call_level for it will not be decremented. Do so explicitly instead. --- ext/opcache/jit/zend_jit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 50bc302f227..f74a9ba22a9 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -4034,6 +4034,9 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op zend_jit_do_fcall(&dasm_state, next_opline, op_array, ssa, call_level, b + 1, NULL); } } + + /* We skip over the DO_FCALL, so decrement call_level ourselves. */ + call_level--; } break; default: