<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 crashes when inspecting an object created using ni::type_hierarchy"
   href="https://bugs.llvm.org/show_bug.cgi?id=48342">48342</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLDB crashes when inspecting an object created using ni::type_hierarchy
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>hbursk@fender.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>jdevlieghere@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When using the Native Instruments open source library matchine, the
ni::type_hierarchy objects crash the LLDB RPC Server when inspected using Xcode
12. 

Here is the issue filed against the matchine library:
<a href="https://github.com/NativeInstruments/matchine/issues/1">https://github.com/NativeInstruments/matchine/issues/1</a>

Here is an example that crashes LLDB. It requires the matchine library which
has a dependency on boost. 

```
#include <iostream>
#include <ni/type_hierarchy.h>

struct EventBase {
    EventBase() = default;
    virtual ~EventBase() = default;
};

using Event = ni::type_hierarchy::from_base<EventBase>;

NI_SUB_TYPE(struct TestEvent, Event)
{
    int value = 0;
    TestEvent(int value_)
    : value( value_ )
    {
    }
};

int main(int argc, const char * argv[]) {
    TestEvent testEvent(100);

    // insert breakpoint here to inspect testEvent
    // inpecting testEvent will crash LLDB
    TestEvent testEvent2(200);


    return 0;
}
```</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>