RFR: 8325937: runtime/handshake/HandshakeDirectTest.java causes "monitor end should be strictly below the frame pointer" assertion failure on AArch64
Andrew Haley
aph at openjdk.org
Wed Oct 2 09:44:35 UTC 2024
On Tue, 1 Oct 2024 18:38:33 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> Add missing StoreLoad fences in handshaking code to match safepoint code. Thanks to @pchilano for finding this bug.
>
> Tested with tier1-4 and tier8 which has Kitchensink in it.
> Of course we can quickly get into trouble with terminology here if we talk about acquire/release or particular store/load style barriers. The "acquire/release" description is to ensure that after locking/acquiring a mutex you see all writes performed by the thread that previously held the mutex. But you also have ordering constraints without which a critical section would be meaningless: you can't have loads/stores float outside the locked region - but that is not captured by "acquire/release".
>
> > The "synchronizes with" phrase implies sequential consistency
>
> Wouldn't SC imply the need for a fence?
No, it does not. A full fence at acquire would, for example, prevent previous accesses from being moved into a synchronized block.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21295#issuecomment-2388072238
More information about the hotspot-runtime-dev
mailing list