diff options
author | Chris Lattner <sabre@nondot.org> | 2007-05-11 00:00:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-05-11 00:00:27 +0000 |
commit | fd96905f12337c681e2cad81846d84f15cfc30ad (patch) | |
tree | f0bb0f14b8a2f4af7fe617549325024b1c33b643 /llvm/lib/System/Unix | |
parent | cc8f571bc808b05e4bc4f8b75db622df367208bf (diff) | |
download | bcm5719-llvm-fd96905f12337c681e2cad81846d84f15cfc30ad.tar.gz bcm5719-llvm-fd96905f12337c681e2cad81846d84f15cfc30ad.zip |
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
Diffstat (limited to 'llvm/lib/System/Unix')
-rw-r--r-- | llvm/lib/System/Unix/MappedFile.inc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/System/Unix/MappedFile.inc b/llvm/lib/System/Unix/MappedFile.inc index 5e76e2bc26a..91b92ece5a5 100644 --- a/llvm/lib/System/Unix/MappedFile.inc +++ b/llvm/lib/System/Unix/MappedFile.inc @@ -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. } } |