# HG changeset patch # User Gilles Duboscq # Date 1403605155 -7200 # Node ID 05397227b8d4f28cf375b3f537dd4bc2eea7d603 # Parent b96e17e6d6aaa367fa584ea5c0ada93bf39326d2 Fix for debug check abort handling in implicit exception handler diff -r b96e17e6d6aa -r 05397227b8d4 src/share/vm/runtime/sharedRuntime.cpp --- a/src/share/vm/runtime/sharedRuntime.cpp Tue Jun 24 14:52:05 2014 +0200 +++ b/src/share/vm/runtime/sharedRuntime.cpp Tue Jun 24 12:19:15 2014 +0200 @@ -886,7 +886,7 @@ // If there's no PcDesc then we'll die way down inside of // deopt instead of just getting normal error reporting, // so only go there if it will succeed. - target_pc = deoptimize_for_implicit_exception(thread, pc, nm, Deoptimization::Reason_null_check); + return deoptimize_for_implicit_exception(thread, pc, nm, Deoptimization::Reason_null_check); } else { #endif target_pc = nm->continuation_for_implicit_exception(pc); @@ -910,7 +910,7 @@ #endif #ifdef GRAAL if (nm->is_compiled_by_graal() && nm->pc_desc_at(pc) != NULL) { - target_pc = deoptimize_for_implicit_exception(thread, pc, nm, Deoptimization::Reason_div0_check); + return deoptimize_for_implicit_exception(thread, pc, nm, Deoptimization::Reason_div0_check); } else { #endif target_pc = nm->continuation_for_implicit_exception(pc); @@ -928,11 +928,17 @@ assert(exception_kind == IMPLICIT_NULL || exception_kind == IMPLICIT_DIVIDE_BY_ZERO, "wrong implicit exception kind"); - // for AbortVMOnException flag - NOT_PRODUCT(Exceptions::debug_check_abort("java.lang.NullPointerException")); if (exception_kind == IMPLICIT_NULL) { +#ifndef PRODUCT + // for AbortVMOnException flag + Exceptions::debug_check_abort("java.lang.NullPointerException"); +#endif //PRODUCT Events::log_exception(thread, "Implicit null exception at " INTPTR_FORMAT " to " INTPTR_FORMAT, pc, target_pc); } else { +#ifndef PRODUCT + // for AbortVMOnException flag + Exceptions::debug_check_abort("java.lang.ArithmeticException"); +#endif //PRODUCT Events::log_exception(thread, "Implicit division by zero exception at " INTPTR_FORMAT " to " INTPTR_FORMAT, pc, target_pc); } return target_pc;