Skip to content

Commit 8f5480e

Browse files
committed
Release lock and protect SHM before replaying warnings
1 parent bfe9531 commit 8f5480e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2195,6 +2195,9 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
21952195
zend_hash_index_del(EG(zend_constants), new_const_num);
21962196
}
21972197
}
2198+
persistent_script->dynamic_members.last_used = ZCG(request_time);
2199+
SHM_PROTECT();
2200+
HANDLE_UNBLOCK_INTERRUPTIONS();
21982201
} else {
21992202

22002203
#if !ZEND_WIN32
@@ -2231,16 +2234,16 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
22312234
}
22322235
}
22332236
}
2237+
2238+
persistent_script->dynamic_members.last_used = ZCG(request_time);
2239+
SHM_PROTECT();
2240+
HANDLE_UNBLOCK_INTERRUPTIONS();
2241+
22342242
replay_warnings(persistent_script);
22352243
zend_file_handle_dtor(file_handle);
22362244
from_shared_memory = 1;
22372245
}
22382246

2239-
persistent_script->dynamic_members.last_used = ZCG(request_time);
2240-
2241-
SHM_PROTECT();
2242-
HANDLE_UNBLOCK_INTERRUPTIONS();
2243-
22442247
/* Fetch jit auto globals used in the script before execution */
22452248
if (persistent_script->ping_auto_globals_mask) {
22462249
zend_accel_set_auto_globals(persistent_script->ping_auto_globals_mask);

0 commit comments

Comments
 (0)