[llvm-commits] [llvm] r140237 - /llvm/trunk/tools/llvm-objdump/MachODump.cpp

Benjamin Kramer benny.kra at googlemail.com
Tue Sep 20 21:01:19 PDT 2011


Author: d0k
Date: Tue Sep 20 23:01:19 2011
New Revision: 140237

URL: http://llvm.org/viewvc/llvm-project?rev=140237&view=rev
Log:
llvm-objdump: Fix use after free.

Modified:
    llvm/trunk/tools/llvm-objdump/MachODump.cpp

Modified: llvm/trunk/tools/llvm-objdump/MachODump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/MachODump.cpp?rev=140237&r1=140236&r2=140237&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/MachODump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/MachODump.cpp Tue Sep 20 23:01:19 2011
@@ -346,11 +346,11 @@
   StringRef DebugAbbrevSection, DebugInfoSection, DebugArangesSection,
             DebugLineSection, DebugStrSection;
   OwningPtr<DIContext> diContext;
+  OwningPtr<MachOObject> DSYMObj;
   // Try to find debug info and set up the DIContext for it.
   if (UseDbg) {
     ArrayRef<Section> DebugSections = Sections;
     std::vector<Section> DSYMSections;
-    OwningPtr<MachOObject> DSYMObj;
 
     // A separate DSym file path was specified, parse it as a macho file,
     // get the sections and supply it to the section name parsing machinery.





More information about the llvm-commits mailing list