diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-08-22 15:14:53 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-08-22 15:14:53 +0000 |
commit | 7b5d4f97a0ffe1f8ef37571d03fd9120f39529fb (patch) | |
tree | e1823957c517f418739ec9bb43365a2ba3903ba2 /llvm/lib/Support | |
parent | edf7615332801f9c0b41b6e4560f3877df7b63d6 (diff) | |
download | bcm5719-llvm-7b5d4f97a0ffe1f8ef37571d03fd9120f39529fb.tar.gz bcm5719-llvm-7b5d4f97a0ffe1f8ef37571d03fd9120f39529fb.zip |
[Win32] mapped_file_region: Fix a bug in CreateFileMapping() that Size must contain Offset when Offset >= 65536.
llvm-svn: 189021
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/Windows/Path.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc index 95caaa58d7a..645d5238dbc 100644 --- a/llvm/lib/Support/Windows/Path.inc +++ b/llvm/lib/Support/Windows/Path.inc @@ -726,8 +726,8 @@ error_code mapped_file_region::init(int FD, bool CloseFD, uint64_t Offset) { FileMappingHandle = ::CreateFileMapping(FileHandle, 0, flprotect, - Size >> 32, - Size & 0xffffffff, + (Offset + Size) >> 32, + (Offset + Size) & 0xffffffff, 0); if (FileMappingHandle == NULL) { error_code ec = windows_error(GetLastError()); |