Bug #78620 [Opn->Ver]: Out of memory error
| From: | cmb@php.net | Date: | Tue, 01 Oct 2019 22:10:21 +0000 |
| Subject: | Bug #78620 [Opn->Ver]: Out of memory error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222980@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78620&edit=1
ID: 78620
Updated by: cmb@php.net
Reported by: v-altruo at microsoft dot com
Summary: Out of memory error
-Status: Open
+Status: Verified
Type: Bug
-Package: Testing related
+Package: Scripting Engine problem
Operating System: Windows Server 2012 R2
-PHP Version: 7.3.10
+PHP Version: 7.2.23
Block user comment: N
Private report: N
New Comment:
Oh, indeed!
The problem is that ZEND_MM_ALIGNED_SIZE_EX evaluates to 0[1],
since (size + alignment -1) overflows (in this case size ==
4294901777 && alignment == 2097152), and we don't catch that.
[1] <https://github.com/php/php-src/blob/php-7.2.23/Zend/zend_alloc.c#L1458>
Previous Comments:
------------------------------------------------------------------------
[2019-10-01 17:21:15] v-altruo at microsoft dot com
Description:
------------
Test fails with x86 version for both nts/ts builds regardless of opcache on/off. Test also fails for
7.2.23.
Failed test file location: ext\standard\tests\strings\wordwrap_memory_limit.phpt
Expected result:
----------------
Fatal error: Allowed memory size of 134217728 bytes exhausted%s(tried to allocate %d bytes) in %s on
line %d
Actual result:
--------------
VirtualAlloc() failed: [0x00000057] The parameter is incorrect.
VirtualAlloc() failed: [0x00000057] The parameter is incorrect.
Fatal error: Out of memory (allocated 2097152) (tried to allocate 4294901777 bytes) in
C:\..\ext\standard\tests\strings\wordwrap_memory_limit.php on line 5
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78620&edit=1