From 39253260b90964141901a7900bec1f0406f02c3d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 11 May 2007 00:00:27 +0000 Subject: [PATCH] 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 --- lib/System/Unix/MappedFile.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/System/Unix/MappedFile.inc b/lib/System/Unix/MappedFile.inc index 5e76e2bc26a..91b92ece5a5 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. } }