Skip to content

Commit 8b7f64f

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix possible NULL dereference
2 parents 70eb8f0 + 24d5912 commit 8b7f64f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/opcache/jit/zend_jit_trace.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,7 +1251,8 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin
12511251
}
12521252
} else if (p->op == ZEND_JIT_TRACE_DO_ICALL) {
12531253
if (JIT_G(opt_level) < ZEND_JIT_LEVEL_OPT_FUNC) {
1254-
if (p->func != (zend_function*)&zend_pass_function
1254+
if (p->func
1255+
&& p->func != (zend_function*)&zend_pass_function
12551256
&& (zend_string_equals_literal(p->func->common.function_name, "extract")
12561257
|| zend_string_equals_literal(p->func->common.function_name, "compact")
12571258
|| zend_string_equals_literal(p->func->common.function_name, "get_defined_vars"))) {
@@ -6225,7 +6226,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
62256226
goto jit_failure;
62266227
}
62276228
if ((p+1)->op == ZEND_JIT_TRACE_INIT_CALL && (p+1)->func) {
6228-
if (opline->opcode == ZEND_NEW && ssa_op->result_def >= 0) {
6229+
if (opline->opcode == ZEND_NEW && opline->result_type != IS_UNUSED) {
62296230
SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var), IS_OBJECT, 1);
62306231
}
62316232
if (zend_jit_may_be_polymorphic_call(opline) ||

0 commit comments

Comments
 (0)