[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)
> 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".
More information about the llvm-commits