[llvm-commits] CVS: llvm/lib/System/Unix/MappedFile.inc

Chris Lattner sabre at nondot.org
Thu May 10 17:00:45 PDT 2007



Changes in directory llvm/lib/System/Unix:

MappedFile.inc updated: 1.19 -> 1.20
---
Log message:

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


---
Diffs of the changes:  (+1 -0)

 MappedFile.inc |    1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/System/Unix/MappedFile.inc
diff -u llvm/lib/System/Unix/MappedFile.inc:1.19 llvm/lib/System/Unix/MappedFile.inc:1.20
--- llvm/lib/System/Unix/MappedFile.inc:1.19	Thu Mar 29 14:11:22 2007
+++ llvm/lib/System/Unix/MappedFile.inc	Thu May 10 19:00:27 2007
@@ -78,6 +78,7 @@
     if (options_ & WRITE_ACCESS)
       ::msync(base_, info_->Size, MS_SYNC);
     ::munmap(base_, info_->Size);
+    base_ = 0;  // Mark this as non-mapped.
   }
 }
 






More information about the llvm-commits mailing list