Skip to content

Commit e53a9aa

Browse files
committed
Fixed bug (assertion fails with extended info generated)
1 parent 0292456 commit e53a9aa

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ PHP NEWS
3434
. Fixed valgrind issue. (Tianfang Yang)
3535

3636
- Opcache:
37+
. Fixed bug (assertion fails with extended info generated). (Laruence)
3738
. Fixed bug (Phi sources removel). (Laruence)
3839
. Fixed bug #75370 (Webserver hangs on valid PHP text). (Laruence)
3940
. Fixed bug #75357 (segfault loading WordPress wp-admin). (Laruence)

ext/opcache/Optimizer/dce.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,12 @@ static void dce_live_ranges(context *ctx, zend_op_array *op_array, zend_ssa *ssa
564564
uint32_t var = live_range->var & ~ZEND_LIVE_MASK;
565565
uint32_t def = live_range->start - 1;
566566

567+
if ((op_array->opcodes[def].result_type == IS_UNUSED) &&
568+
(UNEXPECTED(op_array->opcodes[def].opcode == ZEND_EXT_STMT) ||
569+
UNEXPECTED(op_array->opcodes[def].opcode == ZEND_EXT_FCALL_END))) {
570+
def--;
571+
}
572+
567573
if (op_array->opcodes[def].result_type == IS_UNUSED) {
568574
if (op_array->opcodes[def].opcode == ZEND_DO_FCALL) {
569575
/* constructor call */

0 commit comments

Comments
 (0)