[lldb-dev] [Bug 24953] New: Unusable with LLVM_LINK_LLVM_DYLIB=ON

via lldb-dev lldb-dev at lists.llvm.org
Sun Sep 27 03:12:22 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24953

            Bug ID: 24953
           Summary: Unusable with LLVM_LINK_LLVM_DYLIB=ON
           Product: lldb
           Version: 3.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: evangelos at foutrelis.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 14941
  --> https://llvm.org/bugs/attachment.cgi?id=14941&action=edit
GDB backtrace

The following is with LLVM/LLDB 3.7.0 with the LLVM_LINK_LLVM_DYLIB CMake
option backported and enabled. (The issue is reproducible on /trunk as well.)

Attempting to run a program under lldb results in a segfault as soon as the
'run' command is given. The crash occurs when
AssemblyParse_x86::instruction_length() calls LLVMDisasmInstruction() with a
NULL LLVMDisasmContextRef pointer (m_disasm_context).

m_disasm_context is initialized in AssemblyParse_x86's constructor to the
pointer returned by LLVMCreateDisasm(). The latter returns a nullptr because
TargetRegistry::lookupTarget() fails to find the target
(x86_64-unknown-linux-gnu) in the registry. The actual error reads "Unable to
find target for this triple (no targets are registered)".

Attached is a backtrace that shows where lldb crashes. Note that specifying
LLVM_LINK_LLVM_DYLIB=OFF (which I believe makes lldb link statically to LLVM)
results in a working LLDB.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150927/0c943ae8/attachment.html>


More information about the lldb-dev mailing list