Skip to content

Commit 48e31be

Browse files
committed
Fix FE_FETCH_R_SIMPLE specialization
After a99d08b the type can include UNDEF. However, UNDEF can only reach FE_FREE, not FE_FETCH. As such, simply ignore this type.
1 parent 6ff5b3d commit 48e31be

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Zend/zend_vm_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9571,7 +9571,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_SEND_VAL_EX, op->op2_type == IS_UNUSED && op-
95719571
ZEND_VM_NEXT_OPCODE();
95729572
}
95739573

9574-
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_FE_FETCH_R, op->op2_type == IS_CV && (op1_info & (MAY_BE_UNDEF|MAY_BE_ANY|MAY_BE_REF)) == MAY_BE_ARRAY, ZEND_FE_FETCH_R_SIMPLE, VAR, CV, JMP_ADDR, SPEC(RETVAL))
9574+
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_FE_FETCH_R, op->op2_type == IS_CV && (op1_info & (MAY_BE_ANY|MAY_BE_REF)) == MAY_BE_ARRAY, ZEND_FE_FETCH_R_SIMPLE, VAR, CV, JMP_ADDR, SPEC(RETVAL))
95759575
{
95769576
USE_OPLINE
95779577
zval *array;

Zend/zend_vm_execute.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61967,7 +61967,7 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t
6196761967
}
6196861968
break;
6196961969
case ZEND_FE_FETCH_R:
61970-
if (op->op2_type == IS_CV && (op1_info & (MAY_BE_UNDEF|MAY_BE_ANY|MAY_BE_REF)) == MAY_BE_ARRAY) {
61970+
if (op->op2_type == IS_CV && (op1_info & (MAY_BE_ANY|MAY_BE_REF)) == MAY_BE_ARRAY) {
6197161971
spec = 3421 | SPEC_RULE_RETVAL;
6197261972
}
6197361973
break;

0 commit comments

Comments
 (0)