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

[lworld] Improper layout computation of classes with empty value field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • repo-valhalla
    • hotspot

      Consider this class:

      value class Empty {}

      value class EmptyEmpty {
          @NullRestricted
          Empty e;
      }

      Then, EmptyEmpty is incorrectly calculated to have the size of 1. If it is contained in a class:

      class Holder1 {
          @NullRestricted
          EmptyEmpty e;
          byte b;
      }

      Then Holder1 will have the field b at offset 13.

            Unassigned Unassigned
            qamai Quan Anh Mai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: