United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7047491 C1: registers saved incorrectly when calling checkcast_arraycopy stub
JDK-7047491 : C1: registers saved incorrectly when calling checkcast_arraycopy stub

Details
Type:
Bug
Submit Date:
2011-05-23
Status:
Resolved
Updated Date:
2012-12-05
Project Name:
JDK
Resolved Date:
2011-06-04
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs21
Fixed Versions:
hs21 (b15)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
Incorrect handling of the registers make runThese run with -d64 -Xcomp -XX:+TieredCompilation fail one of the test on 64bit windows:

[Enter:gnu.testlet.SimpleTestHarness -testbase tests/mauve/classes gnu.testlet.java.lang.System.arraycopy]
FAIL: gnu.testlet.java.lang.System.arraycopy (number 18)
1 of 23 tests failed
FAIL
#Failed; gnu.testlet.SimpleTestHarness; (1,0,0,1,0)
[Exit:gnu.testlet.SimpleTestHarness -testbase tests/mauve/classes gnu.testlet.java.lang.System.arraycopy]

                                    

Comments
EVALUATION

The problem is that when we call the checkcast_arraycopy stub we assume that it abides to C calling convention, but in fact it doesn't, so it can kill the registers containing arguments that are expected later by the slow stub. The easiest solution is to save argument registers before the call and then restore them.
                                     
2011-05-23
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/28263a73ebfb
                                     
2011-05-26
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/442ef93966a9
                                     
2011-06-02
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/28263a73ebfb
                                     
2011-06-03
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/442ef93966a9
                                     
2011-06-09



Hardware and Software, Engineered to Work Together