From e53a9aaa4aa091a0799ed5a078dc66ed04ff32b8 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Tue, 17 Oct 2017 19:47:29 +0800 Subject: [PATCH] Fixed bug (assertion fails with extended info generated) --- NEWS | 1 + ext/opcache/Optimizer/dce.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 1bde75330d..cc519184bd 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,7 @@ PHP NEWS . Fixed valgrind issue. (Tianfang Yang) - Opcache: + . Fixed bug (assertion fails with extended info generated). (Laruence) . Fixed bug (Phi sources removel). (Laruence) . Fixed bug #75370 (Webserver hangs on valid PHP text). (Laruence) . Fixed bug #75357 (segfault loading WordPress wp-admin). (Laruence) diff --git a/ext/opcache/Optimizer/dce.c b/ext/opcache/Optimizer/dce.c index e2a70f9c6f..de36537913 100644 --- a/ext/opcache/Optimizer/dce.c +++ b/ext/opcache/Optimizer/dce.c @@ -564,6 +564,12 @@ static void dce_live_ranges(context *ctx, zend_op_array *op_array, zend_ssa *ssa uint32_t var = live_range->var & ~ZEND_LIVE_MASK; uint32_t def = live_range->start - 1; + if ((op_array->opcodes[def].result_type == IS_UNUSED) && + (UNEXPECTED(op_array->opcodes[def].opcode == ZEND_EXT_STMT) || + UNEXPECTED(op_array->opcodes[def].opcode == ZEND_EXT_FCALL_END))) { + def--; + } + if (op_array->opcodes[def].result_type == IS_UNUSED) { if (op_array->opcodes[def].opcode == ZEND_DO_FCALL) { /* constructor call */ -- 2.50.1