[Boost-bugs] [Boost C++ Libraries] #10450: Undefined behavior in boost::filesystem::detail::directory_iterator_construct

Subject: [Boost-bugs] [Boost C++ Libraries] #10450: Undefined behavior in boost::filesystem::detail::directory_iterator_construct
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-09-03 14:16:11


#10450: Undefined behavior in
boost::filesystem::detail::directory_iterator_construct
------------------------------+------------------------
 Reporter: egrindha@… | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
  Version: Boost 1.56.0 | Severity: Problem
 Keywords: |
------------------------------+------------------------
 boost/libs/filesystem/src/operations.cpp:2178:28: runtime error: reference
 binding to null pointer of type 'struct error_code'

 The problem is this line: it.increment(*ec);

 ec is 0 when directory_iterator_construct is called from
 operations.hpp:793
 {{{
 explicit directory_iterator(const path& p)
         : m_imp(new detail::dir_itr_imp)
           { detail::directory_iterator_construct(*this, p, 0); }
 }}}
 {{{
 [...undefined behavior sanitiser noise...]
 #3 0x00005555566e623c in
 boost::filesystem::detail::directory_iterator_construct (it=..., p=...,
 ec=ec_at_entry=0x0) at
 functional/boost/libs/filesystem/src/operations.cpp:2178
 #4 0x00005555566b3cfe in directory_iterator (p=..., this=0x7fffffffd7e0)
 at functional/boost/boost/filesystem/operations.hpp:793
 #5 recursive_directory_iterator (opt=boost::filesystem::none,
 dir_path=..., this=0x7fffffffd760) at
 functional/boost/boost/filesystem/operations.hpp:1037
 [...my code...]
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10450>
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:16 UTC