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

Patricio Chilano Mateo pchilanomate at openjdk.org
Wed Oct 2 22:48:37 UTC 2024


On Wed, 2 Oct 2024 20:57:48 GMT, David Holmes <dholmes 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).

+1 on removing this comment. Also seems global state refers to _state for the safepoint code which doesn't apply here.

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

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


More information about the hotspot-runtime-dev mailing list