[llvm-dev] [libfuzzer] Fallback to stat if d_type == DT_UNKNOWN in ListFilesInDirRecursive method

Kostya Serebryany via llvm-dev llvm-dev at lists.llvm.org
Thu May 4 09:00:07 PDT 2017


Hi Aleksander,

Thanks for the patch!

* is a test possible here?
* could you please use http://llvm.org/docs/Phabricator.html to submit the
patch?

On Thu, May 4, 2017 at 4:34 AM, Artamonov Aleksandr via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi All,
>
> Currently libfuzzer doesn't properly handles case when readdir returns
> dirent structure with *d_type == DT_UNKNOWN* in ListFilesInDirRecursive
> method: http://llvm.org/svn/llvm-project/llvm/trunk/lib/Fuzzer/
> FuzzerIOPosix.cpp:35. It just skips corpus data and fuzzing starts in a
> clean slate.
>
> Man pages of readdir says there should be fallback to the lstat/stat in
> this case: https://linux.die.net/man/3/readdir
>
> Patch attached.
>
> --
> Aleksander
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170504/62661853/attachment.html>


More information about the llvm-dev mailing list