@@ -3098,8 +3098,9 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV zend_runtime_jit(Z
3098
3098
bool do_bailout = 0 ;
3099
3099
3100
3100
zend_shared_alloc_lock ();
3101
+ jit_extension = (zend_jit_op_array_extension * )ZEND_FUNC_INFO (op_array );
3101
3102
3102
- if (ZEND_FUNC_INFO ( op_array )) {
3103
+ if (jit_extension && !( jit_extension -> func_info . flags & ZEND_FUNC_JITED )) {
3103
3104
3104
3105
SHM_UNPROTECT ();
3105
3106
zend_jit_unprotect ();
@@ -3111,11 +3112,12 @@ static ZEND_OPCODE_HANDLER_RET ZEND_OPCODE_HANDLER_FUNC_CCONV zend_runtime_jit(Z
3111
3112
opline ++ ;
3112
3113
}
3113
3114
}
3114
- jit_extension = (zend_jit_op_array_extension * )ZEND_FUNC_INFO (op_array );
3115
3115
((zend_op * )opline )-> handler = jit_extension -> orig_handler ;
3116
3116
3117
3117
/* perform real JIT for this function */
3118
3118
zend_real_jit_func (op_array , NULL , NULL , ZEND_JIT_ON_FIRST_EXEC );
3119
+
3120
+ jit_extension -> func_info .flags |= ZEND_FUNC_JITED ;
3119
3121
} zend_catch {
3120
3122
do_bailout = true;
3121
3123
} zend_end_try ();
@@ -3182,7 +3184,7 @@ void ZEND_FASTCALL zend_jit_hot_func(zend_execute_data *execute_data, const zend
3182
3184
zend_shared_alloc_lock ();
3183
3185
jit_extension = (zend_jit_op_array_hot_extension * )ZEND_FUNC_INFO (op_array );
3184
3186
3185
- if (jit_extension ) {
3187
+ if (jit_extension && !( jit_extension -> func_info . flags & ZEND_FUNC_JITED ) ) {
3186
3188
SHM_UNPROTECT ();
3187
3189
zend_jit_unprotect ();
3188
3190
@@ -3195,6 +3197,8 @@ void ZEND_FASTCALL zend_jit_hot_func(zend_execute_data *execute_data, const zend
3195
3197
3196
3198
/* perform real JIT for this function */
3197
3199
zend_real_jit_func (op_array , NULL , opline , ZEND_JIT_ON_HOT_COUNTERS );
3200
+
3201
+ jit_extension -> func_info .flags |= ZEND_FUNC_JITED ;
3198
3202
} zend_catch {
3199
3203
do_bailout = 1 ;
3200
3204
} zend_end_try ();
0 commit comments