Skip to content

Commit 5899b16

Browse files
committed
Fixed JIT on load with -O4
1 parent eae6df4 commit 5899b16

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8327,6 +8327,13 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
83278327
if (func) {
83288328
if (func->op_array.fn_flags & ZEND_ACC_IMMUTABLE) {
83298329
| MEM_OP2_2_ZTS add, r2, aword, compiler_globals, map_ptr_base, r1
8330+
} else if (JIT_G(opt_level) < ZEND_JIT_LEVEL_OPT_SCRIPT
8331+
&& JIT_G(trigger) == ZEND_JIT_ON_SCRIPT_LOAD) {
8332+
/* the called op_array may be not persisted yet */
8333+
| test r2, 1
8334+
| jz >1
8335+
| MEM_OP2_2_ZTS add, r2, aword, compiler_globals, map_ptr_base, r1
8336+
|1:
83308337
}
83318338
| mov r2, aword [r2]
83328339
} else {

0 commit comments

Comments
 (0)