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

Don't call methods from Compressed(Oops|Klass) if the associated mode is inactive

XMLWordPrintable

    • b22

      We should not access base and shift from either CompressedOops or CompressedClassPointers if we run with -XX:-UseCompressedOops resp. -XX:-UseCompressedClassPointers.

      This works accidentally in the stock JVM since base and shift are both statically initialized with zero. In Lilliput, however, base and shift are initialized to -1 in order to assert proper initialization.

      In general, it is best to avoid calling these methods altogether, since they make little sense in the non-compressed case.


       


            stuefe Thomas Stuefe
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: