On Mon, 2 Feb 2026 15:43:43 GMT, Quan Anh Mai <[email protected]> wrote:

> Hi,
> 
> Many thanks to @stefank for finding the issue and helping investigating it. 
> This PR fixes a couple of issues:
> 
> - On Aarch64, `g1StoreLSpecialOneOop` does not save `mem` and `src` during 
> the GC pre-barrier, this risks clobber these values, which may lead to 
> crashes or memory corruption when doing the store instruction.
> - It seems that the value passed to the post-barrier should be an 
> uncompressed oop, this requires us to decode the narrow oop instead of simply 
> zero-extending it.
> - Relax the restriction on the `src` register to be an arbitrary register.
> - Split the rule into 2 so that we can avoid cloberring an additional 
> register on Aarch64 when the offset of the oop inside the payload is 0, it 
> also makes the implementation a little easier to read.
> 
> Testing:
> - [x] tier1-4, valhalla-comp-stress, linux-aarch64
> - [x] tier1-4, valhalla-comp-stress, linux-aarch64, with `-XX:+StressGCM 
> -XX:InitiatingHeapOccupancyPercent=0 -Xmn10m`
> - [x] tier1-4, valhalla-comp-stress, linux-x64
> - [x] tier1-4, valhalla-comp-stress, linux-x64, with `-XX:+StressGCM 
> -XX:InitiatingHeapOccupancyPercent=0 -Xmn10m`
> 
> Please take a look and leave your reviews, thanks a lot.

This pull request has now been integrated.

Changeset: 3407ba86
Author:    Quan Anh Mai <[email protected]>
URL:       
https://git.openjdk.org/valhalla/commit/3407ba86e52872e206d81fa24ebbfd3621a02f8d
Stats:     130 lines in 4 files changed: 86 ins; 13 del; 31 mod

8376059: [lworld] Fix the issues in code generation of StoreLSpecialNode

Reviewed-by: thartmann

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

PR: https://git.openjdk.org/valhalla/pull/2013

Reply via email to