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

Comparing two longs doesn't work with the jit under win32

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • 1.1.6
    • 1.1.3, 1.1.6
    • vm-legacy
    • None
    • 1.1.6
    • generic, x86
    • generic, windows_95
    • Verified

        In the HotJava code, we compare a long to a constant and then two longs to eachother in an if statement. The first comparison works, but the second doesn't. This only happens under JDK1.1.6 with the jit and only on Win32.

        The HotJava code is in sunw.hotjava.ui.HotList (line 1267) and here is the piece of code :

        if (fileTimeStamp != 0 && fileStamp != fileTimeStamp) {
           // Do something.
        }

        fileTimeStamp is a field of the class and fileStamp is a stack local. The problem can be fixed by nesting two if statements rather than this one.

        Attached is a test class we made (Test.java) to try and get the VM to fail in a simple case. It never failed. Also, we have attached the byte codes from HotList (out.txt) and the byte codes from the test case (test.out).

        This is being filed as a P1 because, although we cannot reproduce it in the simple case, we feel it may have implications elsewhere that haven't been found yet.

        Aaron Williams
        HotJava x53214

              dviswanasunw Deepa Viswanathan (Inactive)
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: