[LLVMbugs] [Bug 21607] New: Use-of-uninitialized-value in MachODump.cpp

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 19 04:23:29 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=21607

            Bug ID: 21607
           Summary: Use-of-uninitialized-value in MachODump.cpp
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llvm-dis
          Assignee: unassignedbugs at nondot.org
          Reporter: eugeni.stepanov at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

./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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141119/acda6193/attachment.html>


More information about the llvm-bugs mailing list