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

Final graph reshaping should not compress abstract or interface class pointers

XMLWordPrintable

    • b23

      After JDK-8338526 it is no longer legal to encode compressed class pointers for interfaces or abstract classes as they are not stored in the compressed class space any longer.

      However, in C2 final graph reshaping, it seems like we perform the following transformation (in pseudo code):

      decode(dynamic_narrow_klass) == static_klass
      =>
      dynamic_narrow_klass == encode(static_klass)

      This transformation is no longer valid if static_klass is an interface or abstract class. I can't see that there are any guards for that. I guess the result of the expression should typically be false. Encoding a not encodable klass pointer will result in garbage bits. Most of the time comparing a real compressed class to garbage bits will result in false. But I suppose sometimes you win the garbage lottery and get the wrong result.

            thartmann Tobias Hartmann
            eosterlund Erik Ă–sterlund
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: