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

LIR_Opr::vreg_number() and data() can return negative number

XMLWordPrintable

    • b26

        This code seems wrong:

        uintptr_t data() const { return value() >> data_shift; }

        It's doing a signed shift, so the sign bit is going to be extended into the unsigned result, giving a value that is too large.

        In JDK-8261235, non_data_bits was changed to work around this problem, but the real problem is the sign bit. non_data_bits should not count pointer_bits because pointer_bits is actually included in kind_bits (see JDK-8287288).

              dlong Dean Long
              dlong Dean Long
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: