]> granicus.if.org Git - php/commitdiff
Fixed bug #79743 (Fatal error when assigning to array property with JIT enabled)
authorXinchen Hui <laruence@gmail.com>
Mon, 29 Jun 2020 09:47:21 +0000 (17:47 +0800)
committerXinchen Hui <laruence@gmail.com>
Mon, 29 Jun 2020 09:47:21 +0000 (17:47 +0800)
simple typo

NEWS
ext/opcache/jit/zend_jit_helpers.c

diff --git a/NEWS b/NEWS
index be5aae762aec8a4d0e2d1f64ab43d8952e1bafc0..edaf30af76b78b0dd0a7bdf3ea70c043dd9f3332 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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)
index 17e5127240dd074d24a5d8cb1bb27485f43ed389..3d40e745d17a566a1e82aee1f854e44e779f0086 100644 (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",