com php-src: Fixed bug (assertion fails with extended info generated): NEWS ext/opcache/Optimizer/dce.c
| From: | Xinchen Hui | Date: | Tue, 17 Oct 2017 11:47:29 +0000 |
| Subject: | com php-src: Fixed bug (assertion fails with extended info generated): NEWS ext/opcache/Optimizer/dce.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99778@lists.php.net to get a copy of this message | ||
Commit: e53a9aaa4aa091a0799ed5a078dc66ed04ff32b8
Author: Xinchen Hui <laruence@gmail.com> Tue, 17 Oct 2017 19:47:29 +0800
Parents: 02924562622f62208257a2f4ea76d3f4be82c82a
Branches: PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e53a9aaa4aa091a0799ed5a078dc66ed04ff32b8
Log:
Fixed bug (assertion fails with extended info generated)
Changed paths:
M NEWS
M ext/opcache/Optimizer/dce.c
Diff:
diff --git a/NEWS b/NEWS
index 1bde753...cc51918 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 e2a70f9..de36537 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 */