[compiler-rt] r243895 - [asan] Print VAs instead of RVAs for module offsets on Windows

İsmail Dönmez ismail at donmez.ws
Tue Aug 4 00:35:20 PDT 2015


Hi,

On Mon, Aug 3, 2015 at 10:51 PM, Reid Kleckner <reid at kleckner.net> wrote:
>  bool ReadFromFile(fd_t fd, void *buff, uptr buff_size, uptr *bytes_read,
>                    error_t *error_p) {
> -  UNIMPLEMENTED();
> +  CHECK(fd != kInvalidFd);
> +  bool success = ::ReadFile(fd, buff, buff_size, bytes_read, nullptr);
> +  if (!success && error_p)
> +    *error_p = GetLastError();
> +  return success;
>  }

This seems to fail on VS2015:

..\projects\compiler-rt\lib\sanitizer_common\sanitizer_win.cc(496):
error C2664: 'BOOL
ReadFile(HANDLE,LPVOID,DWORD,LPDWORD,LPOVERLAPPED)': cannot convert
argument 4 from '__sanitizer::uptr *' to 'LPDWORD'
..\projects\compiler-rt\lib\sanitizer_common\sanitizer_win.cc(496):
note: Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast



More information about the llvm-commits mailing list