Edit report at https://bugs.php.net/bug.php?id=61418&edit=1

 ID:                 61418
 Updated by:         s...@php.net
 Reported by:        melkorm at gmail dot com
 Summary:            Segmentation foult using FiltesystemIterator &
                     RegexIterator
-Status:             Closed
+Status:             Re-Opened
 Type:               Bug
 Package:            SPL related
 Operating System:   Linux Mint 12
 PHP Version:        5.3.10
 Assigned To:        cataphract
 Block user comment: N
 Private report:     N

 New Comment:

Had to revert the fix, reopening the bug.


Previous Comments:
------------------------------------------------------------------------
[2012-03-23 05:32:03] s...@php.net

Automatic comment on behalf of stas
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=a89c4a34ee55686ab1430a5060e1460335fc5203
Log: Revert "- Fixed bug #61418 (Segmentation fault when 
DirectoryIterator's or" - causes bug #61482

------------------------------------------------------------------------
[2012-03-23 05:31:43] s...@php.net

Automatic comment on behalf of stas
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=a89c4a34ee55686ab1430a5060e1460335fc5203
Log: Revert "- Fixed bug #61418 (Segmentation fault when 
DirectoryIterator's or" - causes bug #61482

------------------------------------------------------------------------
[2012-03-23 05:31:27] s...@php.net

Automatic comment on behalf of stas
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=a89c4a34ee55686ab1430a5060e1460335fc5203
Log: Revert "- Fixed bug #61418 (Segmentation fault when 
DirectoryIterator's or" - causes bug #61482

------------------------------------------------------------------------
[2012-03-18 15:07:08] cataphr...@php.net

Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=324327
Log: - Fixed bug #61418 (Segmentation fault when DirectoryIterator's or
  FilesystemIterator's iterators are requested more than once without
  having had its dtor callback called in between).

------------------------------------------------------------------------
[2012-03-17 23:27:20] cataphr...@php.net

Verified.

The zend_object_iterator_funcs.dtor function (implementation: 
spl_filesystem_tree_it_dtor) seems faulty. In the reproduce script here, the 
zend_object_iterator is requested twice: first by the RegexIterator 
constructor, and then by foreach. The zend_object_iterator returned is the same 
in both cases -- that owned by the FilesystemIterator and its destructor gets 
called twice. But obviously the destructor is not prepared to be called twice 
as it unconditionally calls zval_ptr_dtor (for some reason, twice) and zeroes 
the reference to the owning object.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=61418


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=61418&edit=1

Reply via email to