RFR: 8347422: Crash during safepoint handler execution with -XX:+UseAPX [v2]

Jatin Bhateja jbhateja at openjdk.org
Fri Jan 17 02:41:36 UTC 2025


On Thu, 16 Jan 2025 22:02:52 GMT, Sandhya Viswanathan <sviswanathan at openjdk.org> wrote:

>> src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp line 3133:
>> 
>>> 3131:     if (VM_Version::supports_apx_f()) {
>>> 3132:       __ cmpb(Address(rbx, 0), Assembler::REX2);
>>> 3133:       __ jcc(Assembler::notEqual, check_rex_prefix);
>> 
>> Why we not using short branch `jccb` here and in following code? We skip only `addptr` instruction.
>> 
>> On other hand jccb(Assembler::notEqual, no_adjust) at line 3093 above may be far from target after new code is added. May be use jcc there.
>
> yes, jccb seems more appropriate.

Fixed, there were two other occurrences in near vicinity in the same stubs. 
Unlike backward jumps, forward jumps are not auto demoted to short variants by assembler.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23035#discussion_r1919474368


More information about the hotspot-compiler-dev mailing list