Skip to content

Commit c9f3488

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: JIT x86: Fixed incorrect EX(func) initialization for recursive calls
2 parents 5c1ae3f + 0e0f50b commit c9f3488

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8896,7 +8896,14 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con
88968896
| EXT_CALL zend_jit_int_extend_stack_helper, r0
88978897
} else {
88988898
if (!is_closure) {
8899-
| mov FCARG2a, r0
8899+
if (func
8900+
&& op_array == &func->op_array
8901+
&& (func->op_array.fn_flags & ZEND_ACC_IMMUTABLE)
8902+
&& (sizeof(void*) != 8 || IS_SIGNED_32BIT(func))) {
8903+
| LOAD_ADDR FCARG2a, func
8904+
} else {
8905+
| mov FCARG2a, r0
8906+
}
89008907
} else {
89018908
| lea FCARG2a, aword [r0 + offsetof(zend_closure, func)]
89028909
}

0 commit comments

Comments
 (0)