summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2020-07-09 17:24:35 +0300
committerDmitry Stogov <dmitry@zend.com>2020-07-09 17:24:35 +0300
commit9d14bdb377171293061f2ae290505a64111ffcb8 (patch)
tree364d427046014076fd0ae4ae30e977e3d168abee
parent0d9bebac00e568dacbfe8b35f39743179608968e (diff)
downloadphp-git-9d14bdb377171293061f2ae290505a64111ffcb8.tar.gz
Bad function detection
-rw-r--r--ext/opcache/jit/zend_jit_vm_helpers.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/opcache/jit/zend_jit_vm_helpers.c b/ext/opcache/jit/zend_jit_vm_helpers.c
index c7c7afba9d..9e52c47be7 100644
--- a/ext/opcache/jit/zend_jit_vm_helpers.c
+++ b/ext/opcache/jit/zend_jit_vm_helpers.c
@@ -475,7 +475,7 @@ static int zend_jit_trace_record_fake_init_call_ex(zend_execute_data *call, zend
}
func = call->func;
- if (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
+ if (func->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE)) {
/* TODO: Can we continue recording ??? */
return -1;
}
@@ -855,6 +855,10 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
/* TODO: Can we continue recording ??? */
stop = ZEND_JIT_TRACE_STOP_TRAMPOLINE;
break;
+ } else if (EX(call)->func->common.fn_flags & ZEND_ACC_NEVER_CACHE) {
+ /* TODO: Can we continue recording ??? */
+ stop = ZEND_JIT_TRACE_STOP_BAD_FUNC;
+ break;
}
func = EX(call)->func;
if (func->type == ZEND_USER_FUNCTION