Bug #61730 [Wfx->Csd]: Segfault from array_walk modifying an array passed by reference
| From: | laruence@php.net | Date: | Sun, 06 May 2012 12:42:08 +0000 |
| Subject: | Bug #61730 [Wfx->Csd]: Segfault from array_walk modifying an array passed by reference | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-170256@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61730&edit=1
ID: 61730
Updated by: laruence@php.net
Reported by: joe dot lencioni at gmail dot com
Summary: Segfault from array_walk modifying an array passed
by reference
-Status: Wont fix
+Status: Closed
Type: Bug
Package: Reproducible crash
Operating System: 2.6.32-131.0.15.el6.x86_64
PHP Version: 5.3.10
-Assigned To:
+Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php
Previous Comments:
------------------------------------------------------------------------
[2012-05-06 12:31:28] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7ccd5943924fd4ad9adcad1fbc547adc79114bff
Log: Fixed bug #61730 (Segfault from array_walk modifying an array passed by reference)
------------------------------------------------------------------------
[2012-05-06 12:30:32] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7ccd5943924fd4ad9adcad1fbc547adc79114bff
Log: Fixed bug #61730 (Segfault from array_walk modifying an array passed by reference)
------------------------------------------------------------------------
[2012-05-06 12:03:21] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=7ccd5943924fd4ad9adcad1fbc547adc79114bff
Log: Fixed bug #61730 (Segfault from array_walk modifying an array passed by reference)
------------------------------------------------------------------------
[2012-05-06 11:44:20] laruence@php.net
a more proper test script without trigger the warning:
$myArray = array_fill(0, 10, 1);
array_walk(
$myArray,
function($value, $key) use (&$myArray)
{
unset($myArray[$key]);
}
);
------------------------------------------------------------------------
[2012-05-06 11:29:07] laruence@php.net
you are alter the array while iterating the array self. segfault is reasonable.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=61730
--
Edit this bug report at https://bugs.php.net/bug.php?id=61730&edit=1