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