JDK-7009756 : volatile variables could be broken throw reflection API
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: x86
  • Submitted: 2010-12-30
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u25Fixed 7Fixed hs20Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
See example in attachement.
Bug is reproduced with -server on sparc after several iterations.
Originally was found by JR test.

Comments
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.
08-01-2011

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