Skip to content

Commit bf858a8

Browse files
committed
Clear after first failed check
1 parent 81f1465 commit bf858a8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Zend/zend_execute.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -3232,6 +3232,9 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c
32323232
return;
32333233
}
32343234
}
3235+
} else if (prop_op_type == IS_CONST) {
3236+
/* CE mismatch, make cache slot consistent */
3237+
cache_slot[0] = cache_slot[1] = cache_slot[2] = NULL;
32353238
}
32363239

32373240
/* Pointer on property callback is required */
@@ -3267,7 +3270,7 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c
32673270

32683271
if (prop_op_type == IS_CONST) {
32693272
prop_info = CACHED_PTR_EX(cache_slot + 2);
3270-
if (prop_info && EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) {
3273+
if (prop_info) {
32713274
if (UNEXPECTED(!zend_handle_fetch_obj_flags(result, ptr, NULL, prop_info, flags))) {
32723275
goto end;
32733276
}

ext/opcache/jit/zend_jit_helpers.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2084,7 +2084,7 @@ static void ZEND_FASTCALL zend_jit_fetch_obj_w_slow(zend_object *zobj)
20842084

20852085
if (opline->op2_type == IS_CONST) {
20862086
prop_info = CACHED_PTR_EX(cache_slot + 2);
2087-
if (!prop_info || !EXPECTED(zobj->ce == CACHED_PTR_EX(cache_slot))) {
2087+
if (!prop_info) {
20882088
break;
20892089
}
20902090
}

0 commit comments

Comments
 (0)