From 4eeb41d1ea91fe7a44759f788ad5920eac8df0ef Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 13 Aug 2019 11:19:58 +0200 Subject: Fixed bug #77191 --- NEWS | 4 ++++ ext/opcache/Optimizer/dce.c | 3 ++- ext/opcache/tests/bug77191.phpt | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 ext/opcache/tests/bug77191.phpt diff --git a/NEWS b/NEWS index f245fa8b16..a8f1b6c771 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,10 @@ PHP NEWS - MySQLnd: . Fixed bug #78179 (MariaDB server version incorrectly detected). (cmb) +- Opcache: + . Fixed bug #77191 (Assertion failure in dce_live_ranges() when silencing is + used). (Nikita) + - Standard: . Fixed bug #69100 (Bus error from stream_copy_to_stream (file -> SSL stream) with invalid length). (Nikita) diff --git a/ext/opcache/Optimizer/dce.c b/ext/opcache/Optimizer/dce.c index c146599a35..16143af1ea 100644 --- a/ext/opcache/Optimizer/dce.c +++ b/ext/opcache/Optimizer/dce.c @@ -565,7 +565,8 @@ static void dce_live_ranges(context *ctx, zend_op_array *op_array, zend_ssa *ssa 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))) { + UNEXPECTED(op_array->opcodes[def].opcode == ZEND_EXT_FCALL_END) || + UNEXPECTED(op_array->opcodes[def].opcode == ZEND_END_SILENCE))) { def--; } diff --git a/ext/opcache/tests/bug77191.phpt b/ext/opcache/tests/bug77191.phpt new file mode 100644 index 0000000000..ca04b4aadd --- /dev/null +++ b/ext/opcache/tests/bug77191.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #77191: Assertion failure in dce_live_ranges() when silencing is used +--FILE-- + +--EXPECT-- +string(1) "e" -- cgit v1.2.1