summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2017-05-16 13:22:08 +0800
committerXinchen Hui <laruence@gmail.com>2017-05-16 13:22:08 +0800
commit89dd7fb328589a9aa1719aa7c642a1378c5a926e (patch)
tree1ada6d19b5d1f2a4db54e310e04c39218695dbf4
parent777929b1aef20140857d4ce5f1ab5e21c8d0aea0 (diff)
downloadphp-git-89dd7fb328589a9aa1719aa7c642a1378c5a926e.tar.gz
Fixed bug #74596 (SIGSEGV with opcache.revalidate_path enabled)
Yeah, no test script is provided.. I got some troubles to make a one
-rw-r--r--NEWS3
-rw-r--r--ext/opcache/ZendAccelerator.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 12e2e8f8f2..7d55403b7e 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,9 @@ PHP NEWS
. Fixed bug #74547 (mysqli::change_user() doesn't accept null as $database
argument w/strict_types). (Anatol)
+- Opcache:
+ . Fixed bug #74596 (SIGSEGV with opcache.revalidate_path enabled). (Laruence)
+
- phar:
. Fixed bug #51918 (Phar::webPhar() does not handle requests sent through PUT
and DELETE method). (Christian Weiske)
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 0db9202ee9..0b7c64bc9e 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -1706,7 +1706,10 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type)
return accelerator_orig_compile_file(file_handle, type);
}
persistent_script = zend_accel_hash_str_find(&ZCSG(hash), key, key_length);
+ } else if (UNEXPECTED(is_stream_path(file_handle->filename) && !is_cacheable_stream_path(file_handle->filename))) {
+ return accelerator_orig_compile_file(file_handle, type);
}
+
if (!persistent_script) {
/* try to find cached script by full real path */
zend_accel_hash_entry *bucket;