incorrect heap field indices reported: primitive static fields and subclasses of Throwable

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 6
    • Affects Version/s: 6
    • Component/s: hotspot
    • None
    • b52
    • 6
    • b53
    • generic
    • generic

      When dumping the field indices of these fields ---

      interface I {
          public int p = 0;
      }

      interface I1 {
          public int x = 0;
      }

      interface I2 extends I {
          public int y = 1;
      }

      class C1 implements I1 {
          public int a;
          public int b;
          public static int c = 3;
      }

      class C2 extends C1 implements I2 {
          public int q;
          public static int r = 7;
          public int s;
      }

      class T extends Throwable {
          public int yak;
          public static int yuck = 5;
      }

      primitive static fields are computed incorrectly ---

      Note: field: index=8 kind=2, type=I, tag=100
      Note: field: index=6 kind=2, type=I, tag=100
      Note: field: index=4 kind=2, type=I, tag=100
      Note: field: index=3 kind=2, type=I, tag=100
      Note: field: index=4 kind=2, type=I, tag=900
      Note: field: index=0 kind=8, type=J, tag=700
      Note: field: index=0 kind=8, type=I, tag=200
      Note: field: index=0 kind=8, type=I, tag=202
      ERROR: mismatched field: index=0 expected=1
      Note: field: index=0 kind=8, type=I, tag=201
      Note: field: index=1 kind=8, type=I, tag=300
      ERROR: mismatched field: index=1 expected=7
      Note: field: index=1 kind=8, type=I, tag=1000
      ERROR: mismatched field: index=1 expected=5
      Error : expected to find 11 fields, got 8

      once this is repaired, sub-classes of Throwable also do not eliminate the backtrace field.

      These problems are follow ons to the unification of field indices.

            Assignee:
            Robert Field (Inactive)
            Reporter:
            Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: