Skip to content

Commit 19a1969

Browse files
committed
8274773: [TESTBUG] UnsafeIntrinsicsTest intermittently fails on weak memory model platform
Backport-of: 49f8ce6e9c797cd11ea586e3cf87398888bc8cf1
1 parent e59323f commit 19a1969

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/hotspot/jtreg/compiler/gcbarriers/UnsafeIntrinsicsTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ private Node merge(Node startNode, Node expectedNext, Node head, boolean test_fa
285285
private Node mergeImplLoad(Node startNode, Node expectedNext, Node head) {
286286
// Atomic load version
287287
Node temp = (Node) UNSAFE.getObject(startNode, offset);
288+
UNSAFE.storeFence(); // Make all new Node fields visible to concurrent readers.
288289
startNode.setNext(head);
289290
return temp;
290291
}

0 commit comments

Comments
 (0)