Skip to content

Fix GH-11336: php still tries to unlock the shared memory ZendSem with opcache.file_cache_only=1 but it was never locked #11341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ext/opcache/ZendAccelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion ext/opcache/zend_shared_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down