Skip to content

Commit 2ff900e

Browse files
committed
Fix JIT
1 parent a8b6f16 commit 2ff900e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

ext/opcache/jit/zend_jit_helpers.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2663,6 +2663,11 @@ static void ZEND_FASTCALL zend_jit_assign_obj_op_helper(zend_object *zobj, zend_
26632663
/* special case for typed properties */
26642664
zend_jit_assign_op_to_typed_prop(zptr, prop_info, value, binary_op);
26652665
} else {
2666+
/* This case can ***ONLY*** happen if get_property_ptr_ptr emits a diagnostic
2667+
* (e.g. undefined property warning) and the property is unset in the error handler */
2668+
if (UNEXPECTED(Z_TYPE_P(zptr) == IS_UNDEF)) {
2669+
ZVAL_NULL(zptr);
2670+
}
26662671
binary_op(zptr, zptr, value);
26672672
}
26682673
} while (0);
@@ -2877,6 +2882,11 @@ static void ZEND_FASTCALL zend_jit_pre_inc_obj_helper(zend_object *zobj, zend_st
28772882
break;
28782883
}
28792884
}
2885+
/* This case can ***ONLY*** happen if get_property_ptr_ptr emits a diagnostic
2886+
* (e.g. undefined property warning) and the property is unset in the error handler */
2887+
if (UNEXPECTED(Z_TYPE_P(prop) == IS_UNDEF)) {
2888+
ZVAL_NULL(prop);
2889+
}
28802890

28812891
if (UNEXPECTED(prop_info)) {
28822892
zend_jit_inc_typed_prop(prop, prop_info);
@@ -2947,6 +2957,11 @@ static void ZEND_FASTCALL zend_jit_pre_dec_obj_helper(zend_object *zobj, zend_st
29472957
break;
29482958
}
29492959
}
2960+
/* This case can ***ONLY*** happen if get_property_ptr_ptr emits a diagnostic
2961+
* (e.g. undefined property warning) and the property is unset in the error handler */
2962+
if (UNEXPECTED(Z_TYPE_P(prop) == IS_UNDEF)) {
2963+
ZVAL_NULL(prop);
2964+
}
29502965

29512966
if (UNEXPECTED(prop_info)) {
29522967
zend_jit_dec_typed_prop(prop, prop_info);
@@ -3015,6 +3030,11 @@ static void ZEND_FASTCALL zend_jit_post_inc_obj_helper(zend_object *zobj, zend_s
30153030
return;
30163031
}
30173032
}
3033+
/* This case can ***ONLY*** happen if get_property_ptr_ptr emits a diagnostic
3034+
* (e.g. undefined property warning) and the property is unset in the error handler */
3035+
if (UNEXPECTED(Z_TYPE_P(prop) == IS_UNDEF)) {
3036+
ZVAL_NULL(prop);
3037+
}
30183038

30193039
if (UNEXPECTED(prop_info)) {
30203040
zend_jit_post_inc_typed_prop(prop, prop_info, result);
@@ -3076,6 +3096,11 @@ static void ZEND_FASTCALL zend_jit_post_dec_obj_helper(zend_object *zobj, zend_s
30763096
return;
30773097
}
30783098
}
3099+
/* This case can ***ONLY*** happen if get_property_ptr_ptr emits a diagnostic
3100+
* (e.g. undefined property warning) and the property is unset in the error handler */
3101+
if (UNEXPECTED(Z_TYPE_P(prop) == IS_UNDEF)) {
3102+
ZVAL_NULL(prop);
3103+
}
30793104

30803105
if (UNEXPECTED(prop_info)) {
30813106
zend_jit_post_dec_typed_prop(prop, prop_info, result);

0 commit comments

Comments
 (0)