<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Use-of-uninitialized-value in MachODump.cpp"
   href="http://llvm.org/bugs/show_bug.cgi?id=21607">21607</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Use-of-uninitialized-value in MachODump.cpp
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>llvm-dis
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>eugeni.stepanov@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>./bin/llvm-objdump -d -m -no-show-raw-insn -full-leading-addr -print-imm-hex
../test/tools/llvm-objdump/AArch64/Inputs/hello.obj.macho-aarch64

../test/tools/llvm-objdump/AArch64/Inputs/hello.obj.macho-aarch64:

ltmp0:
_main:
0000000000000000    stp    x29, x30, [sp, #-16]!
0000000000000004==16907== WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7f631da2c3b2 in SymbolizerSymbolLookUp(void*, unsigned long, unsigned
long*, unsigned long, char const**)
/code/llvm/build-msan/../tools/llvm-objdump/MachODump.cpp:1472:14
    #1 0x7f631dc2c2c6 in
llvm::AArch64ExternalSymbolizer::tryAddingSymbolicOperand(llvm::MCInst&,
llvm::raw_ostream&, long, unsigned long, bool, unsigned long, unsigned long)
/code/llvm/build-msan/../lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp:131:9
    #2 0x7f631e546f77 in
llvm::MCDisassembler::tryAddingSymbolicOperand(llvm::MCInst&, long, unsigned
long, bool, unsigned long, unsigned long) const
/code/llvm/build-msan/../lib/MC/MCDisassembler/MCDisassembler.cpp:25:12
    #3 0x7f631dc0b1e5 in DecodeBaseAddSubImm
/code/llvm/build-msan/../lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp:1473:8
    #4 0x7f631dc0b1e5 in llvm::MCDisassembler::DecodeStatus
llvm::decodeToMCInst<unsigned int>(llvm::MCDisassembler::DecodeStatus, unsigned
int, unsigned int, llvm::MCInst&, unsigned long, void const*)
/code/llvm/build-msan/lib/Target/AArch64/AArch64GenDisassemblerTables.inc:11576
    #5 0x7f631dba5350 in decodeInstruction<unsigned int>
/code/llvm/build-msan/lib/Target/AArch64/AArch64GenDisassemblerTables.inc:12753:14
    #6 0x7f631dba5350 in
llvm::AArch64Disassembler::getInstruction(llvm::MCInst&, unsigned long&,
llvm::ArrayRef<unsigned char>, unsigned long, llvm::raw_ostream&,
llvm::raw_ostream&) const
/code/llvm/build-msan/../lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp:219
    #7 0x7f631da142bd in DisassembleInputMachO2(llvm::StringRef,
llvm::object::MachOObjectFile*)
/code/llvm/build-msan/../tools/llvm-objdump/MachODump.cpp:1924:21
    #8 0x7f631da08a71 in llvm::DisassembleInputMachO(llvm::StringRef)
/code/llvm/build-msan/../tools/llvm-objdump/MachODump.cpp:259:3
    #9 0x7f631d9c6925 in DumpInput
/code/llvm/build-msan/../tools/llvm-objdump/llvm-objdump.cpp:835:5
    #10 0x7f631d9c6925 in
for_each<std::__1::__wrap_iter<std::__1::basic_string<char> *>, void
(*)(llvm::StringRef)> /code/llvm/build/bin/../include/c++/v1/algorithm:853
    #11 0x7f631d9c6925 in main
/code/llvm/build-msan/../tools/llvm-objdump/llvm-objdump.cpp:895
    #12 0x7f631b8ecec4 in __libc_start_main
/build/buildd/eglibc-2.19/csu/libc-start.c:287
    #13 0x7f631d976d6a in _start
(/code/llvm/build-msan/bin/llvm-objdump+0x15bd6a)

  Uninitialized value was created by an allocation of 'SymbolizerInfo' in the
stack frame of function
'_ZL22DisassembleInputMachO2N4llvm9StringRefEPNS_6object15MachOObjectFileE'
    #0 0x7f631da09410 in DisassembleInputMachO2(llvm::StringRef,
llvm::object::MachOObjectFile*)
/code/llvm/build-msan/../tools/llvm-objdump/MachODump.cpp:1589

SymbolizerInfo has 2 uninitialized fields at this point: adrp_addr and
adrp_inst.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>