From: Dmitry Stogov Date: Wed, 2 Sep 2015 10:05:12 +0000 (+0300) Subject: Introduced additional check. Its miss might be the reason of bug #70392 (SIGSEGV... X-Git-Tag: php-7.0.0RC2~2^2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=111bd5d8c45a9c44b2e39951e6a1a543a893f8bd;p=php Introduced additional check. Its miss might be the reason of bug #70392 (SIGSEGV during PHP shutdown) --- diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 78845e6cac..ced3a77d70 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -964,7 +964,7 @@ static void *zend_mm_alloc_pages(zend_mm_heap *heap, int pages_count ZEND_FILE_L /* skip free blocks */ while (tmp == 0) { i += ZEND_MM_BITSET_LEN; - if (i >= free_tail) { + if (i >= free_tail || i == ZEND_MM_PAGES) { len = ZEND_MM_PAGES - page_num; if (len >= pages_count && len < best_len) { chunk->free_tail = page_num + pages_count;