com php-src: Introduced additional check. Its miss might be the reason of bug #70392 (SIGSEGV during PHP shutdown): Zend/zend_alloc.c
| From: | Dmitry Stogov | Date: | Wed, 02 Sep 2015 10:05:12 +0000 |
| Subject: | com php-src: Introduced additional check. Its miss might be the reason of bug #70392 (SIGSEGV during PHP shutdown): Zend/zend_alloc.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88854@lists.php.net to get a copy of this message | ||
Commit: 111bd5d8c45a9c44b2e39951e6a1a543a893f8bd
Author: Dmitry Stogov <dmitry@zend.com> Wed, 2 Sep 2015 13:05:12 +0300
Parents: a2f8a7675bd885de131efae591a10c69f9980dd8
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=111bd5d8c45a9c44b2e39951e6a1a543a893f8bd
Log:
Introduced additional check. Its miss might be the reason of bug #70392 (SIGSEGV during PHP
shutdown)
Bugs:
https://bugs.php.net/70392
Changed paths:
M Zend/zend_alloc.c
Diff:
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 78845e6..ced3a77 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;