diff options
author | Xinchen Hui <laruence@gmail.com> | 2016-02-28 11:50:06 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2016-02-28 11:50:06 +0800 |
commit | 8c053d44e473f6b9e65d50ce81029b5849d9e105 (patch) | |
tree | c008d18982c92d920f1007935080f84b6d1554c2 /ext/opcache/zend_shared_alloc.c | |
parent | c299b272c77b9bea4d6371a37a6d2b894f9729e8 (diff) | |
download | php-git-8c053d44e473f6b9e65d50ce81029b5849d9e105.tar.gz |
Fixed segfault with file_cache_only
Diffstat (limited to 'ext/opcache/zend_shared_alloc.c')
-rw-r--r-- | ext/opcache/zend_shared_alloc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/opcache/zend_shared_alloc.c b/ext/opcache/zend_shared_alloc.c index 6625fe23c3..deae886991 100644 --- a/ext/opcache/zend_shared_alloc.c +++ b/ext/opcache/zend_shared_alloc.c @@ -512,6 +512,10 @@ int zend_accel_in_shm(void *ptr) { int i; + if (!smm_shared_globals) { + return 0; + } + for (i = 0; i < ZSMMG(shared_segments_count); i++) { if ((char*)ptr >= (char*)ZSMMG(shared_segments)[i]->p && (char*)ptr < (char*)ZSMMG(shared_segments)[i]->p + ZSMMG(shared_segments)[i]->size) { |