Skip to content

Commit d1535da

Browse files
committed
Merge branch 'PHP-7.1'
2 parents a499cfc + 766264f commit d1535da

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ext/opcache/Optimizer/block_pass.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array
736736
literal_dtor(&ZEND_OP1_LITERAL(opline));
737737
} else {
738738
/* BOOL */
739-
result = ZEND_OP1_LITERAL(opline);
739+
ZVAL_COPY_VALUE(&result, &ZEND_OP1_LITERAL(opline));
740740
convert_to_boolean(&result);
741741
ZVAL_NULL(&ZEND_OP1_LITERAL(opline));
742742
}
@@ -1657,11 +1657,12 @@ static void zend_t_usage(zend_cfg *cfg, zend_op_array *op_array, zend_bitset use
16571657
case ZEND_QM_ASSIGN:
16581658
case ZEND_BOOL:
16591659
case ZEND_BOOL_NOT:
1660-
if (ZEND_OP1_TYPE(opline) == IS_CONST) {
1661-
literal_dtor(&ZEND_OP1_LITERAL(opline));
1662-
} else if (ZEND_OP1_TYPE(opline) == IS_TMP_VAR) {
1660+
if (ZEND_OP1_TYPE(opline) == IS_TMP_VAR) {
16631661
opline->opcode = ZEND_FREE;
16641662
} else {
1663+
if (ZEND_OP1_TYPE(opline) == IS_CONST) {
1664+
literal_dtor(&ZEND_OP1_LITERAL(opline));
1665+
}
16651666
MAKE_NOP(opline);
16661667
}
16671668
break;

0 commit comments

Comments
 (0)