Skip to content

Commit f232830

Browse files
committed
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Check if restart is pending before trying to lock SHM
2 parents 91dc3e1 + 3e9792f commit f232830

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ PHP NEWS
2525
- Opcache:
2626
. Fixed bug GH-11715 (opcache.interned_strings_buffer either has no effect or
2727
opcache_get_status() / phpinfo() is wrong). (nielsdos)
28+
. Avoid adding an unnecessary read-lock when loading script from shm if
29+
restart is in progress. (mikhainin)
2830

2931
- Standard:
3032
. Prevent int overflow on $decimals in number_format. (Marc Bennewitz)

ext/opcache/zend_file_cache.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,6 +1860,7 @@ zend_persistent_script *zend_file_cache_script_load(zend_file_handle *file_handl
18601860

18611861
if (!file_cache_only &&
18621862
!ZCSG(restart_in_progress) &&
1863+
!ZCSG(restart_pending) &&
18631864
!ZSMMG(memory_exhausted) &&
18641865
accelerator_shm_read_lock() == SUCCESS) {
18651866
/* exclusive lock */

0 commit comments

Comments
 (0)