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

[lworld] Reflective method invocation fails with assert: "illegal type"

    Details

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

      Description

      # Internal Error (/oracle/valhallaL/open/src/hotspot/share/runtime/handles.inline.hpp:53), pid=18123, tid=18124
      # assert(is_null() || ((oop)obj)->is_objArray_noinline()) failed: illegal type

      Stack: [0x00007ff99c9f1000,0x00007ff99caf2000], sp=0x00007ff99caefc20, free space=1019k
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xb070e4] objArrayHandle::objArrayHandle(Thread*, objArrayOop)+0xa4
      V [libjvm.so+0x1030f06] JVM_InvokeMethod+0x1c6
      j jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0 java.base
      j jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+100 java.base
      j jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6 java.base
      j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+59 java.base
      j compiler.valhalla.valuetypes.TestCallingConvention.test30_verifier(Z)V+23
      v ~StubRoutines::call_stub
      V [libjvm.so+0xec19de] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x76e
      V [libjvm.so+0x160a578] invoke(InstanceKlass*, methodHandle const&, Handle, bool, objArrayHandle, BasicType, objArrayHandle, bool, Thread*)+0xde8
      V [libjvm.so+0x160b5b6] Reflection::invoke_method(oop, Handle, objArrayHandle, Thread*)+0x206
      V [libjvm.so+0x1030f56] JVM_InvokeMethod+0x216
      j jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0 java.base
      j jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+100 java.base
      j jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6 java.base
      j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+59 java.base
      j compiler.valhalla.valuetypes.ValueTypeTest.run([Ljava/lang/Class;)V+237
      j compiler.valhalla.valuetypes.ValueTypeTest.run([Ljava/lang/String;[Ljava/lang/Class;)V+41
      j compiler.valhalla.valuetypes.TestCallingConvention.main([Ljava/lang/String;)V+51
      v ~StubRoutines::call_stub
      V [libjvm.so+0xec19de] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x76e
      V [libjvm.so+0xf8d307] jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*) [clone .isra.159]+0x2e7
      V [libjvm.so+0xfb14e6] jni_CallStaticVoidMethod+0x1f6
      C [libjli.so+0x4ba8] JavaMain+0x998
      C [libjli.so+0x8169] ThreadJavaMain+0x9

          @Test
          public MyValue3 test30(MyValue3[] array) {
              MyValue3 result = MyValue3.create();
              array[0] = result;
              return result;
          }

          @DontCompile
          public void test30_verifier(boolean warmup) throws Exception {
              MyValue3[] array = new MyValue3[1];
              MyValue3 vt = (MyValue3)TestCallingConvention.class.getDeclaredMethod("test30", MyValue3[].class).invoke(this, array);
              array[0].verify(vt);
          }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dsimms David Simms
                Reporter:
                thartmann Tobias Hartmann
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: