com php-src: Merge branch 'PHP-7.2' into PHP-7.3: NEWS ext/opcache/ZendAccelerator.c ext/opcache/ZendAccelerator.h
ext/opcache/zend_accelerator_module.c
| From: | Dmitry Stogov | Date: | Tue, 14 May 2019 11:54:30 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.2' into PHP-7.3: NEWS ext/opcache/ZendAccelerator.c ext/opcache/ZendAccelerator.h ext/opcache/zend_accelerator_module.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106183@lists.php.net to get a copy of this message | ||
Commit: a43678aa120d122460e53034d6484748eedbe130
Author: Dmitry Stogov <dmitry@zend.com> Tue, 14 May 2019 14:54:30 +0300
Parents: 2d93cce03a96ee7b0265e15e2d56acd173dec682 5c4d125d4c2976236e2ecddd1d8c6e7b113ec482
Branches: PHP-7.3 PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a43678aa120d122460e53034d6484748eedbe130
Log:
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
Fixed possible crashes, because of inconsistent PCRE cache and opcache SHM reset
Changed paths:
MM NEWS
MM ext/opcache/ZendAccelerator.c
MM ext/opcache/ZendAccelerator.h
MM ext/opcache/zend_accelerator_module.c
Diff:
diff --cc ext/opcache/ZendAccelerator.c
index f095429,34e4ef0..a8ea054
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@@ -2203,9 -2057,9 +2203,9 @@@ static int persistent_stream_open_funct
}
/* zend_resolve_path() replacement for PHP 5.3 and above */
-static zend_string* persistent_zend_resolve_path(const char *filename, int filename_len)
+static zend_string* persistent_zend_resolve_path(const char *filename, size_t filename_len)
{
- if (ZCG(enabled) && accel_startup_ok &&
+ if (
#ifdef HAVE_OPCACHE_FILE_CACHE
!file_cache_only &&
#endif
@@@ -2357,8 -2210,9 +2356,9 @@@ static void accel_activate(void
if (ZCG(root_hash) != buf.st_ino) {
zend_string *key = zend_string_init("opcache.enable",
sizeof("opcache.enable")-1, 0);
zend_alter_ini_entry_chars(key, "0", 1, ZEND_INI_SYSTEM, ZEND_INI_STAGE_RUNTIME);
- zend_string_release(key);
+ zend_string_release_ex(key, 0);
zend_accel_error(ACCEL_LOG_WARNING, "Can't cache files in chroot() directory with
too big inode");
+ ZCG(accelerator_enabled) = 0;
return;
}
}
@@@ -2459,13 -2318,9 +2464,9 @@@ static void accel_deactivate(void
*/
if (ZCG(cwd)) {
- zend_string_release(ZCG(cwd));
+ zend_string_release_ex(ZCG(cwd), 0);
ZCG(cwd) = NULL;
}
-
- if (!ZCG(enabled) || !accel_startup_ok) {
- return;
- }
}
static int accelerator_remove_cb(zend_extension *element1, zend_extension *element2)