diff --git a/NEWS b/NEWS index fbe43358801..4187d7e30c1 100644 --- a/NEWS +++ b/NEWS @@ -186,6 +186,8 @@ PHP NEWS - Fixed bug #37256 (php-fastcgi doesn't handle connection abort). (Dmitry) - Fixed bug #37244 (Added strict flag to base64_decode() that enforces RFC3548 compliance). (Ilia) +- Fixed bug #37144 (PHP crashes trying to assign into property of dead object). + (Dmitry) - Fixed bug #36949 (invalid internal mysqli objects dtor). (Mike) - Fixed bug #36759 (Objects destructors are invoked in wrong order when script is finished). (Dmitry) diff --git a/Zend/tests/bug37144.phpt b/Zend/tests/bug37144.phpt index e80986e154b..b3e5489469b 100755 --- a/Zend/tests/bug37144.phpt +++ b/Zend/tests/bug37144.phpt @@ -8,6 +8,8 @@ function foo() { return $x; } foo()->bar[1] = "123"; +foo()->bar[0]++; +unset(foo()->bar[0]); echo "ok\n"; ?> --EXPECT-- diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 0eaf0332c17..e9aebeb7f14 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -1058,6 +1058,10 @@ ZEND_VM_HANDLER(84, ZEND_FETCH_DIM_W, VAR|CV, CONST|TMP|VAR|UNUSED|CV) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), GET_OP1_ZVAL_PTR_PTR(BP_VAR_W), dim, IS_OP2_TMP_FREE(), BP_VAR_W TSRMLS_CC); FREE_OP2(); + if (OP1_TYPE == IS_VAR && OP1_FREE && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } FREE_OP1_VAR_PTR(); ZEND_VM_NEXT_OPCODE(); } @@ -1070,6 +1074,10 @@ ZEND_VM_HANDLER(87, ZEND_FETCH_DIM_RW, VAR|CV, CONST|TMP|VAR|UNUSED|CV) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), GET_OP1_ZVAL_PTR_PTR(BP_VAR_RW), dim, IS_OP2_TMP_FREE(), BP_VAR_RW TSRMLS_CC); FREE_OP2(); + if (OP1_TYPE == IS_VAR && OP1_FREE && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } FREE_OP1_VAR_PTR(); ZEND_VM_NEXT_OPCODE(); } @@ -1099,6 +1107,10 @@ ZEND_VM_HANDLER(93, ZEND_FETCH_DIM_FUNC_ARG, VAR|CV, CONST|TMP|VAR|UNUSED|CV) dim = GET_OP2_ZVAL_PTR(BP_VAR_R); zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), GET_OP1_ZVAL_PTR_PTR(type), dim, IS_OP2_TMP_FREE(), type TSRMLS_CC); FREE_OP2(); + if (OP1_TYPE == IS_VAR && type == BP_VAR_W && OP1_FREE && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } FREE_OP1_VAR_PTR(); ZEND_VM_NEXT_OPCODE(); } @@ -1122,6 +1134,10 @@ ZEND_VM_HANDLER(96, ZEND_FETCH_DIM_UNSET, VAR|CV, CONST|TMP|VAR|CV) } zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, IS_OP2_TMP_FREE(), BP_VAR_UNSET TSRMLS_CC); FREE_OP2(); + if (OP1_TYPE == IS_VAR && OP1_FREE && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } FREE_OP1_VAR_PTR(); if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) { zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); @@ -1223,6 +1239,10 @@ ZEND_VM_HANDLER(85, ZEND_FETCH_OBJ_W, VAR|UNUSED|CV, CONST|TMP|VAR|CV) } else { FREE_OP2(); } + if (OP1_TYPE == IS_VAR && OP1_FREE && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } FREE_OP1_VAR_PTR(); ZEND_VM_NEXT_OPCODE(); } @@ -1242,6 +1262,10 @@ ZEND_VM_HANDLER(88, ZEND_FETCH_OBJ_RW, VAR|UNUSED|CV, CONST|TMP|VAR|CV) } else { FREE_OP2(); } + if (OP1_TYPE == IS_VAR && OP1_FREE && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } FREE_OP1_VAR_PTR(); ZEND_VM_NEXT_OPCODE(); } @@ -1269,6 +1293,10 @@ ZEND_VM_HANDLER(94, ZEND_FETCH_OBJ_FUNC_ARG, VAR|UNUSED|CV, CONST|TMP|VAR|CV) } else { FREE_OP2(); } + if (OP1_TYPE == IS_VAR && OP1_FREE && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } FREE_OP1_VAR_PTR(); ZEND_VM_NEXT_OPCODE(); } else { @@ -1297,6 +1325,10 @@ ZEND_VM_HANDLER(97, ZEND_FETCH_OBJ_UNSET, VAR|UNUSED|CV, CONST|TMP|VAR|CV) } else { FREE_OP2(); } + if (OP1_TYPE == IS_VAR && OP1_FREE && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } FREE_OP1_VAR_PTR(); PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 9133269f396..312f2a5593f 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -8761,6 +8761,10 @@ static int ZEND_FETCH_DIM_W_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 0, BP_VAR_W TSRMLS_CC); + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -8773,6 +8777,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 0, BP_VAR_RW TSRMLS_CC); + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -8802,6 +8810,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_AR dim = &opline->op2.u.constant; zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 0, type TSRMLS_CC); + if (IS_VAR == IS_VAR && type == BP_VAR_W && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -8825,6 +8837,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_UNSET TSRMLS_CC); + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) { zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); @@ -8925,6 +8941,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zval_ptr_dtor(&property); } else { + } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); @@ -8944,6 +8964,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zval_ptr_dtor(&property); } else { + } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); @@ -8971,6 +8995,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_AR zval_ptr_dtor(&property); } else { + } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); @@ -8999,6 +9027,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zval_ptr_dtor(&property); } else { + } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; @@ -10195,6 +10227,10 @@ static int ZEND_FETCH_DIM_W_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 1, BP_VAR_W TSRMLS_CC); zval_dtor(free_op2.var); + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -10207,6 +10243,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 1, BP_VAR_RW TSRMLS_CC); zval_dtor(free_op2.var); + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -10236,6 +10276,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 1, type TSRMLS_CC); zval_dtor(free_op2.var); + if (IS_VAR == IS_VAR && type == BP_VAR_W && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -10259,6 +10303,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_UNSET TSRMLS_CC); zval_dtor(free_op2.var); + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) { zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); @@ -10360,6 +10408,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { zval_dtor(free_op2.var); } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -10379,6 +10431,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { zval_dtor(free_op2.var); } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -10406,6 +10462,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS } else { zval_dtor(free_op2.var); } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } else { @@ -10434,6 +10494,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { zval_dtor(free_op2.var); } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); @@ -11632,6 +11696,10 @@ static int ZEND_FETCH_DIM_W_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 0, BP_VAR_W TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -11644,6 +11712,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 0, BP_VAR_RW TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -11673,6 +11745,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 0, type TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + if (IS_VAR == IS_VAR && type == BP_VAR_W && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -11696,6 +11772,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_UNSET TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) { zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); @@ -11797,6 +11877,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -11816,6 +11900,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -11843,6 +11931,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } else { @@ -11871,6 +11963,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); @@ -12674,6 +12770,10 @@ static int ZEND_FETCH_DIM_W_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 0, BP_VAR_W TSRMLS_CC); + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -12686,6 +12786,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 0, BP_VAR_RW TSRMLS_CC); + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -12703,6 +12807,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_A dim = NULL; zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 0, type TSRMLS_CC); + if (IS_VAR == IS_VAR && type == BP_VAR_W && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -13523,6 +13631,10 @@ static int ZEND_FETCH_DIM_W_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 0, BP_VAR_W TSRMLS_CC); + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -13535,6 +13647,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 0, BP_VAR_RW TSRMLS_CC); + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -13564,6 +13680,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), dim, 0, type TSRMLS_CC); + if (IS_VAR == IS_VAR && type == BP_VAR_W && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); } @@ -13587,6 +13707,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_UNSET TSRMLS_CC); + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) { zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); @@ -13687,6 +13811,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zval_ptr_dtor(&property); } else { + } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); @@ -13706,6 +13834,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zval_ptr_dtor(&property); } else { + } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); @@ -13733,6 +13865,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zval_ptr_dtor(&property); } else { + } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; ZEND_VM_NEXT_OPCODE(); @@ -13761,6 +13897,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zval_ptr_dtor(&property); } else { + } + if (IS_VAR == IS_VAR && (free_op1.var != NULL) && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); } if (free_op1.var) {zval_ptr_dtor(&free_op1.var);}; @@ -14895,6 +15035,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -14914,6 +15058,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -14941,6 +15089,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER } else { } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } else { @@ -14969,6 +15121,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CONST_HANDLER(ZEND_OPCODE_HANDLER_AR } else { } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) { @@ -15982,6 +16138,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { zval_dtor(free_op2.var); } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -16001,6 +16161,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { zval_dtor(free_op2.var); } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -16028,6 +16192,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_A } else { zval_dtor(free_op2.var); } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } else { @@ -16056,6 +16224,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS } else { zval_dtor(free_op2.var); } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) { @@ -17030,6 +17202,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -17049,6 +17225,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -17076,6 +17256,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_A } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } else { @@ -17104,6 +17288,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) { @@ -18452,6 +18640,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -18471,6 +18663,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -18498,6 +18694,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_AR } else { } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } else { @@ -18526,6 +18726,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_UNUSED_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { } + if (IS_UNUSED == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) { @@ -20866,6 +21070,10 @@ static int ZEND_FETCH_DIM_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC), dim, 0, BP_VAR_W TSRMLS_CC); + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -20878,6 +21086,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC), dim, 0, BP_VAR_RW TSRMLS_CC); + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -20907,6 +21119,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARG dim = &opline->op2.u.constant; zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), type TSRMLS_CC), dim, 0, type TSRMLS_CC); + if (IS_CV == IS_VAR && type == BP_VAR_W && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -20930,6 +21146,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_UNSET TSRMLS_CC); + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) { zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); @@ -21030,6 +21250,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -21049,6 +21273,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -21076,6 +21304,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARG } else { } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } else { @@ -21104,6 +21336,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) { @@ -22292,6 +22528,10 @@ static int ZEND_FETCH_DIM_W_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC), dim, 1, BP_VAR_W TSRMLS_CC); zval_dtor(free_op2.var); + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -22304,6 +22544,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC), dim, 1, BP_VAR_RW TSRMLS_CC); zval_dtor(free_op2.var); + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -22333,6 +22577,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), type TSRMLS_CC), dim, 1, type TSRMLS_CC); zval_dtor(free_op2.var); + if (IS_CV == IS_VAR && type == BP_VAR_W && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -22356,6 +22604,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 1, BP_VAR_UNSET TSRMLS_CC); zval_dtor(free_op2.var); + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) { zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); @@ -22456,6 +22708,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { zval_dtor(free_op2.var); } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -22475,6 +22731,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { zval_dtor(free_op2.var); } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -22502,6 +22762,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { zval_dtor(free_op2.var); } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } else { @@ -22530,6 +22794,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { zval_dtor(free_op2.var); } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) { @@ -23721,6 +23989,10 @@ static int ZEND_FETCH_DIM_W_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC), dim, 0, BP_VAR_W TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -23733,6 +24005,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC), dim, 0, BP_VAR_RW TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -23762,6 +24038,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), type TSRMLS_CC), dim, 0, type TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + if (IS_CV == IS_VAR && type == BP_VAR_W && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -23785,6 +24065,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_UNSET TSRMLS_CC); if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) { zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); @@ -23885,6 +24169,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -23904,6 +24192,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -23931,6 +24223,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } else { @@ -23959,6 +24255,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { if (free_op2.var) {zval_ptr_dtor(&free_op2.var);}; } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) { @@ -24754,6 +25054,10 @@ static int ZEND_FETCH_DIM_W_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC), dim, 0, BP_VAR_W TSRMLS_CC); + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -24766,6 +25070,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC), dim, 0, BP_VAR_RW TSRMLS_CC); + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -24783,6 +25091,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_AR dim = NULL; zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), type TSRMLS_CC), dim, 0, type TSRMLS_CC); + if (IS_CV == IS_VAR && type == BP_VAR_W && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -25602,6 +25914,10 @@ static int ZEND_FETCH_DIM_W_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_W TSRMLS_CC), dim, 0, BP_VAR_W TSRMLS_CC); + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -25614,6 +25930,10 @@ static int ZEND_FETCH_DIM_RW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC), dim, 0, BP_VAR_RW TSRMLS_CC); + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -25643,6 +25963,10 @@ static int ZEND_FETCH_DIM_FUNC_ARG_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) dim = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), type TSRMLS_CC), dim, 0, type TSRMLS_CC); + if (IS_CV == IS_VAR && type == BP_VAR_W && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -25666,6 +25990,10 @@ static int ZEND_FETCH_DIM_UNSET_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } zend_fetch_dimension_address(RETURN_VALUE_UNUSED(&opline->result)?NULL:&EX_T(opline->result.u.var), container, dim, 0, BP_VAR_UNSET TSRMLS_CC); + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } if (EX_T(opline->result.u.var).var.ptr_ptr == NULL) { zend_error_noreturn(E_ERROR, "Cannot unset string offsets"); @@ -25766,6 +26094,10 @@ static int ZEND_FETCH_OBJ_W_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -25785,6 +26117,10 @@ static int ZEND_FETCH_OBJ_RW_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } @@ -25812,6 +26148,10 @@ static int ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } ZEND_VM_NEXT_OPCODE(); } else { @@ -25840,6 +26180,10 @@ static int ZEND_FETCH_OBJ_UNSET_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) } else { } + if (IS_CV == IS_VAR && 0 && + !RETURN_VALUE_UNUSED(&opline->result)) { + AI_USE_PTR(EX_T(opline->result.u.var).var); + } PZVAL_UNLOCK(*EX_T(opline->result.u.var).var.ptr_ptr, &free_res); if (EX_T(opline->result.u.var).var.ptr_ptr != &EG(uninitialized_zval_ptr)) {