Fix a bug where the bcreader could crash on .bc files that were an exact

multiple of the page size, due to a bug in MappedFile

llvm-svn: 36980
This commit is contained in:
Chris Lattner 2007-05-11 00:00:27 +00:00
parent cc8f571bc8
commit fd96905f12
1 changed files with 1 additions and 0 deletions

View File

@ -78,6 +78,7 @@ void MappedFile::unmap() {
if (options_ & WRITE_ACCESS)
::msync(base_, info_->Size, MS_SYNC);
::munmap(base_, info_->Size);
base_ = 0; // Mark this as non-mapped.
}
}