Artamonov Aleksandr via llvm-dev
2017-May-04 11:34 UTC
[llvm-dev] [libfuzzer] Fallback to stat if d_type == DT_UNKNOWN in ListFilesInDirRecursive method
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170504/f0a6051e/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-diff Size: 737 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170504/f0a6051e/attachment.diff>
Kostya Serebryany via llvm-dev
2017-May-04 16:00 UTC
[llvm-dev] [libfuzzer] Fallback to stat if d_type == DT_UNKNOWN in ListFilesInDirRecursive method
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>