com php-src: Prevent race condition in opcache_reset(): ext/opcache/zend_accelerator_module.c

From: Date: Mon, 20 May 2019 21:07:17 +0000
Subject: com php-src: Prevent race condition in opcache_reset(): ext/opcache/zend_accelerator_module.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-106249@lists.php.net to get a copy of this message
Commit: a8a019d68a605dd2b699174dd7f55d6e8bbaeee6 Author: Dmitry Stogov <dmitry@zend.com> Tue, 21 May 2019 00:07:17 +0300 Parents: 64ec9f4dbe26ee587494b9faf510556e34aa875f Branches: PHP-7.2 PHP-7.3 PHP-7..4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a8a019d68a605dd2b699174dd7f55d6e8bbaeee6 Log: Prevent race condition in opcache_reset() Changed paths: M ext/opcache/zend_accelerator_module.c Diff: diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index 16fe80c..4d4de77 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -768,7 +768,10 @@ static ZEND_FUNCTION(opcache_reset) RETURN_FALSE; } + /* exclusive lock */ + zend_shared_alloc_lock(); zend_accel_schedule_restart(ACCEL_RESTART_USER); + zend_shared_alloc_unlock(); RETURN_TRUE; }

« previous php.cvs (#106249) next »