Split from 7117936 for the java.lang.Math.random() part.
FULL PRODUCT VERSION :
Java source code, both 1.6 and 1.7
A DESCRIPTION OF THE PROBLEM :
java.util.Locale.getDefault() has following flaw: As nothing in the source code seems to impose any multithread visibility constraints (happen-before relationships) it is possible for field defaultLocale to have non-null value before the default-locale-instance is fully initialized. Same problem exists in java.lang.Math.random().
FULL PRODUCT VERSION :
Java source code, both 1.6 and 1.7
A DESCRIPTION OF THE PROBLEM :
java.util.Locale.getDefault() has following flaw: As nothing in the source code seems to impose any multithread visibility constraints (happen-before relationships) it is possible for field defaultLocale to have non-null value before the default-locale-instance is fully initialized. Same problem exists in java.lang.Math.random().
- duplicates
-
JDK-6470700 Math.random() / Math.initRNG() uses "double checked locking"
-
- Closed
-
- relates to
-
JDK-7117936 java.util.Locale getDefault() initialization is broken
-
- Closed
-