JDK-7012965 : Fix failed on sparc for 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: 2011-01-18
  • 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 :  
Description
During bug fix verification it was found that fix for  7009756: volatile variables could be broken throw reflection API
Test is:
echeneis/vm/code/gen/default_preopt_xdebug/VolatileReflectionTest#testVolatileReflection

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/85c73c0edb06
21-01-2011

PUBLIC COMMENTS In 32 bit VM C++ generated code does not guaranty atomicity for volatile long moves. Use LDX/STX on v9 and LDD/STD on v8 sparc for volatile long moves.
19-01-2011

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/85c73c0edb06
19-01-2011

EVALUATION I should have know that volatile in C++ is different from Java volatile. It does not guaranty atomicity: 80 inline jlong OrderAccess::load_acquire(volatile jlong* p) { return *p; } 0xfe7e2458: load_acquire : save %sp, -104, %sp 0xfe7e245c: load_acquire+0x0004: st %i0, [%fp + 68] 0xfe7e2460: load_acquire+0x0008: ld [%fp + 68], %l0 0xfe7e2464: load_acquire+0x000c: ld [%l0 + 4], %l1 0xfe7e2468: load_acquire+0x0010: ld [%l0], %l0 0xfe7e246c: load_acquire+0x0014: st %l0, [%fp - 8] 0xfe7e2470: load_acquire+0x0018: st %l1, [%fp - 4] 0xfe7e2474: load_acquire+0x001c: ldx [%fp - 8], %g1 0xfe7e2478: load_acquire+0x0020: srlx %g1, 32, %l0 0xfe7e247c: load_acquire+0x0024: mov %g1, %l1 0xfe7e2480: load_acquire+0x0028: mov %l1, %i1 0xfe7e2484: load_acquire+0x002c: mov %l0, %i0 0xfe7e2488: load_acquire+0x0030: ret 0xfe7e248c: load_acquire+0x0034: restore
18-01-2011