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

[lworld] VM assert illegal mirror klass when calling Class::getInterfaces on a flat array

    XMLWordPrintable

    Details

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

      Description

      diff --git a/src/hotspot/share/prims/jvm.cpp b/src/hotspot/share/prims/jvm.cpp
      index 00bee2cb9b8..fc627894b01 100644
      --- a/src/hotspot/share/prims/jvm.cpp
      +++ b/src/hotspot/share/prims/jvm.cpp
      @@ -1170,7 +1170,7 @@ JVM_ENTRY(jobjectArray, JVM_GetClassInterfaces(JNIEnv *env, jclass cls))
           InstanceKlass* ik = InstanceKlass::cast(klass);
           size = ik->local_interfaces()->length();
         } else {
      - assert(klass->is_objArray_klass() || klass->is_typeArray_klass(), "Illegal mirror klass");
      + assert(klass->is_objArray_klass() || klass->is_typeArray_klass() || klass->is_flatArray_klass(), "Illegal mirror klass");
           size = 3;
         }

      Add a new test for `Class::getInterfaces`

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mchung Mandy Chung
              Reporter:
              mchung Mandy Chung
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: