When the VM is run with `-XX:UseBranchProtection=pac-ret` on a supported CPU, 
the upper bits of the saved link register contain a "pointer authentication 
code" which must be checked and removed by a special instruction before a 
function returns.  The serviceability agent is unaware of this and so sees 
garbled PC values when walking the stack. This patch just masks out the PAC 
bits from the sender PC after reading it from the stack frame.

-------------

Commit messages:
 - 8286711: AArch64: serviceability agent tests fail with PAC enabled

Changes: https://git.openjdk.java.net/jdk/pull/8814/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8814&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8286711
  Stats: 43 lines in 5 files changed: 35 ins; 2 del; 6 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8814.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8814/head:pull/8814

PR: https://git.openjdk.java.net/jdk/pull/8814

Reply via email to