]> granicus.if.org Git - php/commitdiff
Fixed bug (assertion fails with extended info generated)
authorXinchen Hui <laruence@gmail.com>
Tue, 17 Oct 2017 11:47:29 +0000 (19:47 +0800)
committerXinchen Hui <laruence@gmail.com>
Tue, 17 Oct 2017 11:47:29 +0000 (19:47 +0800)
NEWS
ext/opcache/Optimizer/dce.c

diff --git a/NEWS b/NEWS
index 1bde75330d2afa3e4091d092590506fbc36e6d93..cc519184bded68e2af1dc491e33f06ca04c29832 100644 (file)
--- 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)
index e2a70f9c6f57f45bc5a3d6c0647b36bab7b83acf..de36537913c864a2e50d0eb8c92f553909bec9a1 100644 (file)
@@ -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 */