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

Vladimir Kozlov kvn at openjdk.org
Tue Nov 21 23:34:25 UTC 2023


On Tue, 21 Nov 2023 23:31:09 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:
> 
>   redo for x86

src/hotspot/cpu/x86/interp_masm_x86.cpp line 87:

> 85:   // profiling to this obj's klass
> 86:   xorptr(obj, rscratch1); // get back original value before XOR
> 87:   xorptr(obj, mdo_addr);

Was it bug here originally? We had 2 xors (including this) and now 3 for `obj`.

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

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


More information about the hotspot-compiler-dev mailing list