Skip to content

Commit d136799

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: JIT: Fix incorrect flag check
2 parents 3b6d385 + 522406c commit d136799

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6135,7 +6135,7 @@ static int zend_jit_simple_assign(dasm_State **Dst,
61356135
if (tmp_reg == ZREG_R0) {
61366136
| IF_NOT_REFCOUNTED ah, >3
61376137
} else {
6138-
| IF_NOT_FLAGS Rd(tmp_reg), IS_TYPE_REFCOUNTED, >3
6138+
| IF_NOT_FLAGS Rd(tmp_reg), (IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT), >3
61396139
}
61406140
| GET_ZVAL_PTR Ra(tmp_reg), var_addr
61416141

@@ -6150,7 +6150,7 @@ static int zend_jit_simple_assign(dasm_State **Dst,
61506150
if (tmp_reg == ZREG_R0) {
61516151
| IF_NOT_REFCOUNTED ah, >2
61526152
} else {
6153-
| IF_NOT_FLAGS Rd(tmp_reg), IS_TYPE_REFCOUNTED, >2
6153+
| IF_NOT_FLAGS Rd(tmp_reg), (IS_TYPE_REFCOUNTED << Z_TYPE_FLAGS_SHIFT), >2
61546154
}
61556155
| GET_ZVAL_PTR Ra(tmp_reg), var_addr
61566156
| GC_ADDREF Ra(tmp_reg)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
--TEST--
2+
JIT ASSIGN_DIM: 009
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+
$y[] = $r = &$G;
11+
?>
12+
DONE
13+
--EXPECT--
14+
DONE

0 commit comments

Comments
 (0)