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

Symantecs JIT seems to optimize away important code.

XMLWordPrintable

    • 1.1.6
    • x86
    • windows_nt
    • Not verified



        Name: tb29552 Date: 05/18/98

        =20
        NOTE: This is a bug in 1.1.6, but the bugreport form didn't let me enter th=
        at...

        Symantecs JIT seems to optimize away important code. The code below, compil=
        ed
        using the standard javac, demonstrates a bug in the JIT on my computer (NT4=
        /sp3).

        Excuse the poor formatting...

        public class JitBug
        {
            public static void test(long param) {
        =09long a =3D param;=20
        =09long smallNumber =3D 1;=20
               =20
                boolean large =3D param > smallNumber;
                if (!large)=20
                    System.out.println("Small number.");
                else=20
                    System.out.println("Large number. Should be OK.");
               =20
                if (a < smallNumber)
        =09=09a *=3D 100;
        =09=09
                // remove the next line to see another bug.
        =09=09if (large && a !=3D param) System.out.println("\nJit error!!!\n");
        =09=09
        =09=09System.out.println(a + " and " + param + " should be equal.");
            }
           =20
            public static void main(String[] args) {
                test(19980910120545L); // this works
        =09=09test(21030101000001L); // this doesn't
            }

        }
        (Review ID: 29051)
        ======================================================================

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

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: