#36258 [NEW]: Iterator method getPath crashes Apache
| From: | michael202 at gmx dot de | Date: | Thu, 02 Feb 2006 11:43:45 +0000 |
| Subject: | #36258 [NEW]: Iterator method getPath crashes Apache | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-92822@lists.php.net to get a copy of this message | ||
From: michael202 at gmx dot de
Operating system: Linux
PHP version: 5CVS-2006-02-02 (snap)
PHP Bug Type: Reproducible crash
Bug description: Iterator method getPath crashes Apache
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 bug report at http://bugs.php.net/?id=36258&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36258&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36258&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36258&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36258&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36258&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36258&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36258&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36258&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36258&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36258&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36258&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36258&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36258&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36258&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36258&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36258&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36258&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36258&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36258&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36258&r=mysqlcfg