diff options
-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) { |