[llvm-commits] CVS: llvm/include/llvm/Bytecode/Archive.h

Reid Spencer reid at x10sys.com
Tue Nov 29 21:21:24 PST 2005

Changes in directory llvm/include/llvm/Bytecode:

Archive.h updated: 1.11 -> 1.12
Log message:

Fix a problem with llvm-ranlib that (on some platforms) caused the archive
file to become corrupted due to interactions between mmap'd memory segments
and file descriptors closing. The problem is completely avoiding by using
a third temporary file.

Patch provided by Evan Jones

Diffs of the changes:  (+3 -0)

 Archive.h |    3 +++
 1 files changed, 3 insertions(+)

Index: llvm/include/llvm/Bytecode/Archive.h
diff -u llvm/include/llvm/Bytecode/Archive.h:1.11 llvm/include/llvm/Bytecode/Archive.h:1.12
--- llvm/include/llvm/Bytecode/Archive.h:1.11	Thu Apr 21 15:34:13 2005
+++ llvm/include/llvm/Bytecode/Archive.h	Tue Nov 29 23:21:10 2005
@@ -489,6 +489,9 @@
     bool fillHeader(const ArchiveMember&mbr,
                     ArchiveMemberHeader& hdr,int sz, bool TruncateNames) const;
+    /// @brief Frees all the members and unmaps the archive file.
+    void Archive::cleanUpMemory();
     /// This type is used to keep track of bytecode modules loaded from the
     /// symbol table. It maps the file offset to a pair that consists of the
     /// associated ArchiveMember and the ModuleProvider.

More information about the llvm-commits mailing list