diff --git a/NEWS b/NEWS index 9506c5960fd..de32d91c479 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,10 @@ PHP NEWS - MBString: . Fix use-after-free of mb_list_encodings() return value. (ilutov) +- Opcache: + . Avoid adding an unnecessary read-lock when loading script from shm if + restart is in progress. (mikhainin) + - Streams: . Fixed bug GH-11735 (Use-after-free when unregistering user stream wrapper from itself). (ilutov) diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index 864bc4aff20..fdb6d59e809 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -1868,6 +1868,7 @@ zend_persistent_script *zend_file_cache_script_load(zend_file_handle *file_handl if (!file_cache_only && !ZCSG(restart_in_progress) && + !ZCSG(restart_pending) && !ZSMMG(memory_exhausted) && accelerator_shm_read_lock() == SUCCESS) { /* exclusive lock */