RFR: 8352317: Assertion failure during size estimation of BoxLockNode with -XX:+UseAPX

Tobias Hartmann thartmann at openjdk.org
Thu Mar 20 14:40:09 UTC 2025


On Wed, 19 Mar 2025 06:50:39 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

> This patch fixes a crash during PhaseOutput while estimating the size of BoxLockNode.
> LEA instruction used to load the stack location holding a thread-specific lock in fast locking mode did not account for an additional byte of REX2 prefix if the destination register is an EGPR.
> 
>           LEA GPR/EGPR OFFSET(RSP).
> 
> This fixed multiple issues seen in SPECjvm2008 worklets.
> 
> The issue can be reproduced after changing the static allocation ordering in x86_64.ad giving preference to the EGPR register.
> [JDK-8343294](https://bugs.openjdk.org/browse/JDK-8343294) tracks the requirement to randomize the allocation sequence.
> 
> Kindly review and share your feedback.
> 
> Best Regards,
> Jatin

Looks reasonable to me.

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

Marked as reviewed by thartmann (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24109#pullrequestreview-2703010555


More information about the hotspot-compiler-dev mailing list