RFR: 8261837: SIGSEGV in ciVirtualCallTypeData::translate_from [v5]

Andrew Haley aph at openjdk.org
Mon Nov 17 09:36:36 UTC 2025


On Thu, 23 Nov 2023 00:34:20 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Type profiling code based on the x86 implementation uses XOR to check if the MDO value matches the klass, then later stores that XORed value into the MDO if the MDO value was 0.  However, there is a race here if we reload the MDO value to check for 0, resulting in storing OBJ_KLASS XOR MDO_KLASS back to the MDO.
>> 
>> I took a stab at riscv, but I don't have a way to test it.
>
> Dean Long has updated the pull request incrementally with one additional commit since the last revision:
> 
>   riscv patch from Fei Yang <fyang at openjdk.org>

src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp line 3658:

> 3656: #endif
> 3657:       // atomic update to prevent overwriting Klass* with 0
> 3658:       __ lock();

One thing I'm curious about: why is the locked update only here on x86, and not in any other port?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16750#discussion_r2533363164


More information about the hotspot-runtime-dev mailing list