<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - SIGSEGV on 'image dump symfile'"
   href="https://bugs.llvm.org/show_bug.cgi?id=36534">36534</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SIGSEGV on 'image dump symfile'
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.0
          </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>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dantipov@nvidia.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Configured on X86/Linux with:

cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS_DEBUG='-O0 -g'
-DCMAKE_CXX_FLAGS_DEBUG='-O0 -g'
-DCMAKE_INSTALL_PREFIX=/home/dantipov/.local/llvm-6.0.0
-DLLVM_TARGETS_TO_BUILD="ARM;AArch64;X86"

LLDB is unable to 'image dump symfile' of itself:

$ pidof lldb
6177
$ /home/dantipov/.local/llvm-6.0.0/bin/lldb
(lldb) version
lldb version 6.0.0 (<a href="http://llvm.org/svn/llvm-project/lldb/tags/RELEASE_600/rc3">http://llvm.org/svn/llvm-project/lldb/tags/RELEASE_600/rc3</a>
revision 326179)
  clang revision 326179
  llvm revision 326179
(lldb) attach 6177
Process 6177 stopped
* thread #1, name = 'lldb', stop reason = signal SIGSTOP
    frame #0: 0x00007f5518b6b313 libc.so.6`__GI___select(nfds=4,
readfds=0x00007ffda6c07ec0, writefds=0x0000000000000000,
exceptfds=0x0000000000000000, timeout=0x0000000000000000) at select.c:41
   38             struct timeval *timeout)
   39   {
   40   #ifdef __NR_select
-> 41     return SYSCALL_CANCEL (select, nfds, readfds, writefds, exceptfds,
   42                            timeout);
   43   #else
   44     int result;
  thread #2, name = 'lldb', stop reason = signal SIGSTOP
    frame #0: 0x00007f5521fa5cbb libpthread.so.0`__pthread_cond_wait at
futex-internal.h:88
   85   {
   86     int oldtype;
   87     oldtype = __pthread_enable_asynccancel ();
-> 88     int err = lll_futex_timed_wait (futex_word, expected, NULL, private);
   89     __pthread_disable_asynccancel (oldtype);
   90     switch (err)
   91       {

Executable module set to "/home/dantipov/.local/llvm-6.0.0/bin/lldb".
Architecture set to: x86_64--linux.
(lldb) image dump symfile
Stack dump:
0.      HandleCommand(command = "image dump symfile")
Segmentation fault (core dumped)

$ gdb -q /home/dantipov/.local/llvm-6.0.0/bin/lldb core.6182 
Reading symbols from /home/dantipov/.local/llvm-6.0.0/bin/lldb...done.
[New LWP 6182]
[New LWP 6189]
[New LWP 6183]
[New LWP 6188]
[New LWP 6187]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/home/dantipov/.local/llvm-6.0.0/bin/lldb'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fdf4b3f19f0 in lldb_private::UserID::GetID (this=0x10) at
/home/dantipov/llvm/6.0.0/source/tools/lldb/include/lldb/Utility/UserID.h:60
60        lldb::user_id_t GetID() const { return m_uid; }
[Current thread is 1 (Thread 0x7fdf532c0580 (LWP 6182))]
(gdb) bt
#0  0x00007fdf4b3f19f0 in lldb_private::UserID::GetID (this=0x10) at
/home/dantipov/llvm/6.0.0/source/tools/lldb/include/lldb/Utility/UserID.h:60
#1  0x00007fdf4b984cc8 in lldb_private::operator<< (strm=..., uid=...) at
/home/dantipov/llvm/6.0.0/source/tools/lldb/source/Utility/UserID.cpp:19
#2  0x00007fdf4b83cd57 in lldb_private::Type::Dump (this=0x0, s=0x7ffe85641720,
show_context=false) at
/home/dantipov/llvm/6.0.0/source/tools/lldb/source/Symbol/Type.cpp:217
#3  0x00007fdf4b842e6e in lldb_private::TypeList::Dump (this=0x7fde472b8598,
s=0x7ffe85641720, show_context=false)
    at
/home/dantipov/llvm/6.0.0/source/tools/lldb/source/Symbol/TypeList.cpp:105
#4  0x00007fdf4b824f62 in lldb_private::SymbolVendor::Dump
(this=0x7fde472b8580, s=0x7ffe85641720)
    at
/home/dantipov/llvm/6.0.0/source/tools/lldb/source/Symbol/SymbolVendor.cpp:396
#5  0x00007fdf4caec6cd in DumpModuleSymbolVendor (strm=...,
module=0x7fde4460be70) at
/home/dantipov/llvm/6.0.0/source/tools/lldb/source/Commands/CommandObjectTarget.cpp:1431
#6  0x00007fdf4caf459a in CommandObjectTargetModulesDumpSymfile::DoExecute
(this=0x17de9e0, command=..., result=...)
    at
/home/dantipov/llvm/6.0.0/source/tools/lldb/source/Commands/CommandObjectTarget.cpp:2234
#7  0x00007fdf4b7582a2 in lldb_private::CommandObjectParsed::Execute
(this=0x17de9e0, args_string=0x7ffe85641350 "", result=...)
    at
/home/dantipov/llvm/6.0.0/source/tools/lldb/source/Interpreter/CommandObject.cpp:991
#8  0x00007fdf4b745c65 in lldb_private::CommandInterpreter::HandleCommand
(this=0x17b6cc0, command_line=0x1908ae0 "image dump symfile", 
    lazy_add_to_history=lldb_private::eLazyBoolCalculate, result=...,
override_context=0x0, repeat_on_empty_command=true, no_context_switching=false)
    at
/home/dantipov/llvm/6.0.0/source/tools/lldb/source/Interpreter/CommandInterpreter.cpp:1683
#9  0x00007fdf4b74a8b3 in
lldb_private::CommandInterpreter::IOHandlerInputComplete (this=0x17b6cc0,
io_handler=..., line="image dump symfile")
    at
/home/dantipov/llvm/6.0.0/source/tools/lldb/source/Interpreter/CommandInterpreter.cpp:2771
#10 0x00007fdf4b610c8b in lldb_private::IOHandlerEditline::Run (this=0x18c0bf0)
at /home/dantipov/llvm/6.0.0/source/tools/lldb/source/Core/IOHandler.cpp:573
#11 0x00007fdf4b5d3c3f in lldb_private::Debugger::ExecuteIOHandlers
(this=0x17b54b0) at
/home/dantipov/llvm/6.0.0/source/tools/lldb/source/Core/Debugger.cpp:961
#12 0x00007fdf4b74b48f in
lldb_private::CommandInterpreter::RunCommandInterpreter (this=0x17b6cc0,
auto_handle_events=true, spawn_thread=false, options=...)
    at
/home/dantipov/llvm/6.0.0/source/tools/lldb/source/Interpreter/CommandInterpreter.cpp:2971
#13 0x00007fdf4b41f0e8 in lldb::SBDebugger::RunCommandInterpreter
(this=0x7ffe85641cc0, auto_handle_events=true, spawn_thread=false)
    at
/home/dantipov/llvm/6.0.0/source/tools/lldb/source/API/SBDebugger.cpp:891
#14 0x0000000000406d86 in Driver::MainLoop (this=0x7ffe85641ca0) at
/home/dantipov/llvm/6.0.0/source/tools/lldb/tools/driver/Driver.cpp:1156
#15 0x0000000000407110 in main (argc=1, argv=0x7ffe85641f08) at
/home/dantipov/llvm/6.0.0/source/tools/lldb/tools/driver/Driver.cpp:1253</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>