changeset 49405:d2dd7e7d2044

8199557: Assert in fromTonga/vm/runtime/defmeth/scenarios/Stress_noredefine/TestDescription.java Reviewed-by: coleenp
author goetz
date Wed, 14 Mar 2018 21:36:41 +0100
parents e0fec3292f00
children 0c71baee49a7
files src/hotspot/share/runtime/sharedRuntime.cpp
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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