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

[lworld] Verifier complains on assignment to static field, assignment to local is OK.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • repo-valhalla
    • hotspot
    • generic
    • generic

      When I compile this program with the modified javac to produce class files that are conformant with the outline in https://cr.openjdk.java.net/~briangoetz/valhalla/sov/04-translation.html:

      public inline class Point {

          private int x;
          private int y;


          public Point(int x, int y) {
              this.x = x;
              this.y = y;
          }

          public static void main(String [] args) {
              Point.ref pref = new Point(10, 20);
              System.out.println(pref);
          }
      }

      I get two class files: Point.class and Point$ref.class.

      Running them to jvm I get good behavior.

      A slightly modified version of the program above triggers a verification error - don't know why

        1. Point.class
          1 kB
        2. Point.class
          1 kB
        3. Point$ref.class
          0.1 kB
        4. Point$ref.class
          0.1 kB

            hseigel Harold Seigel (Inactive)
            sadayapalam Srikanth Adayapalam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: