8199557: Assert in fromTonga/vm/runtime/defmeth/scenarios/Stress_noredefine/TestDescription.java
authorgoetz
Wed, 14 Mar 2018 21:36:41 +0100
changeset 49400 d2dd7e7d2044
parent 49399 e0fec3292f00
child 49401 0c71baee49a7
8199557: Assert in fromTonga/vm/runtime/defmeth/scenarios/Stress_noredefine/TestDescription.java Reviewed-by: coleenp
src/hotspot/share/runtime/sharedRuntime.cpp
--- 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