From: Nikita Popov Date: Tue, 11 Aug 2020 12:59:04 +0000 (+0200) Subject: Merge branch 'PHP-7.4' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75baa729f53914afad456296fdbfb52d99dbfd6b;p=php Merge branch 'PHP-7.4' * PHP-7.4: Fixed bug #79917 --- 75baa729f53914afad456296fdbfb52d99dbfd6b diff --cc ext/opcache/zend_file_cache.c index 44ade7f6bd,41b3325795..581ef6a392 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@@ -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); - } - } - } } }