com php-src: Fixed another segfault with file_cache_only now: ext/opcache/zend_shared_alloc.c
| From: | Anatol Belski | Date: | Tue, 01 Mar 2016 07:21:14 +0000 |
| Subject: | com php-src: Fixed another segfault with file_cache_only now: ext/opcache/zend_shared_alloc.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91210@lists.php.net to get a copy of this message | ||
Commit: 08af2f9a1166e29d6c643e47f2ebf5a694cc76d0
Author: Xinchen Hui <laruence@gmail.com> Tue, 1 Mar 2016 10:50:56 +0800
Committer: Anatol Belski <ab@php.net> Tue, 1 Mar 2016 08:21:14 +0100
Parents: 4a66b01639b85b058363b4aeb930364ab2c870f7
Branches: PHP-7.0.4
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=08af2f9a1166e29d6c643e47f2ebf5a694cc76d0
Log:
Fixed another segfault with file_cache_only now
Changed paths:
M ext/opcache/zend_shared_alloc.c
Diff:
diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c
index deae886..663d905 100644
--- a/ext/opcache/zend_shared_alloc.c
+++ b/ext/opcache/zend_shared_alloc.c
@@ -496,6 +496,10 @@ void zend_accel_shared_protect(int mode)
#ifdef HAVE_MPROTECT
int i;
+ if (!smm_shared_globals) {
+ return;
+ }
+
if (mode) {
mode = PROT_READ;
} else {