<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 - ShadowCallStack crashing with exception handling"
   href="https://bugs.llvm.org/show_bug.cgi?id=44095">44095</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ShadowCallStack crashing with exception handling
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: AArch64
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>leonardchan@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>arnaud.degrandmaison@arm.com, llvm-bugs@lists.llvm.org, peter.smith@linaro.org, Ties.Stuij@arm.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Shadow call stack seems to be conflicting with exception handling:

```
#include <iostream>
int main () {
  try {
    throw 20;
  } catch (int e) {
    std::cout << "An exception occurred. Exception Nr. " << e << '\n';
  }
  return 0;
}
```

In this case, compiling with 

```
$ prebuilt/third_party/clang/linux-x64/bin/clang++ -std=c++17 ~/misc/test.cpp
-fno-sanitize=safe-stack -target aarch64-unknown-linux-gnu -ffixed-x18
--sysroot=prebuilt/third_party/sysroot/linux/ -g
```

then running prints 20 normally, but appending `-fsanitize=shadow-call-stack`
to the end causes a segfault.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>