Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4629512

Bad exception in trivial loop on Sparc 32b -server

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.4.0, 1.4.1
    • Fix Version/s: 1.4.0_04
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      04
    • CPU:
      generic, sparc
    • OS:
      solaris_2.5.1, solaris_7

      Backports

        Description

        This program:

        class A {
         public static void main(String argv[]) {
            
            int size = 4000000;
            int x[] = new int[size];
            
            for (int i = 0; i < 1000; i++) {
              for (int j = 0; j < size; j += 8192) {
                int y = x[j];
              }
            }
          }
        }

        Fails as follows:

        mate:~> /usr/local/java/jdk1.4.0/solsparc/bin/java A
        mate:~> /usr/local/java/jdk1.4.0/solsparc/bin/java -server A
        Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
                at A.main(A.java:9)
        mate:~> /usr/local/java/jdk1.4.0/solsparc/bin/java -server -Xint A
        mate:~> /usr/local/java/jdk1.4.0/solsparc/bin/java -d64 A
        mate:~> /usr/local/java/jdk1.4.0/solsparc/bin/java -server -XX:+PrintCompilation A
          1% A::main @ 18
         (47 bytes)
        Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
                at A.main(A.java:9)
        mate:~> /usr/local/java/jdk1.4.0/solsparc/bin/java -server -version
        java version "1.4.0-rc"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-rc-b91)
        Java HotSpot(TM) Server VM (build 1.4.0-rc-b91, mixed mode)

        It does not fail in 1.3.1 or 1.2.1.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                busersunw Btplusnull User (Inactive)
                Reporter:
                dstoutamsunw David Stoutamire (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: