Skip to content

Commit b97a080

Browse files
committed
Remove special UNREACHABLE_FREE handling in block pass
This results in an assertion failure when running under -e, because there is an additional EXT_STMT + NOP before the FREE. I don't think there's a strong reason to handle UNREACHABLE_FREE specially here (it's only important that we *do* handle it), so I'm dropping the code rather than adjusting it to scan over certain opcodes.
1 parent 9f26341 commit b97a080

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

Zend/Optimizer/block_pass.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -967,14 +967,6 @@ static void assemble_code_blocks(zend_cfg *cfg, zend_op_array *op_array, zend_op
967967
continue;
968968
}
969969
if (b->flags & (ZEND_BB_REACHABLE|ZEND_BB_UNREACHABLE_FREE)) {
970-
if (b->flags & ZEND_BB_UNREACHABLE_FREE) {
971-
/* Only keep the FREE for the loop var */
972-
ZEND_ASSERT(op_array->opcodes[b->start].opcode == ZEND_FREE
973-
|| op_array->opcodes[b->start].opcode == ZEND_FE_FREE);
974-
len += b->len = 1;
975-
continue;
976-
}
977-
978970
opline = op_array->opcodes + b->start + b->len - 1;
979971
if (opline->opcode == ZEND_JMP) {
980972
zend_basic_block *next = b + 1;

0 commit comments

Comments
 (0)