[lldb-dev] [Bug 24812] New: Expression evaluation crashes when definition of class not available for a class

via lldb-dev lldb-dev at lists.llvm.org
Mon Sep 14 08:29:51 PDT 2015


            Bug ID: 24812
           Summary: Expression evaluation crashes when definition of class
                    not available for a class
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: tberghammer at google.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 14877
  --> https://llvm.org/bugs/attachment.cgi?id=14877&action=edit
Source to reproduce the bug

Steps to reproduce:
* Compile the attached inferior with clang++ (tested with clang-3.5 on Linux
x86_64) with the following command line: "clang++ -g ss.cpp"
* lldb a.out
* (lldb) breakpoint set -n main
* (lldb) run
* (lldb) next
* (lldb) expression f

* Observed behavior: LLDB crashes with
"llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp:2868: const
clang::ASTRecordLayout &clang::ASTContext::getASTRecordLayout(const
clang::RecordDecl *) const: Assertion `D && "Cannot get layout of forward
declarations!"' failed"
* Expected behavior: The content off the variable displayed correctly
* Acceptable behavior: LLDB displays an error message without crashing

The root cause of the problem is that clang only includes the declaration of
std::string in the debug info and expects that the debugger can access to it
from a different source. If "-fno-limit-debug-info" is specified to the
compiler, then the error disappears.

The crash can happen during any part of the debug session (e.g. single
stepping, back tracing), but reproducing it in those cases is more difficult.

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/20150914/2cbc3fec/attachment.html>

More information about the lldb-dev mailing list