php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49608 Using CachingIterator on DirectoryIterator instance segfaults
Submitted: 2009-09-20 14:33 UTC Modified: 2011-03-08 20:56 UTC
Votes:3
Avg. Score:4.3 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: david at grudl dot com Assigned: colder (profile)
Status: Closed Package: SPL related
PHP Version: 5.3SVN-2009-09-20 (snap) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: david at grudl dot com
New email:
PHP Version: OS:

 

 [2009-09-20 14:33 UTC] david at grudl dot com
Description:
------------
This code crashes PHP 5.3.0 - 5.3.2-dev (VC9, TS)

Reproduce code:
---------------
$dir = new DirectoryIterator(__DIR__);

$iterator = new CachingIterator($dir);

foreach ($dir as $val);



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-20 14:59 UTC] pajoye@php.net
Backtrace:

>	php5_debug.dll!zval_delref_p(_zval_struct * pz=0x00000000)  Line 385 + 0x3 bytes	C
 	php5_debug.dll!_zval_ptr_dtor(_zval_struct * * zval_ptr=0x00c1ebe4, char * __zend_filename=0x10563320, unsigned int __zend_lineno=1407)  Line 429 + 0xb bytes	C
 	php5_debug.dll!spl_filesystem_dir_it_dtor(_zend_object_iterator * iter=0x02784d10)  Line 1407 + 0x17 bytes	C
 	php5_debug.dll!spl_dual_it_free_storage(void * _object=0x02785080)  Line 1920 + 0x16 bytes	C
 	php5_debug.dll!zend_objects_store_del_ref_by_handle_ex(unsigned int handle=2, const _zend_object_handlers * handlers=0x105a6e00)  Line 220 + 0x10 bytes	C
 	php5_debug.dll!zend_objects_store_del_ref(_zval_struct * zobject=0x02783ad8)  Line 172 + 0x10 bytes	C
 	php5_debug.dll!_zval_dtor_func(_zval_struct * zvalue=0x02783ad8, char * __zend_filename=0x104dea40, unsigned int __zend_lineno=435)  Line 52 + 0x11 bytes	C
 	php5_debug.dll!_zval_dtor(_zval_struct * zvalue=0x02783ad8, char * __zend_filename=0x104dea40, unsigned int __zend_lineno=435)  Line 35 + 0x11 bytes	C
 	php5_debug.dll!_zval_ptr_dtor(_zval_struct * * zval_ptr=0x027852a4, char * __zend_filename=0x104e3584, unsigned int __zend_lineno=175)  Line 435 + 0x19 bytes	C
 	php5_debug.dll!_zval_ptr_dtor_wrapper(_zval_struct * * zval_ptr=0x027852a4)  Line 175 + 0x17 bytes	C
 	php5_debug.dll!zend_hash_apply_deleter(_hashtable * ht=0x105c0b78, bucket * p=0x02785298)  Line 611 + 0x11 bytes	C
 	php5_debug.dll!zend_hash_reverse_apply(_hashtable * ht=0x105c0b78, int (void *)* apply_func=0x10283570)  Line 760 + 0xd bytes	C
 	php5_debug.dll!shutdown_destructors()  Line 222 + 0xf bytes	C
 	php5_debug.dll!zend_call_destructors()  Line 875	C
 	php5_debug.dll!php_request_shutdown(void * dummy=0x00000000)  Line 1547	C
 	php.exe!main(int argc=3, char * * argv=0x00ce1bf0)  Line 1371 + 0xa bytes	C
 	php.exe!__tmainCRTStartup()  Line 586 + 0x19 bytes	C
 	php.exe!mainCRTStartup()  Line 403	C

 [2009-09-20 14:59 UTC] pajoye@php.net
Pretty sure it is not a windows only bug either.
 [2010-05-18 14:15 UTC] mike@php.net
-Status: Assigned +Status: Feedback
 [2010-05-18 14:15 UTC] mike@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Works here on Linux (tm).
 [2010-08-09 03:39 UTC] felipe@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2010-11-06 16:02 UTC] felipe@php.net
-Status: Feedback +Status: Assigned
 [2011-03-08 20:56 UTC] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=309035
Log: - Fixed bug #49608 (Using CachingIterator on DirectoryIterator instance segfaults)
 [2011-03-08 20:56 UTC] felipe@php.net
-Status: Assigned +Status: Closed
 [2011-03-08 20:56 UTC] felipe@php.net
This bug has been fixed in SVN.

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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 00:01:30 2024 UTC