<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 base and derived classes are the same"
   href="https://llvm.org/bugs/show_bug.cgi?id=25253">25253</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Expression evaluation crashes when base and derived classes are the same
          </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=15115" name="attach_15115" title="Source to reproduce the bug">attachment 15115</a> <a href="attachment.cgi?id=15115&action=edit" title="Source to reproduce the bug">[details]</a></span>
Source to reproduce the bug

If the base class of a class is the same class as the class itself but with
some (not all) of the template arguments are different then the expression
evaluation runs into an infinite recursion with the following calling sequence:

frame #7036: 0x00007f7813d99397 liblldb.so.3.8`(anonymous
namespace)::EmptySubobjectMap::ComputeEmptySubobjectSizes(this=0x00007ffd0e9ae938)
+ 167 at RecordLayoutBuilder.cpp:192
frame #7037: 0x00007f7813d8e35d liblldb.so.3.8`(anonymous
namespace)::EmptySubobjectMap::EmptySubobjectMap(this=0x00007ffd0e9ae938,
Context=0x000000001c48f650, Class=0x000000001918e340) + 125 at
RecordLayoutBuilder.cpp:171
frame #7038: 0x00007f7813d8d8ca
liblldb.so.3.8`clang::ASTContext::getASTRecordLayout(this=0x000000001c48f650,
D=0x000000001918e340) const + 1546 at RecordLayoutBuilder.cpp:2909
frame #7039: 0x00007f7813d99397 liblldb.so.3.8`(anonymous
namespace)::EmptySubobjectMap::ComputeEmptySubobjectSizes(this=0x00007ffd0e9af708)
+ 167 at RecordLayoutBuilder.cpp:192
frame #7040: 0x00007f7813d8e35d liblldb.so.3.8`(anonymous
namespace)::EmptySubobjectMap::EmptySubobjectMap(this=0x00007ffd0e9af708,
Context=0x000000001c48f650, Class=0x000000001918e340) + 125 at
RecordLayoutBuilder.cpp:171
frame #7041: 0x00007f7813d8d8ca
liblldb.so.3.8`clang::ASTContext::getASTRecordLayout(this=0x000000001c48f650,
D=0x000000001918e340) const + 1546 at RecordLayoutBuilder.cpp:2909

Steps to reproduce the issue:
* g++ -g -std=c++11 RecursiveBase.cpp (source attached)
* ./bin/lldb a.out
* breakpoint set -n main
* process launch
* expression A

The attached code is based on the implementation of the __atomic_base class in
libcxx after simplifying it to the minimal test case.</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>