RFR: 8274773: [TESTBUG] UnsafeIntrinsicsTest intermittently fails on weak memory model platform

Erik Österlund eosterlund at openjdk.java.net
Fri Oct 8 15:03:06 UTC 2021


On Tue, 5 Oct 2021 12:27:05 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

> The test creates new Nodes and publishes them to concurrent readers. This requires at least release and load_consume. A clean fix would be to make `Node.next` volatile. But that would be a sledgehammer. A minimalistic fix for our supported weak memory model platforms is to insert a `storeFence`. What is better?
> (See JBS for failure description.)

Yeah I have the same fix in the generational ZGC repository. Got bitten by the same issue and used the same solution. Looks good.

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

Marked as reviewed by eosterlund (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/5823



More information about the hotspot-gc-dev mailing list