[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

git-svn-id: svn://svn.chromium.org/llvm-project/llvm/trunk/lib/Fuzzer@294388 0b72dbe1-c17f-4bc7-b9db-2b4152be0356
4 files changed