@@ -2118,7 +2118,6 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
2118
2118
return NULL ;
2119
2119
}
2120
2120
2121
- HANDLE_BLOCK_INTERRUPTIONS ();
2122
2121
SHM_UNPROTECT ();
2123
2122
2124
2123
/* If script is found then validate_timestamps if option is enabled */
@@ -2167,7 +2166,9 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
2167
2166
2168
2167
/* Check the second level cache */
2169
2168
if (!persistent_script && ZCG (accel_directives ).file_cache ) {
2169
+ HANDLE_BLOCK_INTERRUPTIONS ();
2170
2170
persistent_script = zend_file_cache_script_load (file_handle );
2171
+ HANDLE_UNBLOCK_INTERRUPTIONS ();
2171
2172
}
2172
2173
2173
2174
/* If script was not found or invalidated by validate_timestamps */
@@ -2181,33 +2182,31 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
2181
2182
/* No memory left. Behave like without the Accelerator */
2182
2183
if (ZSMMG (memory_exhausted ) || ZCSG (restart_pending )) {
2183
2184
SHM_PROTECT ();
2184
- HANDLE_UNBLOCK_INTERRUPTIONS ();
2185
2185
if (ZCG (accel_directives ).file_cache ) {
2186
2186
return file_cache_compile_file (file_handle , type );
2187
2187
}
2188
2188
return accelerator_orig_compile_file (file_handle , type );
2189
2189
}
2190
2190
2191
2191
SHM_PROTECT ();
2192
- HANDLE_UNBLOCK_INTERRUPTIONS ();
2193
2192
persistent_script = opcache_compile_file (file_handle , type , key , & op_array );
2194
- HANDLE_BLOCK_INTERRUPTIONS ();
2195
2193
SHM_UNPROTECT ();
2196
2194
2197
2195
/* Try and cache the script and assume that it is returned from_shared_memory.
2198
2196
* If it isn't compile_and_cache_file() changes the flag to 0
2199
2197
*/
2200
2198
from_shared_memory = 0 ;
2201
2199
if (persistent_script ) {
2200
+ HANDLE_BLOCK_INTERRUPTIONS ();
2202
2201
persistent_script = cache_script_in_shared_memory (persistent_script , key , key ? key_length : 0 , & from_shared_memory );
2202
+ HANDLE_UNBLOCK_INTERRUPTIONS ();
2203
2203
}
2204
2204
2205
2205
/* Caching is disabled, returning op_array;
2206
2206
* or something went wrong during compilation, returning NULL
2207
2207
*/
2208
2208
if (!persistent_script ) {
2209
2209
SHM_PROTECT ();
2210
- HANDLE_UNBLOCK_INTERRUPTIONS ();
2211
2210
return op_array ;
2212
2211
}
2213
2212
if (from_shared_memory ) {
@@ -2262,10 +2261,9 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
2262
2261
persistent_script -> dynamic_members .last_used = ZCG (request_time );
2263
2262
2264
2263
SHM_PROTECT ();
2265
- HANDLE_UNBLOCK_INTERRUPTIONS ();
2266
2264
2267
- /* Fetch jit auto globals used in the script before execution */
2268
- if (persistent_script -> ping_auto_globals_mask ) {
2265
+ /* Fetch jit auto globals used in the script before execution */
2266
+ if (persistent_script -> ping_auto_globals_mask ) {
2269
2267
zend_accel_set_auto_globals (persistent_script -> ping_auto_globals_mask );
2270
2268
}
2271
2269
0 commit comments