<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 --- - Expression evaluation crashes when definition of class not available for a class"
   href="https://llvm.org/bugs/show_bug.cgi?id=24812">24812</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Expression evaluation crashes when definition of class not available for a class
          </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>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>tberghammer@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=14877" name="attach_14877" title="Source to reproduce the bug">attachment 14877</a> <a href="attachment.cgi?id=14877&action=edit" title="Source to reproduce the bug">[details]</a></span>
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.</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>