#36258 [Opn->Csd]: Iterator method getPath crashes Apache
| From: | tony2001@php.net | Date: | Thu, 02 Feb 2006 12:20:39 +0000 |
| Subject: | #36258 [Opn->Csd]: Iterator method getPath crashes Apache | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-92824@lists.php.net to get a copy of this message | ||
ID: 36258
Updated by: tony2001@php.net
Reported By: michael202 at gmx dot de
-Status: Open
+Status: Closed
Bug Type: Reproducible crash
Operating System: Linux
PHP Version: 5CVS-2006-02-02 (snap)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2006-02-02 12:43:44] michael202 at gmx dot de
Description:
------------
when iterating through a dir structure the apache process serving this
script crashes with 'child pid XY exit signal Segmentation fault (11)'
when trying to execute getPath method
Reproduce code:
---------------
function test_apache_segfault()
{
$diriter = new RecursiveIteratorIterator( new
RecursiveDirectoryIterator('.') );
foreach ($diriter as $key => $file) {
echo($file->getFilename()); flush();
echo(' 1'); flush();
// 'child pid XY exit signal Segmentation fault (11)'
echo($file->getPath()); // <-- crash here
echo(' 2'); flush();
} // foreach
echo(' end'); flush();
}
Expected result:
----------------
a list of more than one entry and
the word 'end' at the end
Actual result:
--------------
output ends after the 'echo 1'
when commenting out the line with 'getPath' this function runs till the
end.
checked this with
- apache 2.0.53 and php 5.0.4 both compiled by myself
- apache 2.2.0 and php 5.1.2 both compiled by myself
- apache 2.2.0 and php 5.1.3-dev (2006-02-02 snap) both compiled by
myself
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36258&edit=1