-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b106
-
x86
-
linux
-
Not verified
FULL PRODUCT VERSION :
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b95)
Java HotSpot(TM) Server VM (build 1.6.0-rc-b95, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux xxxxxx 2.6.16 #2 SMP Mon Mar 27 17:30:45 CEST 2006 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Math.random() and Math.initRNG() uses DCL (double checked locking) on " private static Random randomNumberGenerator".
Breaks in a multi processor environment, resulting in a NPE.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Init field "private static Random randomNumberGenerator" in static initializer
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Spurius NullPointerException
REPRODUCIBILITY :
This bug can be reproduced rarely.
CUSTOMER SUBMITTED WORKAROUND :
Do not use Math.random
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b95)
Java HotSpot(TM) Server VM (build 1.6.0-rc-b95, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux xxxxxx 2.6.16 #2 SMP Mon Mar 27 17:30:45 CEST 2006 x86_64 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Math.random() and Math.initRNG() uses DCL (double checked locking) on " private static Random randomNumberGenerator".
Breaks in a multi processor environment, resulting in a NPE.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Init field "private static Random randomNumberGenerator" in static initializer
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Spurius NullPointerException
REPRODUCIBILITY :
This bug can be reproduced rarely.
CUSTOMER SUBMITTED WORKAROUND :
Do not use Math.random
- duplicates
-
JDK-7118654 Math.randomNumberGenerator initialization should be re-examined
-
- Closed
-
-
JDK-6464008 Math and StrictMath random() Javadocs are inconsistent with code
-
- Closed
-
-
JDK-6633229 java.lang.Math#random uses broken double checked locking
-
- Closed
-