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

Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  Fixed GH-12428: Assertion with function/tracing JIT
This commit is contained in:
Dmitry Stogov
2023-10-16 15:12:38 +03:00
2 changed files with 23 additions and 1 deletions

View File

@@ -1931,7 +1931,7 @@ static void ZEND_FASTCALL zend_jit_fetch_obj_is_dynamic(zend_object *zobj, intpt
if (EXPECTED(retval)) {
intptr_t idx = (char*)retval - (char*)zobj->properties->arData;
CACHE_PTR_EX(cache_slot + 1, (void*)ZEND_ENCODE_DYN_PROP_OFFSET(idx));
ZVAL_COPY(result, retval);
ZVAL_COPY_DEREF(result, retval);
return;
}
}

View File

@@ -0,0 +1,22 @@
--TEST--
GH-12428: Assertion with function/tracing JIT
--INI--
opcache.enable=1
opcache.enable_cli=1
--FILE--
<?php
function validate($value)
{
foreach ([0] as $_) {
$a = &$value->a;
$value->a ?? null;
}
}
validate((object) []);
validate((object) []);
validate((object) ['b' => 0]);
?>
DONE
--EXPECT--
DONE