[PATCH] D28718: [libFuzzer] Avoid undefined behavior. Properly discard output to stdout and stderr.
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 17 10:08:10 PST 2017
zturner added inline comments.
================
Comment at: lib/Fuzzer/FuzzerIOPosix.cpp:80
+ FILE* Temp = fopen("/dev/null", "w");
+ if (!Temp)
+ return;
----------------
vitalybuka wrote:
> Why not just use CloseFile on Posix if it works?
I think it was just working on accident, seems like writing to a closed file descriptor is always wrong, even if you get lucky and it "works".
Repository:
rL LLVM
https://reviews.llvm.org/D28718
More information about the llvm-commits
mailing list