-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
8
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
Javadoc for Unsafe.storeFence() claims that it inserts StoreLoad memory barrier, but actually it transforms to membar_release() which has no such guarantee. StoreLoad is inserted by fullFence() only.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
/**
* Ensures lack of reordering of loads or stores before the fence
* with stores after the fence.
* @since 1.8
*/
public native void storeFence();
ACTUAL -
/**
* Ensures lack of reordering of stores before the fence
* with loads or stores after the fence.
* @since 1.8
*/
public native void storeFence();
URL OF FAULTY DOCUMENTATION :
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/sun/misc/Unsafe.java
Javadoc for Unsafe.storeFence() claims that it inserts StoreLoad memory barrier, but actually it transforms to membar_release() which has no such guarantee. StoreLoad is inserted by fullFence() only.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
/**
* Ensures lack of reordering of loads or stores before the fence
* with stores after the fence.
* @since 1.8
*/
public native void storeFence();
ACTUAL -
/**
* Ensures lack of reordering of stores before the fence
* with loads or stores after the fence.
* @since 1.8
*/
public native void storeFence();
URL OF FAULTY DOCUMENTATION :
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/687fd7c7986d/src/share/classes/sun/misc/Unsafe.java
- duplicates
-
JDK-8065804 JEP 171: Clarifications/corrections for fence intrinsics
-
- Closed
-