Skip to content

Commit f2fb37a

Browse files
committed
Revert "Fix #78620: Out of memory error"
This reverts commit 8ce04df. Cf. <php#4766 (comment)>.
1 parent 8ce04df commit f2fb37a

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

NEWS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ PHP NEWS
55
- Core:
66
. Fixed bug #78535 (auto_detect_line_endings value not parsed as bool).
77
(bugreportuser)
8-
. Fixed bug #78620 (Out of memory error). (cmb)
98

109
- Exif:
1110
. Fixed bug #78442 ('Illegal component' on exif_read_data since PHP7)

Zend/zend_alloc.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,15 +1730,10 @@ static void *zend_mm_alloc_huge(zend_mm_heap *heap, size_t size ZEND_FILE_LINE_D
17301730
void *ptr;
17311731

17321732
#if ZEND_MM_LIMIT
1733-
if (UNEXPECTED(new_size == 0)) {
1734-
/* overflow in ZEND_MM_ALIGNED_SIZE_EX */
1735-
goto memory_limit_exhausted;
1736-
}
17371733
if (UNEXPECTED(new_size > heap->limit - heap->real_size)) {
17381734
if (zend_mm_gc(heap) && new_size <= heap->limit - heap->real_size) {
17391735
/* pass */
17401736
} else if (heap->overflow == 0) {
1741-
memory_limit_exhausted:
17421737
#if ZEND_DEBUG
17431738
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);
17441739
#else

0 commit comments

Comments
 (0)