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
Thu Oct 3 09:13:38 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.
I guess I must confess to my real motivation here.
We have a sort-of-knee-jerk reaction to finding concurrency bugs, sometimes caused by a misunderstanding of primitive sematics, of sprinkling fences around just in case rather than fixing the mistakes. I guess the main motivation is fear: we just don't know what is lurking here. But all that does is paper over the cracks, and it makes it very hard to reason about the code. There is no way to know whether some logic relies on a side effect of locking. It's much better _for the reader_ if we make all of this explicit, rather than implied.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21295#issuecomment-2390911410
More information about the hotspot-runtime-dev
mailing list