mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix GH-10635: ARM64 function JIT causes impossible assertion (#10638)
This commit is contained in:
@@ -7722,7 +7722,6 @@ static int zend_jit_identical(dasm_State **Dst,
|
||||
}
|
||||
op1_addr = real_addr;
|
||||
}
|
||||
| LOAD_ZVAL_ADDR FCARG1x, op1_addr
|
||||
}
|
||||
if (opline->op2_type != IS_CONST) {
|
||||
if (Z_MODE(op2_addr) == IS_REG) {
|
||||
@@ -7734,6 +7733,9 @@ static int zend_jit_identical(dasm_State **Dst,
|
||||
}
|
||||
| LOAD_ZVAL_ADDR FCARG2x, op2_addr
|
||||
}
|
||||
if (opline->op1_type != IS_CONST) {
|
||||
| LOAD_ZVAL_ADDR FCARG1x, op1_addr
|
||||
}
|
||||
}
|
||||
|
||||
if ((op1_info & op2_info & MAY_BE_ANY) == 0) {
|
||||
|
||||
@@ -8309,7 +8309,6 @@ static int zend_jit_identical(dasm_State **Dst,
|
||||
}
|
||||
op1_addr = real_addr;
|
||||
}
|
||||
| LOAD_ZVAL_ADDR FCARG1a, op1_addr
|
||||
}
|
||||
if (opline->op2_type != IS_CONST) {
|
||||
if (Z_MODE(op2_addr) == IS_REG) {
|
||||
@@ -8321,6 +8320,9 @@ static int zend_jit_identical(dasm_State **Dst,
|
||||
}
|
||||
| LOAD_ZVAL_ADDR FCARG2a, op2_addr
|
||||
}
|
||||
if (opline->op1_type != IS_CONST) {
|
||||
| LOAD_ZVAL_ADDR FCARG1a, op1_addr
|
||||
}
|
||||
}
|
||||
|
||||
if ((op1_info & op2_info & MAY_BE_ANY) == 0) {
|
||||
|
||||
19
ext/opcache/tests/jit/identical_003.phpt
Normal file
19
ext/opcache/tests/jit/identical_003.phpt
Normal file
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
JIT IDENTICAL: 003 register allocation
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.file_update_protection=0
|
||||
opcache.jit_buffer_size=1M
|
||||
opcache.protect_memory=1
|
||||
--EXTENSIONS--
|
||||
opcache
|
||||
--FILE--
|
||||
<?php
|
||||
function foo(array $a, int|float $n) {
|
||||
var_dump(count($a) === $n);
|
||||
}
|
||||
foo([1], 1);
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
Reference in New Issue
Block a user