RFR: 8325937: runtime/handshake/HandshakeDirectTest.java causes "monitor end should be strictly below the frame pointer" assertion failure on AArch64

David Holmes dholmes at openjdk.org
Wed Oct 2 21:00:37 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.

src/hotspot/share/runtime/handshake.cpp line 260:

> 258:       SystemMemoryBarrier::emit();
> 259:     } else {
> 260:       OrderAccess::fence(); // storestore|storeload, global state -> local state

The comment is somewhat confusing as a fence is logically all four of the storeload etc barriers not just the pair listed. I suggest just removing the comment. And yes I realize this was copied from the safepoint code (but it also has a comment on the emit that is not here, so it is okay if they differ).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21295#discussion_r1785242673


More information about the hotspot-runtime-dev mailing list