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

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

XMLWordPrintable

    • b30
    • generic
    • generic

        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.

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

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: