From b006c45462fbbaba80d995ce42d18dd8e0971aff Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 16 May 2025 21:23:15 +0200 Subject: [PATCH] Do not exit to VM when setting undefined prop in constructor --- ext/opcache/jit/zend_jit_ir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_ir.c b/ext/opcache/jit/zend_jit_ir.c index 2a3b9baf28e67..1fdb1b9b3af91 100644 --- a/ext/opcache/jit/zend_jit_ir.c +++ b/ext/opcache/jit/zend_jit_ir.c @@ -14971,8 +14971,9 @@ static int zend_jit_assign_obj(zend_jit_ctx *jit, ZEND_ASSERT(slow_inputs == IR_UNUSED); goto slow_path; } + // Undefined property with potential magic __get()/__set() or lazy object - if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE) { + if (JIT_G(trigger) == ZEND_JIT_ON_HOT_TRACE && prop_type != IS_UNDEF) { int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM); const void *exit_addr = zend_jit_trace_get_exit_addr(exit_point);