<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 - LLDB crash when hitting up arrow in expression evaluator"
   href="https://bugs.llvm.org/show_bug.cgi?id=49845">49845</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLDB crash when hitting up arrow in expression evaluator
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>enhancement
          </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>rupprecht@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>jdevlieghere@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is at trunk. When you are prompted to enter expressions:

$ lldb
(lldb) e
Enter expressions, then terminate with an empty line to evaluate:
  1:  

... and then you hit the up arrow, it crashes (usually*):

$ lldb
(lldb) e
Enter expressions, then terminate with an empty line to evaluate:
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace.
Stack dump:
0.      Program arguments: lldb
 #0 0x00000000003b337a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
/home/rupprecht/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:11
 #1 0x00000000003b354b PrintStackTraceSignalHandler(void*)
/home/rupprecht/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:632:1
 #2 0x00000000003b1b5b llvm::sys::RunSignalHandlers()
/home/rupprecht/src/llvm-project/llvm/lib/Support/Signals.cpp:70:5
 #3 0x00000000003b3ca1 SignalHandler(int)
/home/rupprecht/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:407:1
 #4 0x00007fba26d9d140 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
 #5 0x00007fba178fd6f0 std::__cxx11::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >::length() const
(/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x1496f0)
 #6 0x00007fba1e3dc9ff
lldb_private::Editline::CountRowsForLine(std::__cxx11::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)
/home/rupprecht/src/llvm-project/lldb/source/Host/common/Editline.cpp:434:53
 #7 0x00007fba1e3dc90c
lldb_private::Editline::GetLineIndexForLocation(lldb_private::line_editor::CursorLocation,
int)
/home/rupprecht/src/llvm-project/lldb/source/Host/common/Editline.cpp:370:12
 #8 0x00007fba1e3dcab7
lldb_private::Editline::MoveCursor(lldb_private::line_editor::CursorLocation,
lldb_private::line_editor::CursorLocation)
/home/rupprecht/src/llvm-project/lldb/source/Host/common/Editline.cpp:392:7
 #9 0x00007fba1e3dd3ac
lldb_private::Editline::RecallHistory(lldb_private::line_editor::HistoryOperation)
/home/rupprecht/src/llvm-project/lldb/source/Host/common/Editline.cpp:528:3
#10 0x00007fba1e3de5fe lldb_private::Editline::PreviousLineCommand(int)
/home/rupprecht/src/llvm-project/lldb/source/Host/common/Editline.cpp:779:5
#11 0x00007fba1e3e2237
lldb_private::Editline::ConfigureEditor(bool)::$_7::operator()(editline*, int)
const
/home/rupprecht/src/llvm-project/lldb/source/Host/common/Editline.cpp:1162:13
#12 0x00007fba1e3e21fb
lldb_private::Editline::ConfigureEditor(bool)::$_7::__invoke(editline*, int)
/home/rupprecht/src/llvm-project/lldb/source/Host/common/Editline.cpp:1161:41
#13 0x00007fba16e47fc4 el_wgets
(/usr/lib/x86_64-linux-gnu/libedit.so.2+0x10fc4)
#14 0x00007fba1e3e1a78 lldb_private::Editline::GetLines(int,
lldb_private::StringList&, bool&)
/home/rupprecht/src/llvm-project/lldb/source/Host/common/Editline.cpp:1514:3
#15 0x00007fba1e2e05a9
lldb_private::IOHandlerEditline::GetLines(lldb_private::StringList&, bool&)
/home/rupprecht/src/llvm-project/lldb/source/Core/IOHandler.cpp:520:5
#16 0x00007fba1e2e07dd lldb_private::IOHandlerEditline::Run()
/home/rupprecht/src/llvm-project/lldb/source/Core/IOHandler.cpp:562:11
#17 0x00007fba1e2a071d lldb_private::Debugger::RunIOHandlers()
/home/rupprecht/src/llvm-project/lldb/source/Core/Debugger.cpp:868:16
#18 0x00007fba1e424985
lldb_private::CommandInterpreter::RunCommandInterpreter(lldb_private::CommandInterpreterRunOptions&)
/home/rupprecht/src/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp:3089:9
#19 0x00007fba1dbf629d lldb::SBDebugger::RunCommandInterpreter(bool, bool)
/home/rupprecht/src/llvm-project/lldb/source/API/SBDebugger.cpp:1214:42
#20 0x0000000000295ada Driver::MainLoop()
/home/rupprecht/src/llvm-project/lldb/tools/driver/Driver.cpp:677:3
#21 0x0000000000296d1e main
/home/rupprecht/src/llvm-project/lldb/tools/driver/Driver.cpp:940:17

(note the "1:" prompt line got eaten)

* The first time I tried to run it, it didn't crash, but it gave me bogus
history results. I guess it happened to venture into junk memory without
triggering a segfault.</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>