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

JNI_GetPrimitiveArrayCritical() should not accept object array

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 18
    • 18
    • hotspot
    • b06

    Description

      GetPrimitiveArrayCritical() can only be used with primitive array types, but logic in JNI_GetPrimitiveArrayCritical() makes it looks like possible for object array.

      BasicType type;
        if (a->is_objArray()) {
          type = T_OBJECT;
        } else {
          type = TypeArrayKlass::cast(a->klass())->element_type();
        }

      and I can pass in object array to GetPrimitiveArrayCritical() without any complains. See attached test case for details.

      Attachments

        Issue Links

          Activity

            People

              zgu Zhengyu Gu
              zgu Zhengyu Gu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: