Skip to content

Commit d12d987

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: JIT: Fixed FETCH_LIST_R on string
2 parents 6bf1d24 + 7cea20f commit d12d987

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

ext/opcache/jit/zend_jit_arm64.dasc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11180,7 +11180,7 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
1118011180
}
1118111181

1118211182
if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))
11183-
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_STRING)))) {
11183+
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))) {
1118411184
if (opline->opcode != ZEND_FETCH_DIM_IS && opline->opcode != ZEND_FETCH_LIST_R) {
1118511185
may_throw = 1;
1118611186
if ((op1_info & MAY_BE_UNDEF) || (op2_info & MAY_BE_UNDEF)) {

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11851,7 +11851,7 @@ static int zend_jit_fetch_dim_read(dasm_State **Dst,
1185111851
}
1185211852

1185311853
if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))
11854-
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_STRING)))) {
11854+
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))) {
1185511855
if (opline->opcode != ZEND_FETCH_DIM_IS && opline->opcode != ZEND_FETCH_LIST_R) {
1185611856
may_throw = 1;
1185711857
if ((op1_info & MAY_BE_UNDEF) || (op2_info & MAY_BE_UNDEF)) {
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--TEST--
2+
JIT FETCH_LIST_R: 001
3+
--INI--
4+
opcache.enable=1
5+
opcache.enable_cli=1
6+
opcache.file_update_protection=0
7+
opcache.jit_buffer_size=1M
8+
--FILE--
9+
<?php
10+
function test() {
11+
$v = 'a';
12+
list($$v) = "";
13+
var_dump($a);
14+
}
15+
test();
16+
?>
17+
--EXPECT--
18+
NULL

0 commit comments

Comments
 (0)