php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71495 Segfault on RecursiveIteratorIterator
Submitted: 2016-02-01 21:35 UTC Modified: 2021-07-15 13:55 UTC
Votes:5
Avg. Score:3.8 ± 1.5
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:1 (25.0%)
From: lucashedding at gmail dot com Assigned: nikic (profile)
Status: Closed Package: SPL related
PHP Version: 7.0.2 OS: Linux Mint 17.2
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: lucashedding at gmail dot com
New email:
PHP Version: OS:

 

 [2016-02-01 21:35 UTC] lucashedding at gmail dot com
Description:
------------
When looping over RecursiveIteratorIterator, it turns into a segmentation fault.

$ php --version
PHP 7.0.2-4+deb.sury.org~trusty+1 (cli) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Xdebug v2.4.0RC4, Copyright (c) 2002-2016, by Derick Rethans

Reverting to PHP 5.6 and there are no problems.

Test script:
---------------
https://gist.github.com/juancasantito/ea6c2366db98a25b08e4#file-RecursiveIteratorIterator



Expected result:
----------------
Data is sucked in from google.

Actual result:
--------------
Seg fault

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-02-01 21:40 UTC] lucashedding at gmail dot com
Issue on drupal.org is https://www.drupal.org/node/2660670
 [2016-12-30 15:39 UTC] cmb@php.net
-Package: SPL_Types +Package: SPL related
 [2021-07-15 13:55 UTC] nikic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: nikic
 [2021-07-15 13:55 UTC] nikic@php.net
Based on https://3v4l.org/09Khf from the Drupal issue, this issue has been fixed in later PHP 7 releases.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 19:01:36 2025 UTC