[Bug 352] New: hotspot produces/executes incorrect code (works with cacao and zero)

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Sat Jun 20 15:26:51 PDT 2009


http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=352

           Summary: hotspot produces/executes incorrect code (works with
                    cacao and zero)
           Product: IcedTea
           Version: unspecified
          Platform: PC
               URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=529337
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: IcedTea
        AssignedTo: unassigned at icedtea.classpath.org
        ReportedBy: doko at ubuntu.com


Current version of openjdk has a bug that causes the execution of incorrect
code when dealing with Integer.MAX_VALUE.

The problem is easily reproduceable with the following code:

public class HotSpotError {
  static public void main(String[] args) {
  int i1 = 0;
  int i2 = Integer.MAX_VALUE;
  while (i1 >= 0) {
    i1++;
    if (i1 > i2) {
      System.out.println("E R R O R: " + i1);
      return;
      }
    }
  }
}

An example of the output is this:
E R R O R: 497892

The number of the iteration at which the bug exhibits depends on the
optimisation parameters used and the release of the JDK.

$ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.5) (6b16-4)
OpenJDK Server VM (build 14.0-b15, mixed mode)


-- 
Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the distro-pkg-dev mailing list