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

[lworld] MethodHandle invocation should check for VT consistency

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: hotspot
    • Labels:

      Description

      See

      http://cr.openjdk.java.net/~iklam/valhalla/tests_for_value_types_consistency_checks.v02/
      http://cr.openjdk.java.net/~iklam/valhalla/tests_for_value_types_consistency_checks.v02/ConsistencyTest.jtr

      In this versions of the test, we have 2 classes that disagree on whether Point is a Value Type:

      class InvokeMethodHandle {
          public static void run() throws Throwable {
              MethodHandles.Lookup lookup = MethodHandles.lookup();
              MethodType mt = MethodType.methodType(Point.class);
              MethodHandle mh = lookup.findStatic(CorrectProvider.class, "getNullPoint", mt);
              InvokeMethodHandle_mismatched.test(mh);
          }
      }

      class InvokeMethodHandle_mismatched {
          static void test(MethodHandle mh) throws Throwable {
              Point p = (Point)mh.invoke();
              System.out.println("(should not get here) Point = " + p);
          }
      }

      mh.invoke should throw an IncompatibleClassChangeException. However, as indicated by the above ConsistencyTest.jtr file, the ICCE was not thrown.

        Attachments

          Activity

            People

            • Assignee:
              mchung Mandy Chung
              Reporter:
              iklam Ioi Lam
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: