aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-11 00:00:27 +0000
committerChris Lattner <sabre@nondot.org>2007-05-11 00:00:27 +0000
commit39253260b90964141901a7900bec1f0406f02c3d (patch)
tree3998c91208b841fa22b05e822b23ef1ada703447
parent54f4a6780a33043031af97571dfffdac5a4aa35c (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36980 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/System/Unix/MappedFile.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/System/Unix/MappedFile.inc b/lib/System/Unix/MappedFile.inc
index 5e76e2bc26..91b92ece5a 100644
--- a/lib/System/Unix/MappedFile.inc
+++ b/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.
}
}