1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.3'

* PHP-8.3:
  Fixed GH-12509: JIT assertion when running php-parser tests
This commit is contained in:
Dmitry Stogov
2023-10-26 23:59:20 +03:00
2 changed files with 34 additions and 0 deletions

View File

@@ -1731,6 +1731,12 @@ static uint32_t get_ssa_alias_types(zend_ssa_alias_kind alias) {
} \
if (__var >= 0) { \
zend_ssa_var *__ssa_var = &ssa_vars[__var]; \
if (__ssa_var->var < op_array->num_args) { \
if (__type & MAY_BE_RC1) { \
/* TODO: may be captured by exception backtreace */ \
__type |= MAY_BE_RCN; \
} \
} \
if (__ssa_var->var < op_array->last_var) { \
if (__type & (MAY_BE_REF|MAY_BE_RCN)) { \
__type |= MAY_BE_RC1 | MAY_BE_RCN; \

View File

@@ -0,0 +1,28 @@
--TEST--
GH-12509: JIT assertion when running php-parser tests
--INI--
opcache.enable=1
opcache.enable_cli=1
--FILE--
<?php
function capture() {
$GLOBALS["x"] = new Exception();
}
function test($a) {
$a[1] = 1;
$a[2] = 2;
capture();
$a[3] = 3;
return $a;
}
var_dump(test([]));
?>
--EXPECT--
array(3) {
[1]=>
int(1)
[2]=>
int(2)
[3]=>
int(3)
}