Bug #65251 [Asn->Csd]: array_merge_recursive() recursion detection broken
| From: | nikic@php.net | Date: | Sun, 08 Jan 2017 11:02:14 +0000 |
| Subject: | Bug #65251 [Asn->Csd]: array_merge_recursive() recursion detection broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206389@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65251&edit=1
ID: 65251
Updated by: nikic@php.net
Reported by: maarten@php.net
Summary: array_merge_recursive() recursion detection broken
-Status: Assigned
+Status: Closed
Type: Bug
Package: Arrays related
PHP Version: 5.5.0
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Test added in https://github.com/php/php-src/commit/79d918b3a62666b96cd652b51345647aee8756c0.
Previous Comments:
------------------------------------------------------------------------
[2017-01-02 14:21:03] nikic@php.net
This is fixed in PHP 7.0. Before closing this issue a test should probably be committed.
------------------------------------------------------------------------
[2013-07-21 17:01:59] arpad@php.net
Broken by rev eea093b4 (fixing #42177)
------------------------------------------------------------------------
[2013-07-12 13:30:55] maarten@php.net
Description:
------------
<?php
array_merge_recursive$GLOBALS,$GLOBALS)
?>
No longer detects recursion.
It was fixed at the time (https://bugs.php.net/bug.php?id=16064 ) and fix did work until PHP 5.3.26
However PHP 5.4.0 shows a regression, still present in recent 5.4 and 5.5.
See: http://3v4l.org/PfuC8
Test script:
---------------
<?php
array_merge_recursive($GLOBALS,$GLOBALS)
Expected result:
----------------
Warning: array_merge_recursive(): recursion detected in [...] on line 2
Actual result:
--------------
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in [...]
on line 2
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65251&edit=1