1
0
mirror of https://github.com/php/php-src.git synced 2026-04-12 18:43:37 +02:00

Fixed bug #79743 (Fatal error when assigning to array property with JIT enabled)

simple typo
This commit is contained in:
Xinchen Hui
2020-06-29 17:47:21 +08:00
parent 053ef28b8d
commit d005a8e92b
2 changed files with 6 additions and 4 deletions

2
NEWS
View File

@@ -72,6 +72,8 @@ PHP NEWS
. Removed deprecated INTL_IDNA_VARIANT_2003. (cmb)
- JIT:
. Fixed bug #79743 (Fatal error when assigning to array property
with JIT enabled). (Laruence)
. Fixed bug #79582 (Crash seen when opcache.jit=1235 and
opcache.jit_debug=2). (Laruence)
. Fixed bug #77857 (Wrong result if executed with JIT). (Laruence)

View File

@@ -1536,10 +1536,10 @@ static void ZEND_FASTCALL zend_jit_check_array_promotion(zval *val, zend_propert
const zend_op *opline = execute_data->opline;
zval *result = EX_VAR(opline->result.var);
if (((Z_TYPE_P(val) <= IS_FALSE
|| (Z_ISREF_P(val) && Z_TYPE_P(Z_REFVAL_P(val)) <= IS_FALSE))
&& ZEND_TYPE_IS_SET(prop->type)
&& ZEND_TYPE_FULL_MASK(prop->type) & (MAY_BE_ITERABLE|MAY_BE_ARRAY)) == 0) {
if ((Z_TYPE_P(val) <= IS_FALSE
|| (Z_ISREF_P(val) && Z_TYPE_P(Z_REFVAL_P(val)) <= IS_FALSE))
&& ZEND_TYPE_IS_SET(prop->type)
&& (ZEND_TYPE_FULL_MASK(prop->type) & (MAY_BE_ITERABLE|MAY_BE_ARRAY)) == 0) {
zend_string *type_str = zend_type_to_string(prop->type);
zend_type_error(
"Cannot auto-initialize an array inside property %s::$%s of type %s",