United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7009756 volatile variables could be broken throw reflection API
JDK-7009756 : volatile variables could be broken throw reflection API

Details
Type:
Bug
Submit Date:
2010-12-30
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs20 (b07)

Related Reports
Backport:
Backport:
Relates:
Relates:
Relates:

Sub Tasks

Description
See example in attachement.
Bug is reproduced with -server on sparc after several iterations.
Originally was found by JR test.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/4fc084dac61e
                                     
2011-01-07
PUBLIC COMMENTS

Unsafe_SetLongVolatile() and Unsafe_GetLongVolatile() are not atomic
on 32 bit x86 (C++ generates two 32 bit loads/stores).

Use Atomic::load() and Atomic::store() to access a volatile long.
                                     
2011-01-08



Hardware and Software, Engineered to Work Together