JDK-7177923 : SIGBUS on sparc in compiled code for java.util.Calendar.clear()
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs24
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: sparc
  • Submitted: 2012-06-18
  • Updated: 2013-07-31
  • Resolved: 2012-07-03
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 7 JDK 8 Other
7u40Fixed 8Fixed hs24Fixed
Related Reports
Relates :  
Several Nightly tests java/util and regression/jit which called java.util.Calendar.clear() crashed with SIGBUS on sparc:


They crashed on vector instruction which zeros byte array in compiled code for java.util.Calendar.clear():

;; ffffffff77afa2bc 06 47 ff ed             bl,pn   %icc, 0xffffffff77afa270
;; ---------------
;; ffffffff77afa2c0 c0 74 20 10             clrx  [ %l0 + 0x10 ]

     BPlt   B14      ! Loop end  P=0.900000 C=-1.000000
     STX    #0,[R_L0 + #16]  ! store zero vector (8 bytes)

There is no promoted 7u40 or 8fcs build with the issue present, so it can't be reproduced. Closed as not verified (setup not available).

EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/6f8f439e247d

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/6f8f439e247d

EVALUATION There are 2 arrays which are zeroed in loop in java.util.Calendar.clear(): protected int fields[]; protected boolean isSet[]; transient private int stamp[]; public final void clear() { for (int i = 0; i < fields.length; ) { stamp[i] = fields[i] = 0; // UNSET == 0 isSet[i++] = false; } areAllFieldsSet = areFieldsSet = false; isTimeSet = false; } all of 0 stores are vectorized after changes for 7119644. The problem is that pre-loop does only 2 iterations which is enough to align vector stores for in arrays but it is not enough for byte array. As result vector store into iiSet[] is not aligned in main loop.