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

JDK 1.1.6 - Version 3.00.045(x) JIT generates bad code for final class

XMLWordPrintable

    • 1.1.6
    • x86
    • windows_95
    • Not verified



        Name: tb29552 Date: 05/27/98


        /*
        This class locks up in the "while" loop,
        running with the 1.1.6 JIT, using any of
        java, javaw, jre, and jrew. It works if
        you run with -nojit.
        */
        public final class JitBug {
        int a;
        int b;
        byte array[] = new byte[1000];

        public byte incb() {
        return array[a + b++];
        }

        public void func() {
        System.out.println("before...");
        while(((a+b)&3)!=0) incb();
        System.out.println("after...");
        }

        public static void main(String[] args) {
        JitBug jb = new JitBug();
        jb.a = 36;
        jb.b = 1;
        jb.func();
        }
        }
        (Review ID: 29140)
        ======================================================================

              dviswanasunw Deepa Viswanathan (Inactive)
              tbell Tim Bell
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: