In MemoryBuffer::getOpenFile() don't verify that the mmap'ed
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 11 Jul 2012 20:59:20 +0000 (20:59 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 11 Jul 2012 20:59:20 +0000 (20:59 +0000)
commit10dedb9421467f2813195bcd9c81aca508a1875b
tree06b606a4365241e1563d6dc5f95ca485a5a1c4d4
parentf9fa3d8b872639d494481b43bee158c4359fc626
In MemoryBuffer::getOpenFile() don't verify that the mmap'ed
file buffer is null-terminated.

If the file is smaller than we thought, mmap will not allow dereferencing
past the pages that are enough to cover the actual file size,
even though we asked for a larger address range.

rdar://11612916

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160075 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/MemoryBuffer.cpp