Skip to content

Commit e96b984

Browse files
committed
Fixed JIT on first function execution (opcache.jit=1215) with CALL VM
1 parent 6fa4493 commit e96b984

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/opcache/jit/zend_jit.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static const void *zend_jit_func_trace_counter_handler = NULL;
116116
static const void *zend_jit_ret_trace_counter_handler = NULL;
117117
static const void *zend_jit_loop_trace_counter_handler = NULL;
118118

119-
static void ZEND_FASTCALL zend_runtime_jit(void);
119+
static int ZEND_FASTCALL zend_runtime_jit(void);
120120

121121
static int zend_jit_trace_op_len(const zend_op *opline);
122122
static int zend_jit_trace_may_exit(const zend_op_array *op_array, const zend_op *opline);
@@ -3625,7 +3625,7 @@ static int zend_real_jit_func(zend_op_array *op_array, zend_script *script, cons
36253625
}
36263626

36273627
/* Run-time JIT handler */
3628-
static void ZEND_FASTCALL zend_runtime_jit(void)
3628+
static int ZEND_FASTCALL zend_runtime_jit(void)
36293629
{
36303630
zend_execute_data *execute_data = EG(current_execute_data);
36313631
zend_op_array *op_array = &EX(func)->op_array;
@@ -3657,6 +3657,7 @@ static void ZEND_FASTCALL zend_runtime_jit(void)
36573657
zend_shared_alloc_unlock();
36583658

36593659
/* JIT-ed code is going to be called by VM */
3660+
return 0;
36603661
}
36613662

36623663
void zend_jit_check_funcs(HashTable *function_table, zend_bool is_method) {

0 commit comments

Comments
 (0)