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

sun.jvm.hostspot.code.CompressedReadStream readDouble() conversion to long mishandled

    XMLWordPrintable

Details

    • b30
    • generic
    • generic

    Backports

      Description

        sun.jvm.hotspot.code.CompressedReadStream:readDouble

         public double readDouble() {
            int rh = readInt();
            int rl = readInt();
            int h = reverseInt(rh);
            int l = reverseInt(rl);
            return Double.longBitsToDouble((h << 32) | ((long)l & 0x00000000FFFFFFFFL));
          }

        h is an int so h<<32 is a nop. Need (long)h to shift it into the top 32 bits.

        Attachments

          Issue Links

            Activity

              People

                cjplummer Chris Plummer
                ahgross Andrew Gross
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: