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 20:47: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.

Well I admit I have gotten myself quite confused here. I've always been used to expressing the requirements as roach-motel, together with the general acquire/release properties of a critical section. But a fence on acquiring the lock precludes roach-motel, so in that regard I would not expect mutex locking to include a fence. But lock-based synchronization is obviously completely broken if accesses could move out of the locked region.

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

PR Comment: https://git.openjdk.org/jdk/pull/21295#issuecomment-2389665122


More information about the hotspot-runtime-dev mailing list