[jdk17u-dev] RFR: 8357968: RISC-V: Interpreter volatile reference stores with G1 are not sequentially consistent

Feilong Jiang fjiang at openjdk.org
Fri Jun 27 08:19:46 UTC 2025


On Thu, 26 Jun 2025 07:28:17 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> Fixes RISC-V memory ordering problem.
>> This patch is not clean because [JDK-8293290](https://bugs.openjdk.org/browse/JDK-8293290) adds a third temporary register to `store_heap_oop`, which is introduced in JDK20. 
>> In JDK17, `do_oop_store` also clobbers the same `x13` as in mailine. The current fix is similar to aarch64 in mainline, but puts the flags in `x15` instead, to avoid the clobber of the volatile bits.
>> 
>> Additional testing:
>> - [x] linux-riscv64 server release, jcstress `RefDekker` test now passes
>> - [x] linux-riscv64 server release, Tier1-3
>
> Looks good!

@robehn @RealFYang -- Thanks!

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

PR Comment: https://git.openjdk.org/jdk17u-dev/pull/3678#issuecomment-3012139278


More information about the jdk-updates-dev mailing list