hotspot/src/share/vm/runtime/sharedRuntime.cpp
changeset 38209 b2a58604e046
parent 38190 ff9ac612c723
child 38259 b495d1cfe673
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Fri May 06 06:23:29 2016 -0700
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp	Fri May 06 13:00:21 2016 -0700
@@ -1762,6 +1762,21 @@
   return callee_method;
 }
 
+address SharedRuntime::handle_unsafe_access(JavaThread* thread, address next_pc) {
+  // The faulting unsafe accesses should be changed to throw the error
+  // synchronously instead. Meanwhile the faulting instruction will be
+  // skipped over (effectively turning it into a no-op) and an
+  // asynchronous exception will be raised which the thread will
+  // handle at a later point. If the instruction is a load it will
+  // return garbage.
+
+  // Request an async exception.
+  thread->set_pending_unsafe_access_error();
+
+  // Return address of next instruction to execute.
+  return next_pc;
+}
+
 #ifdef ASSERT
 void SharedRuntime::check_member_name_argument_is_last_argument(const methodHandle& method,
                                                                 const BasicType* sig_bt,