From 48e31be7a335a556b88cec18926b37e3865a6c99 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 1 Sep 2020 14:42:14 +0200 Subject: [PATCH] Fix FE_FETCH_R_SIMPLE specialization After a99d08b5d135fffa1d83b08b056e0080d295d863 the type can include UNDEF. However, UNDEF can only reach FE_FREE, not FE_FETCH. As such, simply ignore this type. --- Zend/zend_vm_def.h | 2 +- Zend/zend_vm_execute.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index d5b8ba781f..246c5a990d 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -9571,7 +9571,7 @@ ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_SEND_VAL_EX, op->op2_type == IS_UNUSED && op- ZEND_VM_NEXT_OPCODE(); } -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)) +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)) { USE_OPLINE zval *array; diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 15d9f9ba5f..4b3958a4e4 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -61967,7 +61967,7 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t } break; case ZEND_FE_FETCH_R: - if (op->op2_type == IS_CV && (op1_info & (MAY_BE_UNDEF|MAY_BE_ANY|MAY_BE_REF)) == MAY_BE_ARRAY) { + if (op->op2_type == IS_CV && (op1_info & (MAY_BE_ANY|MAY_BE_REF)) == MAY_BE_ARRAY) { spec = 3421 | SPEC_RULE_RETVAL; } break; -- 2.40.0