Skip to content

Commit

Permalink
Merge branch 'PHP-8.3'
Browse files Browse the repository at this point in the history
* PHP-8.3:
  Fix assertion
  • Loading branch information
dstogov committed Dec 25, 2023
2 parents 3f82da0 + fd58f61 commit 6aa8687
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Zend/zend_opcode.c
Original file line number Diff line number Diff line change
Expand Up @@ -878,12 +878,12 @@ static bool keeps_op1_alive(zend_op *opline) {
|| opline->opcode == ZEND_SWITCH_STRING
|| opline->opcode == ZEND_MATCH
|| opline->opcode == ZEND_FETCH_LIST_R
|| opline->opcode == ZEND_FETCH_LIST_W
|| opline->opcode == ZEND_COPY_TMP) {
return 1;
}
ZEND_ASSERT(opline->opcode != ZEND_FE_FETCH_R
&& opline->opcode != ZEND_FE_FETCH_RW
&& opline->opcode != ZEND_FETCH_LIST_W
&& opline->opcode != ZEND_VERIFY_RETURN_TYPE
&& opline->opcode != ZEND_BIND_LEXICAL
&& opline->opcode != ZEND_ROPE_ADD);
Expand Down
12 changes: 12 additions & 0 deletions ext/opcache/tests/opt/dce_014.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--TEST--
DCE may remove FREE after FETCH_LIST_W
--FILE--
<?php
function () {
$a = $r[][] = $r = [] & $y;
+list(&$y) = $a;
}
?>
DONE
--EXPECT--
DONE

0 comments on commit 6aa8687

Please sign in to comment.