<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Segmentation fault from "frame variable" command"
   href="https://llvm.org/bugs/show_bug.cgi?id=23506">23506</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Segmentation fault from "frame variable" command
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.2
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jfcaron3@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I have a rather large program connected to a large library, and it requires
large multi-GB data files to run, so unfortunately I can't provide a full
reproducer.  When trying to debug a crash in my own program, I made lldb crash
by doing "frame variable".  I was able to run lldb under lldb and obtain the
same crash.  Here is the information I got:

// This is the last command I gave to the lldb-being-debugged.
(lldb) frame variable
Process 87705 stopped
* thread #1: tid = 0x6c04e8, 0x000000010019ce64
LLDB`clang::Decl::getASTContext() const + 4, name =
'<lldb.driver.main-thread>', queue = 'com.apple.main-thread', stop reason =
EXC_BAD_ACCESS (code=1, address=0x1c)
    frame #0: 0x000000010019ce64 LLDB`clang::Decl::getASTContext() const + 4
LLDB`clang::Decl::getASTContext() const + 4:
-> 0x10019ce64:  movzbl 0x1c(%rdi), %eax
   0x10019ce68:  cmpl   $0x3b, %eax
   0x10019ce6b:  je     0x10019cf17               ;
clang::Decl::getASTContext() const + 183
   0x10019ce71:  jmp    0x10019ce80               ;
clang::Decl::getASTContext() const + 32
(lldb) thread backtrace
* thread #1: tid = 0x6c04e8, 0x000000010019ce64
LLDB`clang::Decl::getASTContext() const + 4, name =
'<lldb.driver.main-thread>', queue = 'com.apple.main-thread', stop reason =
EXC_BAD_ACCESS (code=1, address=0x1c)
  * frame #0: 0x000000010019ce64 LLDB`clang::Decl::getASTContext() const + 4
    frame #1: 0x0000000100237e4c
LLDB`clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) const +
284
    frame #2: 0x000000010023f05f LLDB`(anonymous
namespace)::EmptySubobjectMap::ComputeEmptySubobjectSizes() + 303
    frame #3: 0x0000000100237ee5
LLDB`clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) const +
437
    frame #4: 0x00000001018d8305
LLDB`lldb_private::ClangASTType::GetChildClangTypeAtIndex(lldb_private::ExecutionContext*,
unsigned long, bool, bool, bool, std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >&, unsigned int&, int&,
unsigned int&, unsigned int&, bool&, bool&, lldb_private::ValueObject*) const +
3931
    frame #5: 0x00000001018d810a
LLDB`lldb_private::ClangASTType::GetChildClangTypeAtIndex(lldb_private::ExecutionContext*,
unsigned long, bool, bool, bool, std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >&, unsigned int&, int&,
unsigned int&, unsigned int&, bool&, bool&, lldb_private::ValueObject*) const +
3424
    frame #6: 0x00000001017ca3cd
LLDB`lldb_private::ValueObject::CreateChildAtIndex(unsigned long, bool, int) +
247
    frame #7: 0x00000001017c9d44
LLDB`lldb_private::ValueObject::GetChildAtIndex(unsigned long, bool) + 124
    frame #8: 0x0000000101a4b7eb
LLDB`lldb_private::FormatManager::ShouldPrintAsOneLiner(lldb_private::ValueObject&)
+ 273
    frame #9: 0x0000000101a26b41
LLDB`lldb_private::ValueObjectPrinter::PrintChildrenIfNeeded(bool, bool) + 303
    frame #10: 0x0000000101a262ac
LLDB`lldb_private::ValueObjectPrinter::PrintValueObject() + 138
    frame #11: 0x00000001017cfb13
LLDB`lldb_private::ValueObject::Dump(lldb_private::Stream&,
lldb_private::DumpValueObjectOptions const&) + 53
    frame #12: 0x0000000101720e6e
LLDB`CommandObjectFrameVariable::DoExecute(lldb_private::Args&,
lldb_private::CommandReturnObject&) + 2338
    frame #13: 0x0000000101835fa1
LLDB`lldb_private::CommandObjectParsed::Execute(char const*,
lldb_private::CommandReturnObject&) + 277
    frame #14: 0x000000010182b52b
LLDB`lldb_private::CommandInterpreter::HandleCommand(char const*,
lldb_private::LazyBool, lldb_private::CommandReturnObject&,
lldb_private::ExecutionContext*, bool, bool) + 5479
    frame #15: 0x000000010182d6f1
LLDB`lldb_private::CommandInterpreter::IOHandlerInputComplete(lldb_private::IOHandler&,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> >&) + 211
    frame #16: 0x000000010184494c LLDB`lldb_private::IOHandlerEditline::Run() +
292
    frame #17: 0x0000000101767270
LLDB`lldb_private::Debugger::ExecuteIOHanders() + 86
    frame #18: 0x000000010182dddb
LLDB`lldb_private::CommandInterpreter::RunCommandInterpreter(bool, bool) + 119
    frame #19: 0x000000010000381c lldb`Driver::MainLoop() + 1728
    frame #20: 0x0000000100003b58 lldb`main + 268
    frame #21: 0x00007fff95c665fd libdyld.dylib`start + 1</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>