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

Sandhya Viswanathan sviswanathan at openjdk.org
Thu Jan 16 22:05:36 UTC 2025


On Thu, 16 Jan 2025 17:53:26 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> This bug fix patch fixes an internal error seen during safepoint handler execution.
>> The problem occurs due to missing handling for REX2 prefixed polling test instruction.
>> 
>> Manually verified the patch with the -XX:+SafepointALot runtime flag.
>> 
>> Best Regards,
>> Jatin
>> PS: Patch will be opened for review after some validation.
>
> 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.

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

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


More information about the hotspot-compiler-dev mailing list