mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Fix GH-11336: php still tries to unlock the shared memory ZendSem with opcache.file_cache_only=1 but it was never locked
I chose to check for the value of lock_file instead of checking the file_cache_only, because it is probably a little bit faster and we're going to access the lock_file variable anyway. It's also more generic. Closes GH-11341.
This commit is contained in:
parent
bce536067c
commit
9c59d22a7b
2
NEWS
2
NEWS
@ -15,6 +15,8 @@ PHP NEWS
|
||||
- Opcache:
|
||||
. Fix allocation loop in zend_shared_alloc_startup(). (nielsdos)
|
||||
. Access violation on smm_shared_globals with ALLOC_FALLBACK. (KoudelkaB)
|
||||
. Fixed bug GH-11336 (php still tries to unlock the shared memory ZendSem
|
||||
with opcache.file_cache_only=1 but it was never locked). (nielsdos)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug GH-11338 (SplFileInfo empty getBasename with more than one
|
||||
|
@ -354,6 +354,10 @@ static inline void accel_unlock_all(void)
|
||||
#ifdef ZEND_WIN32
|
||||
accel_deactivate_sub();
|
||||
#else
|
||||
if (lock_file == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct flock mem_usage_unlock_all;
|
||||
|
||||
mem_usage_unlock_all.l_type = F_UNLCK;
|
||||
|
@ -52,7 +52,7 @@ zend_smm_shared_globals *smm_shared_globals;
|
||||
#ifdef ZTS
|
||||
static MUTEX_T zts_lock;
|
||||
#endif
|
||||
int lock_file;
|
||||
int lock_file = -1;
|
||||
static char lockfile_name[MAXPATHLEN];
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user