aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2015-02-23 23:47:09 +0000
committerGreg Clayton <gclayton@apple.com>2015-02-23 23:47:09 +0000
commit736888c84b51c7cf1f8eccea6738ad54503c2d0a (patch)
treee3d33c87985a4395053a078f387abea669744315 /llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
parent18c243b933740506b3262e56ef6f9a3a6e4afc08 (diff)
downloadllvm-736888c84b51c7cf1f8eccea6738ad54503c2d0a.zip
llvm-736888c84b51c7cf1f8eccea6738ad54503c2d0a.tar.gz
llvm-736888c84b51c7cf1f8eccea6738ad54503c2d0a.tar.bz2
Avoid crashing by not mmap'ing files on network mounted file systems.
This is implemented by making a new FileSystem function: bool FileSystem::IsLocal(const FileSpec &spec) Then using this in a new function: DataBufferSP FileSpec::MemoryMapFileContentsIfLocal(off_t file_offset, size_t file_size) const; This function only mmaps data if the file is a local file since that means we can reliably page in data. We were experiencing crashes where people would use debug info files on network mounted file systems and that mount would go away and cause the next access to a page that wasn't paged in to crash LLDB. We now avoid this by just copying the data into a heap buffer and keeping a permanent copy to avoid the crash. Updated all previous users of FileSpec::MemoryMapFileContentsIfLocal() in ObjectFile subclasses over to use the new FileSpec::MemoryMapFileContentsIfLocal() function. <rdar://problem/19470249> llvm-svn: 230283
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp')
0 files changed, 0 insertions, 0 deletions