Integrated: 8286596: AArch64: -XX:UseBranchProtection=pac-ret crashes after JDK-8284161

Nick Gasson ngasson at openjdk.java.net
Tue May 17 15:15:50 UTC 2022


On Thu, 12 May 2022 14:52:18 GMT, Nick Gasson <ngasson at openjdk.org> wrote:

> `RegisterSaver::restore_live_registers()` used to call `__ leave()` but after the Loom integration it directly pops LR/FP from the stack.  With `-XX:UseBranchProtection=pac-ret` we need a call to `__ authenticate_return_address()` here to insert the AUTIA instruction to check and strip the PAC code from the saved LR.
> 
> Tested `java -XX:UseBranchProtection=pac-ret -version` on a machine that supports PAC, plus tier1.  Note that some additional fixes will be required to support virtual threads with PAC enabled.

This pull request has now been integrated.

Changeset: 87d9d7f5
Author:    Nick Gasson <ngasson at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/87d9d7f54207b00ffea510f16930f38a64b612d9
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

8286596: AArch64: -XX:UseBranchProtection=pac-ret crashes after JDK-8284161

Co-authored-by: Alan Hayward <ahayward at openjdk.org>
Reviewed-by: aph, njian

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

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


More information about the hotspot-compiler-dev mailing list