From 49f8ce6e9c797cd11ea586e3cf87398888bc8cf1 Mon Sep 17 00:00:00 2001 From: Martin Doerr Date: Mon, 11 Oct 2021 10:31:54 +0000 Subject: [PATCH] 8274773: [TESTBUG] UnsafeIntrinsicsTest intermittently fails on weak memory model platform Reviewed-by: eosterlund, goetz --- test/hotspot/jtreg/compiler/gcbarriers/UnsafeIntrinsicsTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/test/hotspot/jtreg/compiler/gcbarriers/UnsafeIntrinsicsTest.java b/test/hotspot/jtreg/compiler/gcbarriers/UnsafeIntrinsicsTest.java index 321f60ea8b7..c006bc608d1 100644 --- a/test/hotspot/jtreg/compiler/gcbarriers/UnsafeIntrinsicsTest.java +++ b/test/hotspot/jtreg/compiler/gcbarriers/UnsafeIntrinsicsTest.java @@ -289,6 +289,7 @@ class Runner implements Runnable { private Node mergeImplLoad(Node startNode, Node expectedNext, Node head) { // Atomic load version Node temp = (Node) UNSAFE.getReference(startNode, offset); + UNSAFE.storeFence(); // Make all new Node fields visible to concurrent readers. startNode.setNext(head); return temp; }