Skip to content

Commit 7cea20f

Browse files
committed
JIT: Fixed FETCH_LIST_R on string
1 parent b47a48f commit 7cea20f

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

ext/opcache/jit/zend_jit_x86.dasc

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

1202612026
if ((op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))
12027-
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|MAY_BE_STRING)))) {
12027+
&& (!exit_addr || !(op1_info & (MAY_BE_ARRAY|MAY_BE_OBJECT|may_be_string)))) {
1202812028
if (opline->opcode != ZEND_FETCH_DIM_IS && opline->opcode != ZEND_FETCH_LIST_R) {
1202912029
if ((op1_info & MAY_BE_UNDEF) || (op2_info & MAY_BE_UNDEF)) {
1203012030
| LOAD_ZVAL_ADDR FCARG1a, orig_op1_addr
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)