Skip to content

Commit a33361a

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
2 parents 7ba54b9 + 4eeb41d commit a33361a

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ PHP NEWS
2929
. Fixed bug #78179 (MariaDB server version incorrectly detected). (cmb)
3030
. Fixed bug #78213 (Empty row pocket). (cmb)
3131

32+
- Opcache:
33+
. Fixed bug #77191 (Assertion failure in dce_live_ranges() when silencing is
34+
used). (Nikita)
35+
3236
- Standard:
3337
. Fixed bug #69100 (Bus error from stream_copy_to_stream (file -> SSL stream)
3438
with invalid length). (Nikita)

ext/opcache/Optimizer/dce.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,8 @@ static void dce_live_ranges(context *ctx, zend_op_array *op_array, zend_ssa *ssa
491491

492492
if ((op_array->opcodes[def].result_type == IS_UNUSED) &&
493493
(UNEXPECTED(op_array->opcodes[def].opcode == ZEND_EXT_STMT) ||
494-
UNEXPECTED(op_array->opcodes[def].opcode == ZEND_EXT_FCALL_END))) {
494+
UNEXPECTED(op_array->opcodes[def].opcode == ZEND_EXT_FCALL_END) ||
495+
UNEXPECTED(op_array->opcodes[def].opcode == ZEND_END_SILENCE))) {
495496
def--;
496497
}
497498

ext/opcache/tests/bug77191.phpt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
Bug #77191: Assertion failure in dce_live_ranges() when silencing is used
3+
--FILE--
4+
<?php
5+
function test($x) {
6+
switch (@$x['y']) {
7+
case 1: return 'a';
8+
case 2: return 'b';
9+
case 3: return 'c';
10+
case 4: return 'd';
11+
}
12+
return 'e';
13+
}
14+
var_dump(test([]));
15+
?>
16+
--EXPECT--
17+
string(1) "e"

0 commit comments

Comments
 (0)