@@ -4166,6 +4166,9 @@ static int zend_jit_inc_dec(dasm_State **Dst, const zend_op *opline, uint32_t op
4166
4166
4167
4167
exit_point = zend_jit_trace_get_exit_point(opline + 1, 0);
4168
4168
exit_addr = zend_jit_trace_get_exit_addr(exit_point);
4169
+ if (!exit_addr) {
4170
+ return 0;
4171
+ }
4169
4172
| jo &exit_addr
4170
4173
4171
4174
if ((opline->opcode == ZEND_PRE_INC || opline->opcode == ZEND_PRE_DEC) &&
@@ -4465,6 +4468,9 @@ static int zend_jit_math_long_long(dasm_State **Dst,
4465
4468
if (res_info & MAY_BE_GUARD) {
4466
4469
int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0);
4467
4470
const void *exit_addr = zend_jit_trace_get_exit_addr(exit_point);
4471
+ if (!exit_addr) {
4472
+ return 0;
4473
+ }
4468
4474
if ((res_info & MAY_BE_ANY) == MAY_BE_LONG) {
4469
4475
| jo &exit_addr
4470
4476
if (Z_MODE(res_addr) == IS_REG && result_reg != Z_REG(res_addr)) {
@@ -6852,6 +6858,9 @@ static int zend_jit_assign_dim_op(dasm_State **Dst, const zend_op *opline, uint3
6852
6858
&& !(op2_info & ((MAY_BE_ANY|MAY_BE_UNDEF) - (MAY_BE_LONG|MAY_BE_STRING)))) {
6853
6859
int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0);
6854
6860
not_found_exit_addr = zend_jit_trace_get_exit_addr(exit_point);
6861
+ if (!not_found_exit_addr) {
6862
+ return 0;
6863
+ }
6855
6864
}
6856
6865
6857
6866
if (!zend_jit_fetch_dimension_address_inner(Dst, opline, BP_VAR_RW, op1_info, op2_info, dim_type, NULL, not_found_exit_addr, NULL)) {
@@ -13235,6 +13244,9 @@ static int zend_jit_fetch_obj(dasm_State **Dst,
13235
13244
&& (op1_info & (MAY_BE_ANY|MAY_BE_UNDEF)) == MAY_BE_OBJECT) {
13236
13245
exit_point = zend_jit_trace_get_exit_point(opline, 0);
13237
13246
exit_addr = zend_jit_trace_get_exit_addr(exit_point);
13247
+ if (!exit_addr) {
13248
+ return 0;
13249
+ }
13238
13250
} else {
13239
13251
val_addr = ZEND_ADDR_MEM_ZVAL(ZREG_R0, 0);
13240
13252
| LOAD_ZVAL_ADDR r0, prop_addr
@@ -13626,6 +13638,9 @@ static int zend_jit_incdec_obj(dasm_State **Dst,
13626
13638
if (use_prop_guard) {
13627
13639
int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0);
13628
13640
const void *exit_addr = zend_jit_trace_get_exit_addr(exit_point);
13641
+ if (!exit_addr) {
13642
+ return 0;
13643
+ }
13629
13644
13630
13645
| IF_NOT_ZVAL_TYPE var_addr, prop_type, &exit_addr
13631
13646
var_info = (1 << prop_type) | (var_info & ~(MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF));
@@ -13784,6 +13799,9 @@ static int zend_jit_incdec_obj(dasm_State **Dst,
13784
13799
SET_STACK_TYPE(stack, EX_VAR_TO_NUM(opline->result.var), IS_DOUBLE, 0);
13785
13800
exit_point = zend_jit_trace_get_exit_point(opline + 1, 0);
13786
13801
exit_addr = zend_jit_trace_get_exit_addr(exit_point);
13802
+ if (!exit_addr) {
13803
+ return 0;
13804
+ }
13787
13805
SET_STACK_INFO(stack, EX_VAR_TO_NUM(opline->result.var), old_res_info);
13788
13806
ssa->var_info[ssa_op->result_def].type = res_info & ~MAY_BE_GUARD;
13789
13807
| jmp &exit_addr
@@ -14107,6 +14125,9 @@ static int zend_jit_assign_obj_op(dasm_State **Dst,
14107
14125
if (use_prop_guard) {
14108
14126
int32_t exit_point = zend_jit_trace_get_exit_point(opline, 0);
14109
14127
const void *exit_addr = zend_jit_trace_get_exit_addr(exit_point);
14128
+ if (!exit_addr) {
14129
+ return 0;
14130
+ }
14110
14131
14111
14132
| IF_NOT_ZVAL_TYPE var_addr, prop_type, &exit_addr
14112
14133
var_info = (1 << prop_type) | (var_info & ~(MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF));
@@ -14807,6 +14828,10 @@ static int zend_jit_fetch_this(dasm_State **Dst, const zend_op *opline, const ze
14807
14828
int32_t exit_point = zend_jit_trace_get_exit_point(opline, ZEND_JIT_EXIT_TO_VM);
14808
14829
const void *exit_addr = zend_jit_trace_get_exit_addr(exit_point);
14809
14830
14831
+ if (!exit_addr) {
14832
+ return 0;
14833
+ }
14834
+
14810
14835
| cmp byte EX->This.u1.v.type, IS_OBJECT
14811
14836
| jne &exit_addr
14812
14837
@@ -14980,10 +15005,16 @@ static int zend_jit_switch(dasm_State **Dst, const zend_op *opline, const zend_o
14980
15005
if (next_opline != opline + 1) {
14981
15006
exit_point = zend_jit_trace_get_exit_point(opline + 1, 0);
14982
15007
fallback_label = zend_jit_trace_get_exit_addr(exit_point);
15008
+ if (!fallback_label) {
15009
+ return 0;
15010
+ }
14983
15011
}
14984
15012
if (next_opline != default_opline) {
14985
15013
exit_point = zend_jit_trace_get_exit_point(default_opline, 0);
14986
15014
default_label = zend_jit_trace_get_exit_addr(exit_point);
15015
+ if (!default_label) {
15016
+ return 0;
15017
+ }
14987
15018
}
14988
15019
}
14989
15020
0 commit comments