Navigation Menu

Skip to content


8265689: JVMCI: InternalError: Class java.lang.Object does not implem…
Browse files Browse the repository at this point in the history
…ent interface

Co-authored-by: Doug Simon <>
Reviewed-by: kvn, thartmann
  • Loading branch information
Vladimir Ivanov and Doug Simon committed Apr 26, 2021
1 parent 0d08d73 commit 9647fb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -601,8 +601,9 @@ public static CompilerToVM compilerToVM() {
* {@link HotSpotVMConfig#invalidVtableIndex} if {@code method} is not in {@code type}'s
* v-table.
* @throws InternalError if {@code type} is an interface or {@code method} is not held by an
* interface or class represented by {@code type} is not initialized
* @throws InternalError if {@code type} is an interface, {@code method} is not defined by an
* interface, {@code type} does not implement the interface defining {@code method}
* or class represented by {@code type} is not initialized
native int getVtableIndexForInterfaceMethod(HotSpotResolvedObjectTypeImpl type, HotSpotResolvedJavaMethodImpl method);

Expand Down
Expand Up @@ -680,7 +680,7 @@ private int getVtableIndex(HotSpotResolvedObjectTypeImpl resolved) {
return config().invalidVtableIndex;
if (holder.isInterface()) {
if (resolved.isInterface() || !resolved.isLinked()) {
if (resolved.isInterface() || !resolved.isLinked() || !getDeclaringClass().isAssignableFrom(resolved)) {
return config().invalidVtableIndex;
return getVtableIndexForInterfaceMethod(resolved);
Expand Down

1 comment on commit 9647fb0

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.