Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12578: Crash with boost::filesystem's directory_iterator and recursive_directory_iterator
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-11-20 08:50:31
#12578: Crash with boost::filesystem's directory_iterator and
recursive_directory_iterator
-------------------------------+------------------------
Reporter: anonymous | Owner: bemandawes
Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
Version: Boost 1.61.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+------------------------
Comment (by Charles Olivi <charles.olivi@â¦>):
Hi,
There is no defect, the std::distance calls iteratively the same operation
on the single_pass_traversal_tag iterator, i.e. increment().
recursive_directory_iterator is shared_ptr implemented and increment()
call pops one element from the iterator stack.
In the end, when you enter your loop, iter points to end() which makes the
segfault you get.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12578#comment:3> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC