RFR: 8347422: Crash during safepoint handler execution with -XX:+UseAPX
Vladimir Kozlov
kvn at openjdk.org
Thu Jan 16 17:59:39 UTC 2025
On Fri, 10 Jan 2025 13:24:21 GMT, Jatin Bhateja <jbhateja 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.
I have few comments.
src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp line 3129:
> 3127: // o In case BASE register is one of the 32 extended GPR registers available only on targets
> 3128: // supporting Intel APX extension, then we need to emit two byte REX2 prefix to hold
> 3129: // most significant two bits of 5 bit register encoding.
Change `two byte` -> `two bytes` in two places.
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.
-------------
PR Review: https://git.openjdk.org/jdk/pull/23035#pullrequestreview-2556850168
PR Review Comment: https://git.openjdk.org/jdk/pull/23035#discussion_r1918967338
PR Review Comment: https://git.openjdk.org/jdk/pull/23035#discussion_r1918968951
More information about the hotspot-compiler-dev
mailing list