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

Jatin Bhateja jbhateja at openjdk.org
Thu Mar 20 18:59:11 UTC 2025


On Thu, 20 Mar 2025 14:37:11 GMT, Tobias Hartmann <thartmann 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.

Thanks @TobiHartmann

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

PR Comment: https://git.openjdk.org/jdk/pull/24109#issuecomment-2741393546


More information about the hotspot-compiler-dev mailing list