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

SA: Check and fix cases of potential data loss due to 'long' to 'int' truncation with calls to minus()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8u112, 9
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
      None

      Description

      The minus() methods in the platform specific address classes return values of type 'long'. But there are multiple areas where these return values are read into values of type 'int', with deliberate casts, thus causing potential loss of data.

      An example:
      share/classes/sun/jvm/hotspot/asm/Disassembler.java

      48 public static void decode(InstructionVisitor visitor, CodeBlob blob, Address begin , Address end) {
      49 int codeSize = (int)end.minus(begin);

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jgeorge Jini George (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: