<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 while printing optional<string> member from parent class"
   href="https://bugs.llvm.org/show_bug.cgi?id=52393">52393</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLDB crashes while printing optional<string> member from parent class
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>12.0
          </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>manas18244@iiitd.ac.in
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>jdevlieghere@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=25419" name="attach_25419" title="Stack trace produced before segfault">attachment 25419</a> <a href="attachment.cgi?id=25419&action=edit" title="Stack trace produced before segfault">[details]</a></span>
Stack trace produced before segfault

```c++ (-std=c++17)
#include <string>
#include <optional>
using namespace std;

class A {
public:
  optional<string> Label;
  A() {}
};

class B : public A {
public:
  B() {}
  void foo();
};

void B::foo() {
  return;
}

int main() {
  B *Obj = new B();
  Obj->foo();
  return 0;
}
```

The above code when compiled with
  g++ (GCC) 11.1.0
and tried to debug via
  1. lldb version 12.0.1, and also with
  2. lldb version 14.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a> revision
3be3c944a5bacfd208b56853941b0fa4dec3ddcc)
  clang revision 3be3c944a5bacfd208b56853941b0fa4dec3ddcc
  llvm revision 3be3c944a5bacfd208b56853941b0fa4dec3ddcc

produces the following trace and crashes with segfault.</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>