United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6984056 C1: incorrect code for integer constant addition on x64
JDK-6984056 : C1: incorrect code for integer constant addition on x64

Details
Type:
Bug
Submit Date:
2010-09-11
Status:
Closed
Updated Date:
2011-04-23
Project Name:
JDK
Resolved Date:
2011-04-23
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs20
Fixed Versions:
hs20 (b01)

Related Reports
Backport:
Backport:
Duplicate:

Sub Tasks

Description
Nightly test java/util/Collections/Rotate.java failed with:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xfffffd7ff658ff92, pid=2037, tid=16
#
# JRE version: 7.0
# Java VM: OpenJDK 64-Bit Server VM (19.0-b06-201009091225.ct232829.6934483-fastdebug compiled mode solaris-amd64 )
# Problematic frame:
# J  java.util.ArrayList.get(I)Ljava/lang/Object;
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

                                    

Comments
EVALUATION

C1 generates incorrect code for addition of a constant to an int. Instead of emitting a 32bit arithmetic operation it does 64bit. That causes usage of the upper bits instead of overflowing, which causes incorrect results.
                                     
2010-09-11
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/7f9553bedfd5
                                     
2010-09-12
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/7f9553bedfd5
                                     
2010-09-28
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/7f9553bedfd5
                                     
2010-10-09



Hardware and Software, Engineered to Work Together