From c4ee66856e1450568f37cebeeb05d60d1cbfbe24 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 2 Dec 2021 23:47:36 +0300 Subject: [PATCH] Tracing JIT: Fixed Zend/tests/str_offset_008.phpt failure --- ext/opcache/jit/zend_jit_x86.dasc | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 55ba4d4990e..3ea6b38fa45 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -12096,26 +12096,26 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst, |6: } - if ((opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) || (op2_info & MAY_BE_UNDEF)) { - | SET_EX_OPLINE opline, r0 - if (opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) { - | IF_NOT_ZVAL_TYPE op1_addr, IS_UNDEF, >1 - | // zend_error(E_WARNING, "Undefined variable $%s", ZSTR_VAL(CV_DEF_OF(EX_VAR_TO_NUM(opline->op1.var)))); - | mov FCARG1d, opline->op1.var - | EXT_CALL zend_jit_undefined_op_helper, r0 - |1: - } - - if (op2_info & MAY_BE_UNDEF) { - | IF_NOT_ZVAL_TYPE op2_addr, IS_UNDEF, >1 - | mov FCARG1d, opline->op2.var - | EXT_CALL zend_jit_undefined_op_helper, r0 - |1: - } - } - if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string))) && (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))) { + if ((opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) || (op2_info & MAY_BE_UNDEF)) { + | SET_EX_OPLINE opline, r0 + if (opline->opcode != ZEND_FETCH_DIM_IS && (op1_info & MAY_BE_UNDEF)) { + | IF_NOT_ZVAL_TYPE op1_addr, IS_UNDEF, >1 + | // zend_error(E_WARNING, "Undefined variable $%s", ZSTR_VAL(CV_DEF_OF(EX_VAR_TO_NUM(opline->op1.var)))); + | mov FCARG1d, opline->op1.var + | EXT_CALL zend_jit_undefined_op_helper, r0 + |1: + } + + if (op2_info & MAY_BE_UNDEF) { + | IF_NOT_ZVAL_TYPE op2_addr, IS_UNDEF, >1 + | mov FCARG1d, opline->op2.var + | EXT_CALL zend_jit_undefined_op_helper, r0 + |1: + } + } + if (opline->opcode != ZEND_FETCH_DIM_IS && opline->opcode != ZEND_FETCH_LIST_R) { if ((op1_info & MAY_BE_UNDEF) || (op2_info & MAY_BE_UNDEF)) { | LOAD_ZVAL_ADDR FCARG1a, orig_op1_addr