[llvm-bugs] [Bug 37054] New: MI '-info sharedlibrary' command crash

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Apr 9 02:44:33 PDT 2018


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

            Bug ID: 37054
           Summary: MI '-info sharedlibrary' command crash
           Product: lldb
           Version: 6.0
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: dantipov at nvidia.com
                CC: llvm-bugs at lists.llvm.org

To reproduce:

$ ldb-mi 
(gdb)
-file-exec-and-symbols /path/to/executable
^done
(gdb)
=library-loaded,...
-target-attach PID
^done...
(gdb)
-info sharedlibrary
~"From        To          Syms Read   Shared Object Library"
~"0x0000000000400238    0x0000000000411b2c      Yes            
/path/to/executable"
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid
Aborted (core dumped)

Expected lldb-mi backtrace is:

(gdb) bt
#0  0x00007fd092c16660 in raise () from /lib64/libc.so.6
#1  0x00007fd092c17d1f in abort () from /lib64/libc.so.6
#2  0x00007fd09358c025 in __gnu_cxx::__verbose_terminate_handler() () from
/lib64/libstdc++.so.6
#3  0x00007fd093589c16 in __cxxabiv1::__terminate(void (*)()) () from
/lib64/libstdc++.so.6
#4  0x00007fd093589c61 in std::terminate() () from /lib64/libstdc++.so.6
#5  0x00007fd093589ea4 in __cxa_throw () from /lib64/libstdc++.so.6
#6  0x00007fd0935b380f in std::__throw_logic_error(char const*) () from
/lib64/libstdc++.so.6
#7  0x000000000047f770 in std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>
(this=0x7ffd7545a0c8, __beg=0x0, 
    __end=0xffffffffffffffff <error: Cannot access memory at address
0xffffffffffffffff>) at /usr/include/c++/7/bits/basic_string.tcc:212
#8  0x00007fd09362243f in std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string(char const*,
std::allocator<char> const&) ()
   from /lib64/libstdc++.so.6
#9  0x0000000000473ece in CMIUtilString::CMIUtilString (this=0x7ffd7545a0c0,
vpData=0x0) at
/home/dantipov/llvm/6.0.0/source/tools/lldb/tools/lldb-mi/MIUtilString.cpp:41
#10 0x000000000042d577 in CMICmdCmdGdbInfo::PrintFnSharedLibrary
(this=0x11115d0) at
/home/dantipov/llvm/6.0.0/source/tools/lldb/tools/lldb-mi/MICmdCmdGdbInfo.cpp:203
#11 0x000000000042d029 in CMICmdCmdGdbInfo::Execute (this=0x11115d0) at
/home/dantipov/llvm/6.0.0/source/tools/lldb/tools/lldb-mi/MICmdCmdGdbInfo.cpp:97
#12 0x000000000044982e in CMICmdInvoker::CmdExecute (this=0x7a54c0
<MI::ISingleton<CMICmdInvoker>::Instance()::instance>, vCmd=...)
    at
/home/dantipov/llvm/6.0.0/source/tools/lldb/tools/lldb-mi/MICmdInvoker.cpp:199
#13 0x000000000044b9e6 in CMICmdMgr::CmdExecute (this=0x7a5f80
<MI::ISingleton<CMICmdMgr>::Instance()::instance>, vCmdData=...)
    at
/home/dantipov/llvm/6.0.0/source/tools/lldb/tools/lldb-mi/MICmdMgr.cpp:200
#14 0x000000000046d3ae in CMIDriver::ExecuteCommand (this=0x7a5c40
<MI::ISingleton<CMIDriver>::Instance()::instance>, vCmdData=...)
    at
/home/dantipov/llvm/6.0.0/source/tools/lldb/tools/lldb-mi/MIDriver.cpp:1012
#15 0x000000000046cf45 in CMIDriver::InterpretCommandThisDriver (this=0x7a5c40
<MI::ISingleton<CMIDriver>::Instance()::instance>, vTextLine=..., 
    vwbCmdYesValid=@0x7ffd7545ab4d: true) at
/home/dantipov/llvm/6.0.0/source/tools/lldb/tools/lldb-mi/MIDriver.cpp:960
#16 0x000000000046cb7b in CMIDriver::InterpretCommand (this=0x7a5c40
<MI::ISingleton<CMIDriver>::Instance()::instance>, vTextLine=...)
    at
/home/dantipov/llvm/6.0.0/source/tools/lldb/tools/lldb-mi/MIDriver.cpp:839
#17 0x000000000046c83a in CMIDriver::DoMainLoop (this=0x7a5c40
<MI::ISingleton<CMIDriver>::Instance()::instance>)
    at
/home/dantipov/llvm/6.0.0/source/tools/lldb/tools/lldb-mi/MIDriver.cpp:589
#18 0x000000000046fe9b in CMIDriverMgr::DriverMainLoop (this=0x7a74e0
<MI::ISingleton<CMIDriverMgr>::Instance()::instance>)
    at
/home/dantipov/llvm/6.0.0/source/tools/lldb/tools/lldb-mi/MIDriverMgr.cpp:293
#19 0x000000000046f512 in main (argc=1, argv=0x7ffd7545aea8) at
/home/dantipov/llvm/6.0.0/source/tools/lldb/tools/lldb-mi/MIDriverMain.cpp:193

-- 
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/20180409/12686fcd/attachment.html>


More information about the llvm-bugs mailing list