From:             hannes dot magnusson at gmail dot com
Operating system: FreeBSD
PHP version:      5CVS-2007-03-03 (CVS)
PHP Bug Type:     Reproducible crash
Bug description:  RecursiveIteratorIterator unable to successfully clean up 
after itself

Description:
------------
Run the code below with reasonable low memory_limit on, for 
instance, PHP5.2 source directory.

Reproduce code:
---------------
<?php
class rfi extends RecursiveFilterIterator {
  public function __construct($path) {
    parent::__construct(new RecursiveDirectoryIterator($path));
  }
}
class rii extends RecursiveIteratorIterator {
}

$rii = new rii(new rfi("."));
foreach($rii as $obj) {
}


Actual result:
--------------
#0  0x081d6e23 in spl_RecursiveIteratorIterator_free_storage 
(_object=0x850464c, tsrm_ls=0x84e82b0) 
at /usr/src/php/5.2/ext/spl/spl_iterators.c:719
719                             sub_iter->funcs->dtor(sub_iter 
TSRMLS_CC);
[New LWP 100098]
(gdb) bt
#0  0x081d6e23 in spl_RecursiveIteratorIterator_free_storage 
(_object=0x850464c, tsrm_ls=0x84e82b0) 
at /usr/src/php/5.2/ext/spl/spl_iterators.c:719
#1  0x0836d384 in zend_objects_store_free_object_storage 
(objects=0x84f2618, tsrm_ls=0x84e82b0) 
at /usr/src/php/5.2/Zend/zend_objects_API.c:89
#2  0x0833d2db in shutdown_executor (tsrm_ls=0x84e82b0) 
at /usr/src/php/5.2/Zend/zend_execute_API.c:299
#3  0x0834c77e in zend_deactivate (tsrm_ls=0x84e82b0) 
at /usr/src/php/5.2/Zend/zend.c:860
#4  0x082f5354 in php_request_shutdown (dummy=0x0) 
at /usr/src/php/5.2/main/main.c:1311
#5  0x083bd0d8 in main (argc=2, argv=0xbfbfe960) 
at /usr/src/php/5.2/sapi/cli/php_cli.c:1294


-- 
Edit bug report at http://bugs.php.net/?id=40711&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40711&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40711&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40711&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40711&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40711&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40711&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40711&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40711&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40711&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40711&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40711&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40711&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40711&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40711&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40711&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40711&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40711&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40711&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40711&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40711&r=mysqlcfg

Reply via email to