mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
Update ZCSG(map_ptr_last) only if for_shm
Otherwise we may get a memory protection fault here. Updating of ZCSG(map_ptr_last) is handled when loading from file cache to SHM.
This commit is contained in:
@@ -1089,7 +1089,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);
|
||||
}
|
||||
|
||||
script->corrupted = 0;
|
||||
ZCG(current_persistent_script) = NULL;
|
||||
|
||||
Reference in New Issue
Block a user