This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Fix directory_iterator handling of DT_UNKNOWN
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 8 Apr 2019 09:18:55 +0200
- Subject: Re: [PATCH] Fix directory_iterator handling of DT_UNKNOWN
- References: <20190405165645.GA5937@redhat.com>
On Fri, 5 Apr 2019 at 18:57, Jonathan Wakely <jwakely@redhat.com> wrote:
>
> We need to handle DT_UNKNOWN earlier, not only during directory
> recursion, so that the cached file_type value in the directory_entry
> won't be used.
>
> * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
> d_type == DT_UNKNOWN immediately.
> (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
> handling here.
> * testsuite/27_io/filesystem/iterators/caching.cc: New test.
>
> Tested powerpc64le-linux, committed to trunk.
>
Hi,
The new caching.cc test was lacking
+// { dg-require-filesystem-ts "" }
which I committed as obvious as r270199.
Christophe