From 0d62dfdf81fb7710c20a46a75ad6166e25e50a12 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sun, 22 May 2016 00:05:06 +0200 Subject: Improve previous fix Do not mark loop var free blocks as reachable after all -- as we can't construct SSA for unreachable blocks, this would cause issues down the line. Instead add an extra UNREACHABLE_FREE flag and retain only the FREE instruction during NOP removal. (If we retain all instructions in the BB we might leave a jump instruction that goes into the nowhere.) --- ext/opcache/Optimizer/zend_dump.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ext/opcache/Optimizer/zend_dump.c') diff --git a/ext/opcache/Optimizer/zend_dump.c b/ext/opcache/Optimizer/zend_dump.c index 986e470345..70abe4d317 100644 --- a/ext/opcache/Optimizer/zend_dump.c +++ b/ext/opcache/Optimizer/zend_dump.c @@ -399,9 +399,8 @@ static void zend_dump_op(const zend_op_array *op_array, const zend_basic_block * if (!ssa || !ssa->ops || ssa->ops[opline - op_array->opcodes].result_use < 0) { if (opline->result_type & (IS_CV|IS_VAR|IS_TMP_VAR)) { - if (ssa && ssa->ops) { + if (ssa && ssa->ops && ssa->ops[opline - op_array->opcodes].result_def >= 0) { int ssa_var_num = ssa->ops[opline - op_array->opcodes].result_def; - ZEND_ASSERT(ssa_var_num >= 0); zend_dump_ssa_var(op_array, ssa, ssa_var_num, opline->result_type, EX_VAR_TO_NUM(opline->result.var), dump_flags); } else { zend_dump_var(op_array, opline->result_type, EX_VAR_TO_NUM(opline->result.var)); -- cgit v1.2.1