diff options
author | Marcos Pividori <mpividori@google.com> | 2017-02-08 00:03:18 +0000 |
---|---|---|
committer | Marcos Pividori <mpividori@google.com> | 2017-02-08 00:03:18 +0000 |
commit | 360be4d7ad95a72189ee591e39f8f8ca90e47e33 (patch) | |
tree | db96c87a5207e60aa32317bd161361e99ed7ffb5 /llvm/lib/Fuzzer/FuzzerIO.h | |
parent | e219d401912ffa8b62dd27fd3f9094cf334de840 (diff) | |
download | bcm5719-llvm-360be4d7ad95a72189ee591e39f8f8ca90e47e33.tar.gz bcm5719-llvm-360be4d7ad95a72189ee591e39f8f8ca90e47e33.zip |
[libFuzzer] Properly use Handle instead of FD on Windows.
For Windows, sanitizers work with Handles, not with posix file descriptors,
because they use the windows-specific API. So we need to convert the fds to
handles before passing them to the sanitizer library.
After this change, close_fd_mask is fixed for Windows (this fix some tests too).
Differential Revision: https://reviews.llvm.org/D29548
llvm-svn: 294388
Diffstat (limited to 'llvm/lib/Fuzzer/FuzzerIO.h')
-rw-r--r-- | llvm/lib/Fuzzer/FuzzerIO.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Fuzzer/FuzzerIO.h b/llvm/lib/Fuzzer/FuzzerIO.h index 28c6ba09586..3b66a52d1a6 100644 --- a/llvm/lib/Fuzzer/FuzzerIO.h +++ b/llvm/lib/Fuzzer/FuzzerIO.h @@ -69,6 +69,8 @@ void RemoveFile(const std::string &Path); void DiscardOutput(int Fd); +intptr_t GetHandleFromFd(int fd); + } // namespace fuzzer #endif // LLVM_FUZZER_IO_H |