File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1282,7 +1282,15 @@ static void zend_file_cache_unserialize_op_array(zend_op_array *op_arr
1282
1282
ZEND_MAP_PTR_NEW (op_array -> run_time_cache );
1283
1283
} else {
1284
1284
ZEND_MAP_PTR_INIT (op_array -> static_variables_ptr , & op_array -> static_variables );
1285
- UNSERIALIZE_PTR (ZEND_MAP_PTR (op_array -> run_time_cache ));
1285
+ if (ZEND_MAP_PTR (op_array -> run_time_cache )) {
1286
+ if (script -> corrupted ) {
1287
+ /* Not in SHM: Use serialized arena pointer. */
1288
+ UNSERIALIZE_PTR (ZEND_MAP_PTR (op_array -> run_time_cache ));
1289
+ } else {
1290
+ /* In SHM: Allocate new pointer. */
1291
+ ZEND_MAP_PTR_NEW (op_array -> run_time_cache );
1292
+ }
1293
+ }
1286
1294
}
1287
1295
}
1288
1296
}
Original file line number Diff line number Diff line change @@ -1138,7 +1138,9 @@ zend_persistent_script *zend_accel_script_persist(zend_persistent_script *script
1138
1138
} ZEND_HASH_FOREACH_END ();
1139
1139
zend_persist_op_array_ex (& script -> script .main_op_array , script );
1140
1140
1141
- ZCSG (map_ptr_last ) = CG (map_ptr_last );
1141
+ if (for_shm ) {
1142
+ ZCSG (map_ptr_last ) = CG (map_ptr_last );
1143
+ }
1142
1144
1143
1145
#ifdef HAVE_JIT
1144
1146
if (ZCG (jit_enabled ) && for_shm ) {
You can’t perform that action at this time.
0 commit comments