RFR: 8351997: AArch64: Interpreter volatile reference stores with G1 are not sequentially consistent
Erik Österlund
eosterlund at openjdk.org
Wed May 28 14:07:51 UTC 2025
On Wed, 28 May 2025 11:02:22 GMT, Andrew Haley <aph at openjdk.org> wrote:
> Ouch. I think this is fine without further refactoring, especially since I see it should be backported into JDK 21 as well.
Yeah it looks like this will need backporting all the way back to 8 - before the barrier registers were explicit at all at the use site, and before there was even an access API.
> I was wondering why haven't we caught this in jcstress. jcstress runs in int/C1/C2 modes specifically to catch issues like these. I believe this slipped through because all of our seqcst tests, Dekker included, operate on primitives. So we never actually explore what happens with reference load/stores, and as this bug shows, there are _interesting_ interactions with GC barriers. I'll see how to amend jcstress to cover this...
I was also confused why jcstress hasn't caught this - seems like basic seq cst testing would have hashed this out. Great that you found out why. :-)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25483#issuecomment-2916488521
More information about the hotspot-runtime-dev
mailing list