- LiteSpeed:
. Updated to LiteSpeed SAPI V7.5 (Fixed clean shutdown). (George Wang)
+- Opcode:
+ . Fixed bug #78341 (Failure to detect smart branch in DFA pass). (Nikita)
+
- Standard:
. Fixed bug #69100 (Bus error from stream_copy_to_stream (file -> SSL stream)
with invalid length). (Nikita)
for (b = blocks; b < blocks_end; b++) {
if (b->flags & (ZEND_BB_REACHABLE|ZEND_BB_UNREACHABLE_FREE)) {
- uint32_t end;
-
if (b->len) {
+ uint32_t new_start, old_end;
while (i < b->start) {
shiftlist[i] = i - target;
i++;
b->len = 1;
}
- end = b->start + b->len;
- b->start = target;
- while (i < end) {
+ new_start = target;
+ old_end = b->start + b->len;
+ while (i < old_end) {
shiftlist[i] = i - target;
if (EXPECTED(op_array->opcodes[i].opcode != ZEND_NOP) ||
is_smart_branch_inhibiting_nop(op_array, target, i, b, blocks_end)) {
}
i++;
}
- if (target != end) {
+ b->start = new_start;
+ if (target != old_end) {
zend_op *opline;
zend_op *new_opline;
b->len = target - b->start;
- opline = op_array->opcodes + end - 1;
+ opline = op_array->opcodes + old_end - 1;
if (opline->opcode == ZEND_NOP) {
continue;
}
--- /dev/null
+--TEST--
+Bug #78341: Failure to detect smart branch in DFA pass
+--FILE--
+<?php
+
+function test($a) {
+ // Just some dead code...
+ if (strpos("foo", "foo") !== 0) {
+ echo "Foo";
+ }
+
+ $x = $a === null;
+ if ($x) {
+ var_dump($x);
+ }
+}
+test(null);
+
+?>
+--EXPECT--
+bool(true)