com php-src: Revert "Fix #78620: Out of memory error": NEWS Zend/zend_alloc.c
| From: | Christoph Michael Becker | Date: | Wed, 02 Oct 2019 17:01:35 +0000 |
| Subject: | com php-src: Revert "Fix #78620: Out of memory error": NEWS Zend/zend_alloc.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-108686@lists.php.net to get a copy of this message | ||
Commit: f2fb37a772908a9331e67f583fddcc4b1b186ccf
Author: Christoph M. Becker <cmbecker69@gmx.de> Wed, 2 Oct 2019 19:01:35 +0200
Parents: 8ce04df7e0108a10f7b782a28204e9384ab1129c
Branches: PHP-7.2 PHP-7.3 PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f2fb37a772908a9331e67f583fddcc4b1b186ccf
Log:
Revert "Fix #78620: Out of memory error"
This reverts commit 8ce04df7e0108a10f7b782a28204e9384ab1129c.
Cf. <https://github.com/php/php-src/pull/4766#discussion_r330658679>.
Bugs:
https://bugs.php.net/78620
Changed paths:
M NEWS
M Zend/zend_alloc.c
Diff:
diff --git a/NEWS b/NEWS
index b8a1a23997c..1c4ce6fe5d8 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,6 @@ PHP NEWS
- Core:
. Fixed bug #78535 (auto_detect_line_endings value not parsed as bool).
(bugreportuser)
- . Fixed bug #78620 (Out of memory error). (cmb)
- Exif:
. Fixed bug #78442 ('Illegal component' on exif_read_data since PHP7)
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index 222f08f49e4..3a43027346d 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -1730,15 +1730,10 @@ static void *zend_mm_alloc_huge(zend_mm_heap *heap, size_t size
ZEND_FILE_LINE_D
void *ptr;
#if ZEND_MM_LIMIT
- if (UNEXPECTED(new_size == 0)) {
- /* overflow in ZEND_MM_ALIGNED_SIZE_EX */
- goto memory_limit_exhausted;
- }
if (UNEXPECTED(new_size > heap->limit - heap->real_size)) {
if (zend_mm_gc(heap) && new_size <= heap->limit - heap->real_size) {
/* pass */
} else if (heap->overflow == 0) {
-memory_limit_exhausted:
#if ZEND_DEBUG
zend_mm_safe_error(heap, "Allowed memory size of %zu bytes exhausted at %s:%d (tried to
allocate %zu bytes)", heap->limit, __zend_filename, __zend_lineno, size);
#else