summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-09-02 13:05:12 +0300
committerDmitry Stogov <dmitry@zend.com>2015-09-02 13:05:12 +0300
commit111bd5d8c45a9c44b2e39951e6a1a543a893f8bd (patch)
tree5d101cea23e5961595c13b13d9964a78b9941ef1 /Zend/zend_alloc.c
parenta2f8a7675bd885de131efae591a10c69f9980dd8 (diff)
downloadphp-git-111bd5d8c45a9c44b2e39951e6a1a543a893f8bd.tar.gz
Introduced additional check. Its miss might be the reason of bug #70392 (SIGSEGV during PHP shutdown)
Diffstat (limited to 'Zend/zend_alloc.c')
-rw-r--r--Zend/zend_alloc.c2
1 files changed, 1 insertions, 1 deletions
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;