From: dennis at born05 dot nl Operating system: Fedora Core 6 PHP version: 5.2.10 PHP Bug Type: SPL related Bug description: Subclass of RecursiveDirectoryIterator segfaults with custom constructor
Description:
------------
When you subclass RecursiveDirectoryIterator and override the
constructor with enhanced functionality it makes PHP segfault.
I have tested this on 5.2.10 and 5.3.0, both display similar (but not
equal) behaviour, the output is somewhat different, but both versions
segfault.
Reproduce code:
---------------
<?php
class MyRDI extends RecursiveDirectoryIterator
{
public $base_path;
public function __construct($path, $flags = 0)
{
$this->base_path = $path;
parent::__construct($path, $flags);
}
}
$iterator = new RecursiveIteratorIterator(new
MyRDI('/path/to/dir/hierarchy'));
foreach($iterator as $entry)
{
echo $entry->getFilename()."\n";
}
?>
Expected result:
----------------
See a list of all the filenames
Actual result:
--------------
PHP segfaults
--
Edit bug report at http://bugs.php.net/?id=48814&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48814&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48814&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48814&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48814&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=48814&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48814&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=48814&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=48814&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=48814&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=48814&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=48814&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=48814&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=48814&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=48814&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48814&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48814&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=48814&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=48814&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=48814&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=48814&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=48814&r=mysqlcfg
