php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76367 NoRewindIterator segfault 11
Submitted: 2018-05-22 17:21 UTC Modified: 2018-05-22 21:10 UTC
From: pyscht at gmail dot com Assigned:
Status: Closed Package: SPL related
PHP Version: 7.2.5 OS: linux/macOS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
40 + 40 = ?
Subscribe to this entry?

 
 [2018-05-22 17:21 UTC] pyscht at gmail dot com
Description:
------------
Segmentation fault when trying to get the current from an invalid iterator

Test script:
---------------
$arr = [1,3,55,66,43,6];

$iter = new NoRewindIterator(new ArrayIterator($arr));

while($iter->valid()) {
    $iter->next();
}

var_dump($iter->current()); //Segmentation fault: 11 here!

Actual result:
--------------
Segmentation fault: 11

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-05-22 21:10 UTC] cmb@php.net
-Package: *Programming Data Structures +Package: SPL related
 [2018-05-23 06:46 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=8f221bdec0e1a81ef4471f926cf0b0f23724204c
Log: Fixed bug #76367 (NoRewindIterator segfault 11)
 [2018-05-23 06:46 UTC] laruence@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 07:01:27 2024 UTC