src/hotspot/share/utilities/debug.cpp
changeset 50734 0828a0f6676b
parent 49902 3661f31c6df4
child 52431 b0af758a092c
--- a/src/hotspot/share/utilities/debug.cpp	Fri Jun 22 17:36:03 2018 -0700
+++ b/src/hotspot/share/utilities/debug.cpp	Fri Jun 22 17:49:21 2018 -0700
@@ -714,16 +714,13 @@
   }
 }
 
-static bool store_context(const void* context) {
-  if (memcpy(&g_stored_assertion_context, context, sizeof(ucontext_t)) == false) {
-    return false;
-  }
+static void store_context(const void* context) {
+  memcpy(&g_stored_assertion_context, context, sizeof(ucontext_t));
 #if defined(__linux) && defined(PPC64)
   // on Linux ppc64, ucontext_t contains pointers into itself which have to be patched up
   //  after copying the context (see comment in sys/ucontext.h):
   *((void**) &g_stored_assertion_context.uc_mcontext.regs) = &(g_stored_assertion_context.uc_mcontext.gp_regs);
 #endif
-  return true;
 }
 
 bool handle_assert_poison_fault(const void* ucVoid, const void* faulting_address) {
@@ -734,9 +731,8 @@
     if (ucVoid) {
       const intx my_tid = os::current_thread_id();
       if (Atomic::cmpxchg(my_tid, &g_asserting_thread, (intx)0) == 0) {
-        if (store_context(ucVoid)) {
-          g_assertion_context = &g_stored_assertion_context;
-        }
+        store_context(ucVoid);
+        g_assertion_context = &g_stored_assertion_context;
       }
     }
     return true;