<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/62483>62483</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            PAC not stripped from pointers in arm64e system libraries on arm64 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            compiler-rt:asan,
            platform:macos,
            compiler-rt:lsan
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          speednoisemovement
      </td>
    </tr>
</table>

<pre>
    To repro, trigger an ASAN or LSAN failure with AppKit in the stack on 13.3 (or another version that ships arm64e system libraries). The stack trace will have a bunch of unstripped pointers that fail to symbolize. This is because `STRIP_PAC_PC` no-ops when `__has_feature(ptrauth_calls)` is false.

I worked around this locally by just stripping the high bits in `ptrauth_strip` under `__has_feature(ptrauth_calls) && defined(__APPLE__) && defined(__arm64__)`, but not sure this is the best solution.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMU01vnDAQ_TXmMloEZpfCgQPddKWoUbVqckcGBnBibOQZNtr--spsPtRDpF7w4c2b9_TmoYj0aBErcfguDneRWnlyvqIFsbdOE87ugjNajlrXX6snBx4X74Q8Ans9juhBWagf61_gPDyEd1DarB7hVfME9bL81AzaAk8IxKp7AWchzeIMhCxcoDue0MMFPWkX5hQDTXohUH7O9wh0JcYZjG698hpJyDKGp4917FUX1IyBSV0QFLSr7SZwA6yW2OtlwR4Wpy2jp9v-4BHYAV3n1hn9B8NCTaAJWuzUSggiTx6fft-fm3N9bM5HkSdg3c4tBK8T2gA3zaSoGVDx6lHIYmEf4ms6ZUwwGSiaYFCGMBbJnUjq2_ceXp1_wR6Ud6vtgYO0cYF3hfYKzysx3JxrO27JTXqcoNVMIUqRJ-9a21QQWm2P_n9cgZC5kDn0OGiLvZBF09Tn88OPpvkC3c6woSJPwuXblcE6Bgpn5rfcgssWg3FnVtbOxlFfZX2ZlSrCKs0LWeb7UhbRVMmiTGWXZ2XeIRZ9nu4PfaZyhUXXqUGlka5kIrPkkKRpkR5kEZffukOvVFnKbMhQDmKf4Ky0iY25zLHzY6SJVqxyuS-yyKgWDW2VlrJz86IN-p1nkdWKlBVSCnkUUi5G8eD8LLJ6Vp2jD-BfjnnjHO4iXwXBXbuOJPaJ0cT0aYE1G6zO9fEWznvzBu_mz_pp-1Wtw3-xQRCt3lQT80Iiq4U8CXkaNU9rG3duFvIUFN-e3eLdM3Ys5GlLgIQ8bSH8DQAA__97Y0gw">