Skip to content

Commit 9d14bdb

Browse files
committed
Bad function detection
1 parent 0d9beba commit 9d14bdb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ext/opcache/jit/zend_jit_vm_helpers.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ static int zend_jit_trace_record_fake_init_call_ex(zend_execute_data *call, zend
475475
}
476476

477477
func = call->func;
478-
if (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
478+
if (func->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE)) {
479479
/* TODO: Can we continue recording ??? */
480480
return -1;
481481
}
@@ -855,6 +855,10 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
855855
/* TODO: Can we continue recording ??? */
856856
stop = ZEND_JIT_TRACE_STOP_TRAMPOLINE;
857857
break;
858+
} else if (EX(call)->func->common.fn_flags & ZEND_ACC_NEVER_CACHE) {
859+
/* TODO: Can we continue recording ??? */
860+
stop = ZEND_JIT_TRACE_STOP_BAD_FUNC;
861+
break;
858862
}
859863
func = EX(call)->func;
860864
if (func->type == ZEND_USER_FUNCTION

0 commit comments

Comments
 (0)