]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4'
authorNikita Popov <nikita.ppv@gmail.com>
Tue, 11 Aug 2020 12:59:04 +0000 (14:59 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Tue, 11 Aug 2020 12:59:04 +0000 (14:59 +0200)
* PHP-7.4:
  Fixed bug #79917

1  2 
ext/opcache/zend_file_cache.c

index 44ade7f6bd41b42b38b074ec951ad0948bb2fb9b,41b332579587bb6a093bc80d2be4ad92df3bd0c3..581ef6a3921bb900eefb87d2e65ad68541a6780a
@@@ -599,16 -563,8 +612,9 @@@ static void zend_file_cache_serialize_o
                SERIALIZE_PTR(op_array->live_range);
                SERIALIZE_PTR(op_array->scope);
                SERIALIZE_STR(op_array->doc_comment);
 +              SERIALIZE_ATTRIBUTES(op_array->attributes);
                SERIALIZE_PTR(op_array->try_catch_array);
                SERIALIZE_PTR(op_array->prototype);
-               ZEND_MAP_PTR_INIT(op_array->static_variables_ptr, &op_array->static_variables);
-               if (op_array->fn_flags & ZEND_ACC_IMMUTABLE) {
-                       ZEND_MAP_PTR_INIT(op_array->run_time_cache, NULL);
-               } else {
-                       SERIALIZE_PTR(ZEND_MAP_PTR(op_array->run_time_cache));
-               }
        }
  }
  
@@@ -1350,29 -1274,8 +1382,9 @@@ static void zend_file_cache_unserialize
                UNSERIALIZE_PTR(op_array->live_range);
                UNSERIALIZE_PTR(op_array->scope);
                UNSERIALIZE_STR(op_array->doc_comment);
 +              UNSERIALIZE_ATTRIBUTES(op_array->attributes);
                UNSERIALIZE_PTR(op_array->try_catch_array);
                UNSERIALIZE_PTR(op_array->prototype);
-               if (op_array->fn_flags & ZEND_ACC_IMMUTABLE) {
-                       if (op_array->static_variables) {
-                               ZEND_MAP_PTR_NEW(op_array->static_variables_ptr);
-                       } else {
-                               ZEND_MAP_PTR_INIT(op_array->static_variables_ptr, &op_array->static_variables);
-                       }
-                       ZEND_MAP_PTR_NEW(op_array->run_time_cache);
-               } else {
-                       ZEND_MAP_PTR_INIT(op_array->static_variables_ptr, &op_array->static_variables);
-                       if (ZEND_MAP_PTR(op_array->run_time_cache)) {
-                               if (script->corrupted) {
-                                       /* Not in SHM: Use serialized arena pointer. */
-                                       UNSERIALIZE_PTR(ZEND_MAP_PTR(op_array->run_time_cache));
-                               } else {
-                                       /* In SHM: Allocate new pointer. */
-                                       ZEND_MAP_PTR_NEW(op_array->run_time_cache);
-                               }
-                       }
-               }
        }
  }