[llvm-dev] [libfuzzer] Fallback to stat if d_type == DT_UNKNOWN in ListFilesInDirRecursive method
Artamonov Aleksandr via llvm-dev
llvm-dev at lists.llvm.org
Thu May 4 04:34:05 PDT 2017
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>
More information about the llvm-dev
mailing list