[llvm] r222385 - Fix Use-of-uninitialized-value for adrp_addr and adrp_inst in MachODump.cpp

Kevin Enderby enderby at apple.com
Wed Nov 19 12:20:16 PST 2014


Author: enderby
Date: Wed Nov 19 14:20:16 2014
New Revision: 222385

URL: http://llvm.org/viewvc/llvm-project?rev=222385&view=rev
Log:
Fix Use-of-uninitialized-value for adrp_addr and adrp_inst in MachODump.cpp

Fixes PR21607

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=222385&r1=222384&r2=222385&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/MachODump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/MachODump.cpp Wed Nov 19 14:20:16 2014
@@ -1814,6 +1814,8 @@ static void DisassembleInputMachO2(Strin
     SymbolizerInfo.method = nullptr;
     SymbolizerInfo.demangled_name = nullptr;
     SymbolizerInfo.bindtable = nullptr;
+    SymbolizerInfo.adrp_addr = 0;
+    SymbolizerInfo.adrp_inst = 0;
     // Same for the ThumbSymbolizer
     ThumbSymbolizerInfo.verbose = true;
     ThumbSymbolizerInfo.O = MachOOF;
@@ -1825,6 +1827,8 @@ static void DisassembleInputMachO2(Strin
     ThumbSymbolizerInfo.method = nullptr;
     ThumbSymbolizerInfo.demangled_name = nullptr;
     ThumbSymbolizerInfo.bindtable = nullptr;
+    ThumbSymbolizerInfo.adrp_addr = 0;
+    ThumbSymbolizerInfo.adrp_inst = 0;
 
     // Disassemble symbol by symbol.
     for (unsigned SymIdx = 0; SymIdx != Symbols.size(); SymIdx++) {





More information about the llvm-commits mailing list