On Fri, 10 Jul 2026 16:02:56 GMT, Ashay Rane <[email protected]> wrote:

>> Regarding the test you've done, IIUC, you built one JDK with 
>> `--enable-branch-protection` and ran the jtreg tests with VM option 
>> `-XX:UseBranchProtection=standard`.
>> 
>> Note that as listed in https://bugs.openjdk.org/browse/JDK-8388072, I found 
>> ~500 jtreg failures on Linux/AArch64(i.e. Neoverse-V1 cpu).  I was wondering 
>> did you find any jtreg failure on Win/AArch64 side? Thanks
>
> Hi @shqking, thanks much for running the tests with 
> "-XX:UseBranchProtection".  I was under the (now mistaken) assumption that 
> because this patch doesn't change the runtime CPU detection code for the 
> CPU_PACA feature, the "-XX:UseBranchProtection" flag would have no effect, so 
> I was running tests without passing 
> "JTREG=VM_OPTIONS=-XX:UseBranchProtection=standard".
> 
> I was able to reproduce the assertion failure.  The problem is that the LHS 
> of the assertion (`top.pc()`) is after removing the pointer signature (see 
> `frame::frame()` in frame_aarch64.inline.hpp) whereas the RHS uses the raw 
> pointer.  I fixed this locally by calling 
> `ContinuationHelper::return_address_at()` on the RHS pointer.  That call 
> invokes `pauth_strip_verifiable()` on AArch64 but it's a NOP on other 
> platforms.
> 
> Since you have a JBS issue for this, would you like to add it to your fix?  
> If not, I'm happy to roll it into this patch.  In the meantime, I'll go run 
> all of my tests again with "-XX:UseBranchProtection=standard".

@raneashay Thanks for your reply.

Yes, adding ContinuationHelper::return_address_at() should resolve the 
assertion failure. Based on my local testing, there are several call sites 
where this helper is required, and I currently have a WIP fix addressing them.

> Since you have a JBS issue for this, would you like to add it to your fix? If 
> not, I'm happy to roll it into this patch. In the meantime, I'll go run all 
> of my tests again with "-XX:UseBranchProtection=standard".

Either approach works for me. That said, I suggest keeping this PR narrowly 
scoped—focused on the build system and C runtime changes rather than Java 
code—and handling the assertion fixes separately under my JBS issue. WDYT?

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

PR Comment: https://git.openjdk.org/jdk/pull/31795#issuecomment-4940271650

Reply via email to