mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-7.4'
* PHP-7.4: Fix file cache run_time_cache unserialization Update ZCSG(map_ptr_last) only if for_shm
This commit is contained in:
commit
3bc4159a19
2 changed files with 12 additions and 2 deletions
|
@ -1282,7 +1282,15 @@ static void zend_file_cache_unserialize_op_array(zend_op_array *op_arr
|
|||
ZEND_MAP_PTR_NEW(op_array->run_time_cache);
|
||||
} else {
|
||||
ZEND_MAP_PTR_INIT(op_array->static_variables_ptr, &op_array->static_variables);
|
||||
UNSERIALIZE_PTR(ZEND_MAP_PTR(op_array->run_time_cache));
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1138,7 +1138,9 @@ zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script
|
|||
} ZEND_HASH_FOREACH_END();
|
||||
zend_persist_op_array_ex(&script->script.main_op_array, script);
|
||||
|
||||
ZCSG(map_ptr_last) = CG(map_ptr_last);
|
||||
if (for_shm) {
|
||||
ZCSG(map_ptr_last) = CG(map_ptr_last);
|
||||
}
|
||||
|
||||
#ifdef HAVE_JIT
|
||||
if (ZCG(jit_enabled) && for_shm) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue