--- old/src/os/windows/vm/os_windows.cpp 2016-09-23 09:15:57.272473915 -0400 +++ new/src/os/windows/vm/os_windows.cpp 2016-09-23 09:15:56.676470960 -0400 @@ -2366,7 +2366,9 @@ if (Interpreter::contains(pc)) { *fr = os::fetch_frame_from_context((void*)exceptionInfo->ContextRecord); if (!fr->is_first_java_frame()) { - assert(fr->safe_for_sender(thread), "Safety check"); + // get_frame_at_stack_banging_point() is only called when we + // have well defined stacks so java_sender() calls do not need + // to assert safe_for_sender() first. *fr = fr->java_sender(); } } else { @@ -2383,7 +2385,9 @@ // has been pushed on the stack *fr = frame(fr->sp() + 1, fr->fp(), (address)*(fr->sp())); if (!fr->is_java_frame()) { - assert(fr->safe_for_sender(thread), "Safety check"); + // get_frame_at_stack_banging_point() is only called when we + // have well defined stacks so java_sender() calls do not need + // to assert safe_for_sender() first. *fr = fr->java_sender(); } } --- old/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2016-09-23 09:15:59.180483376 -0400 +++ new/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp 2016-09-23 09:15:58.568480342 -0400 @@ -378,7 +378,9 @@ // method returns the Java sender of the current frame. *fr = os::fetch_frame_from_ucontext(thread, uc); if (!fr->is_first_java_frame()) { - assert(fr->safe_for_sender(thread), "Safety check"); + // get_frame_at_stack_banging_point() is only called when we + // have well defined stacks so java_sender() calls do not need + // to assert safe_for_sender() first. *fr = fr->java_sender(); } } else { @@ -395,7 +397,9 @@ // has been pushed on the stack *fr = frame(fr->sp() + 1, fr->fp(), (address)*(fr->sp())); if (!fr->is_java_frame()) { - assert(fr->safe_for_sender(thread), "Safety check"); + // get_frame_at_stack_banging_point() is only called when we + // have well defined stacks so java_sender() calls do not need + // to assert safe_for_sender() first. *fr = fr->java_sender(); } } --- old/src/os_cpu/linux_x86/vm/os_linux_x86.cpp 2016-09-23 09:16:01.024492520 -0400 +++ new/src/os_cpu/linux_x86/vm/os_linux_x86.cpp 2016-09-23 09:16:00.440489624 -0400 @@ -191,7 +191,9 @@ // method returns the Java sender of the current frame. *fr = os::fetch_frame_from_ucontext(thread, uc); if (!fr->is_first_java_frame()) { - assert(fr->safe_for_sender(thread), "Safety check"); + // get_frame_at_stack_banging_point() is only called when we + // have well defined stacks so java_sender() calls do not need + // to assert safe_for_sender() first. *fr = fr->java_sender(); } } else { @@ -209,8 +211,10 @@ intptr_t* sp = os::Linux::ucontext_get_sp(uc); *fr = frame(sp + 1, fp, (address)*sp); if (!fr->is_java_frame()) { - assert(fr->safe_for_sender(thread), "Safety check"); assert(!fr->is_first_frame(), "Safety check"); + // get_frame_at_stack_banging_point() is only called when we + // have well defined stacks so java_sender() calls do not need + // to assert safe_for_sender() first. *fr = fr->java_sender(); } } --- old/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp 2016-09-23 09:16:02.888501763 -0400 +++ new/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp 2016-09-23 09:16:02.304498867 -0400 @@ -255,7 +255,9 @@ // method returns the Java sender of the current frame. *fr = os::fetch_frame_from_ucontext(thread, uc); if (!fr->is_first_java_frame()) { - assert(fr->safe_for_sender(thread), "Safety check"); + // get_frame_at_stack_banging_point() is only called when we + // have well defined stacks so java_sender() calls do not need + // to assert safe_for_sender() first. *fr = fr->java_sender(); } } else { @@ -273,7 +275,9 @@ intptr_t* sp = os::Solaris::ucontext_get_sp(uc); *fr = frame(sp + 1, fp, (address)*sp); if (!fr->is_java_frame()) { - assert(fr->safe_for_sender(thread), "Safety check"); + // get_frame_at_stack_banging_point() is only called when we + // have well defined stacks so java_sender() calls do not need + // to assert safe_for_sender() first. *fr = fr->java_sender(); } }