Boost C++ Libraries: Ticket #7698: Boost directory iterator constructor crashes when folder gives input/output error https://svn.boost.org/trac10/ticket/7698 <p> By using the directory iterator on a non accessible forlder under Linux, the following crash happens: </p> <p> <a class="missing ticket">#0</a> 0x0000003064a329a5 in raise () from /lib64/libc.so.6 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/1" title="#1: Bugs: boost.build causes ftjam to segfault (closed: Wont Fix)">#1</a> 0x0000003064a34185 in abort () from /lib64/libc.so.6 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2" title="#2: Bugs: list::size should be const (closed: fixed)">#2</a> 0x0000003064a2b935 in <span class="underline">assert_fail () from /lib64/libc.so.6 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3" title="#3: Bugs: automatic conversion and overload proble (closed: fixed)">#3</a> 0x000000000043a7b5 in boost::shared_ptr&lt;boost::filesystem3::detail::dir_itr_imp&gt;::operator-&gt; (this=0x7fffd216cf30) </span></p> <blockquote> <p> at /usr/include/boost/smart_ptr/shared_ptr.hpp:414 </p> </blockquote> <p> <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4" title="#4: Bugs: any_ptr in any library documentation? (closed: Fixed)">#4</a> 0x00000000005e89f2 in boost::filesystem3::detail::directory_iterator_increment (it=..., ec=0x0) at libs/filesystem/v3/src/operations.cpp:1947 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/5" title="#5: Bugs: shared_ptr and self-owning objects (closed: Fixed)">#5</a> 0x00000000004363af in boost::filesystem3::directory_iterator::increment (this=0x7fffd216cf30) at /usr/include/boost/filesystem/v3/operations.hpp:630 <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6" title="#6: Bugs: tie in utility.hpp and tuple.hpp clash. (closed: Duplicate)">#6</a> 0x00000000005e8810 in boost::filesystem3::detail::directory_iterator_construct (it=..., p=..., ec=0x7fffd216cf40) </p> <blockquote> <p> at libs/filesystem/v3/src/operations.cpp:1918 </p> </blockquote> <p> <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7" title="#7: Bugs: g++ 2.96 requires NO_STRINGSTREAM (closed: Fixed)">#7</a> 0x000000000054a120 in boost::filesystem3::directory_iterator::directory_iterator (this=0x7fffd216cf30, p=..., ec=...) </p> <blockquote> <p> at /usr/include/boost/filesystem/v3/operations.hpp:598 </p> </blockquote> <p> A sample code that generates the crash is the following: </p> <p> boost::system::error_code ec; boost::filesystem3::directory_iterator itr(dir_path, ec); </p> <p> Where the dir_path is a folder that is not accessible. Using the ls command from terminal on the same folder returns: </p> <p> input/output error </p> <p> If the error returned is permission denied, everything works fine. I triggered the input/output error using the curlftpfs library which mounts a ftp as a folder on the system. The permission denied error can be generated on the same folder using nfs share. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7698 Trac 1.4.3 anonymous Fri, 20 Dec 2013 22:37:53 GMT <link>https://svn.boost.org/trac10/ticket/7698#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7698#comment:1</guid> <description> <p> Any movement here? I catch a construct error No such file or directory on the curlftpfs mountpoint. </p> </description> <category>Ticket</category> </item> <item> <author>zeal_goswami@…</author> <pubDate>Tue, 23 Jan 2018 14:21:59 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7698#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7698#comment:2</guid> <description> <p> I am also facing issue any update </p> </description> <category>Ticket</category> </item> </channel> </rss>