diff --git a/NEWS b/NEWS index 989e53f2850..87a478e4b4e 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,8 @@ PHP NEWS - Opcache: . Fixed bug GH-11715 (opcache.interned_strings_buffer either has no effect or opcache_get_status() / phpinfo() is wrong). (nielsdos) + . Avoid adding an unnecessary read-lock when loading script from shm if + restart is in progress. (mikhainin) - Standard: . Prevent int overflow on $decimals in number_format. (Marc Bennewitz) diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index 22ccc4d8430..bcee38079b3 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -1786,6 +1786,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 */