Skip to content

Commit

Permalink
JIT x86: Fixed incorrect EX(func) initialization for recursive calls
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Sep 21, 2021
1 parent b17adff commit 0e0f50b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ext/opcache/jit/zend_jit_x86.dasc
Original file line number Diff line number Diff line change
Expand Up @@ -8923,7 +8923,14 @@ static int zend_jit_push_call_frame(dasm_State **Dst, const zend_op *opline, con
| EXT_CALL zend_jit_int_extend_stack_helper, r0
} else {
if (!is_closure) {
| mov FCARG2a, r0
if (func
&& op_array == &func->op_array
&& (func->op_array.fn_flags & ZEND_ACC_IMMUTABLE)
&& (sizeof(void*) != 8 || IS_SIGNED_32BIT(func))) {
| LOAD_ADDR FCARG2a, func
} else {
| mov FCARG2a, r0
}
} else {
| lea FCARG2a, aword [r0 + offsetof(zend_closure, func)]
}
Expand Down

0 comments on commit 0e0f50b

Please sign in to comment.