Skip to content

Commit 8c053d4

Browse files
committed
Fixed segfault with file_cache_only
1 parent c299b27 commit 8c053d4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/opcache/zend_shared_alloc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,10 @@ int zend_accel_in_shm(void *ptr)
512512
{
513513
int i;
514514

515+
if (!smm_shared_globals) {
516+
return 0;
517+
}
518+
515519
for (i = 0; i < ZSMMG(shared_segments_count); i++) {
516520
if ((char*)ptr >= (char*)ZSMMG(shared_segments)[i]->p &&
517521
(char*)ptr < (char*)ZSMMG(shared_segments)[i]->p + ZSMMG(shared_segments)[i]->size) {

0 commit comments

Comments
 (0)