From: Xinchen Hui Date: Tue, 17 Oct 2017 11:47:29 +0000 (+0800) Subject: Fixed bug (assertion fails with extended info generated) X-Git-Tag: php-7.2.0RC5~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e53a9aaa4aa091a0799ed5a078dc66ed04ff32b8;p=php Fixed bug (assertion fails with extended info generated) --- 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 */