JDK-6910664 : C2: java/util/Arrays/Sorting.java fails with DeoptimizeALot flag
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-12-15
  • Updated: 2012-02-01
  • 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
6u21Fixed 7Fixed hs17Fixed
Description
The java/util/Arrays/Sorting.java fails when DeoptimizeALot flag is enabled, with the following message: 
FAILED: Array is not sorted at ...-th position: ... and 0.0

Fails only with DeoptimizeALot flag.
The failure is intermittent, but reproduces regularly.
The problem is C2-specific.

Execution results:
http://sqeweb.sfbay/nfs/results/vm/gtee/JDK7/NIGHTLY/VM/2009-12-13/Comp_Baseline/javase/solaris-i586/server/comp/solaris-i586_server_comp_UTIL_REGRESSION/workDir/java/util/Arrays/Sorting.jtr

Affected tests:
nsk/stress/jck60/jck60012

Comments
PUBLIC COMMENTS Problem: The test has several java float locals and the compiled code has XMM registers which hold their values in debug info. But the code which restore these values during deoptimization was not updated for XMM registers usage. It assumes that float values were converted to double on stack during deoptimization as it was before SSE hardware when FPU was used. Solution: Matcher::float_in_double should be true only when FPU is used for floats.
19-02-2010

EVALUATION ChangeSet=http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/2883969d09e7,ChangeRequest=6910664
19-02-2010

EVALUATION The test has several java float locals and use XMM registers in debug info. But the code which restore these values during deoptimization was not updated for XMM registers usage. It assumes that float values were converted to double on stack as it was before SSE hardware when FPU was used.
19-02-2010

SUGGESTED FIX Add platform specific method to get float stack value from compiled frame.
19-02-2010