src/hotspot/share/runtime/sharedRuntime.cpp
changeset 49400 d2dd7e7d2044
parent 49368 2ed1c37df3a5
child 49449 ef5d5d343e2a
--- a/src/hotspot/share/runtime/sharedRuntime.cpp	Tue Mar 13 21:55:41 2018 +0100
+++ b/src/hotspot/share/runtime/sharedRuntime.cpp	Wed Mar 14 21:36:41 2018 +0100
@@ -1476,13 +1476,17 @@
   assert(callerFrame.is_compiled_frame(), "must be");
 
   // Install exception and return forward entry.
+  address res = StubRoutines::throw_AbstractMethodError_entry();
   JRT_BLOCK
     methodHandle callee = invoke.static_target(thread);
-    assert(!callee.is_null() && invoke.has_receiver(), "or we should not be here");
-    oop recv = callerFrame.retrieve_receiver(&reg_map);
-    LinkResolver::throw_abstract_method_error(callee, recv->klass(), thread);
+    if (!callee.is_null()) {
+      oop recv = callerFrame.retrieve_receiver(&reg_map);
+      Klass *recv_klass = (recv != NULL) ? recv->klass() : NULL;
+      LinkResolver::throw_abstract_method_error(callee, recv_klass, thread);
+      res = StubRoutines::forward_exception_entry();
+    }
   JRT_BLOCK_END
-  return StubRoutines::forward_exception_entry();
+  return res;
 JRT_END