com php-src: Merge branch 'PHP-7.0' into PHP-7.1: NEWS ext/opcache/ZendAccelerator.c ext/opcache/ZendAccelerator.h
ext/opcache/zend_accelerator_module.c
| From: | Dmitry Stogov | Date: | Wed, 16 Nov 2016 09:56:15 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.0' into PHP-7.1: 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-95783@lists.php.net to get a copy of this message | ||
Commit: 86460af56c520b7210d5e21afb7368d4a4d01e1d
Author: Dmitry Stogov <dmitry@zend.com> Wed, 16 Nov 2016 12:56:15 +0300
Parents: 5ae5ab83fd96ccbcc3ff8a1fe58c087a52ecf4ad a1a5b52f3b9c819fec871601392b438a4ddecf14
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=86460af56c520b7210d5e21afb7368d4a4d01e1d
Log:
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Fixed bug #69090 (check cached files permissions)
Bugs:
https://bugs.php.net/69090
Changed paths:
MM NEWS
MM ext/opcache/ZendAccelerator.c
MM ext/opcache/ZendAccelerator.h
MM ext/opcache/zend_accelerator_module.c
Diff:
diff --cc NEWS
index 84c4f87,6c78480..604ee8d
--- a/NEWS
+++ b/NEWS
@@@ -5,20 -5,6 +5,23 @@@ PH
- Calendar:
. Fix integer overflows (Joshua Rogers)
+- Date:
+ . Fixed bug #69587 (DateInterval properties and isset). (jhdxr)
+
+- Mbstring:
+ . Fixed bug #73532 (Null pointer dereference in mb_eregi). (Laruence)
+
++- Opcache:
++ . Fixed bug #69090 (check cached files permissions)
++
+- SQLite3:
+ . Update to SQLite 3.15.1. (cmb)
+
+- XML:
+ . Fixed bug #72135 (malformed XML causes fault) (edgarsandi)
+
+10 Nov 2016, PHP 7.1.0RC6
+
- Core:
. Fixded bug #72736 (Slow performance when fetching large dataset with mysqli
/ PDO). (Dmitry)
diff --cc ext/opcache/ZendAccelerator.c
index 2f549cc,7bd6b81..9b6734f
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@@ -1771,7 -1763,20 +1771,21 @@@ zend_op_array *persistent_compile_file(
ZCG(counted) = 1;
}
+ /* Revalidate acessibility of cached file */
+ if (EXPECTED(persistent_script != NULL) &&
+ UNEXPECTED(ZCG(accel_directives).validate_permission) &&
+ file_handle->type == ZEND_HANDLE_FILENAME &&
+ UNEXPECTED(access(file_handle->filename, R_OK) != 0)) {
+ if (type == ZEND_REQUIRE) {
+ zend_message_dispatcher(ZMSG_FAILED_REQUIRE_FOPEN, file_handle->filename TSRMLS_CC);
+ zend_bailout();
+ } else {
+ zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file_handle->filename TSRMLS_CC);
+ }
+ return NULL;
+ }
+
+ HANDLE_BLOCK_INTERRUPTIONS();
SHM_UNPROTECT();
/* If script is found then validate_timestamps if option is enabled */
@@@ -2084,7 -2084,31 +2098,32 @@@ static void accel_activate(void
}
#endif
+ #ifndef ZEND_WIN32
+ if (ZCG(accel_directives).validate_root) {
+ struct stat buf;
+
+ if (stat("/", &buf) != 0) {
+ ZCG(root_hash) = 0;
+ } else {
+ zend_ulong x = buf.st_ino;
+
+ #if SIZEOF_ZEND_LONG == 4
+ x = ((x >> 16) ^ x) * 0x45d9f3b;
+ x = ((x >> 16) ^ x) * 0x45d9f3b;
+ x = (x >> 16) ^ x;
+ #elif SIZEOF_ZEND_LONG == 8
+ x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
+ x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
+ x = x ^ (x >> 31);
+ #endif
+ ZCG(root_hash) = x;
+ }
+ } else {
+ ZCG(root_hash) = 0;
+ }
+ #endif
+
+ HANDLE_BLOCK_INTERRUPTIONS();
SHM_UNPROTECT();
if (ZCG(counted)) {