Skip to content

Commit c1aeb4b

Browse files
committed
Don't record function that may be temporary
1 parent 9388348 commit c1aeb4b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ext/opcache/jit/zend_jit_vm_helpers.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,9 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
916916
if (EX(call)->func->type == ZEND_INTERNAL_FUNCTION) {
917917
zend_function *func = EX(call)->func;
918918

919-
if (func->op_array.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
919+
if ((func->op_array.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)
920+
|| (func->common.fn_flags & ZEND_ACC_NEVER_CACHE)
921+
|| func->common.prop_info) {
920922
/* continue recording */
921923
func = NULL;
922924
} else if (func->op_array.fn_flags & (ZEND_ACC_CLOSURE|ZEND_ACC_FAKE_CLOSURE)) {
@@ -1132,7 +1134,9 @@ zend_jit_trace_stop ZEND_FASTCALL zend_jit_trace_execute(zend_execute_data *ex,
11321134
opline = EX(opline);
11331135
#endif
11341136

1135-
if (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) {
1137+
if ((func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)
1138+
|| (func->common.fn_flags & ZEND_ACC_NEVER_CACHE)
1139+
|| func->common.prop_info) {
11361140
/* continue recording */
11371141
func = NULL;
11381142
} else if (JIT_G(max_polymorphic_calls) == 0

0 commit comments

Comments
 (0)