comparison src/share/vm/runtime/sharedRuntime.cpp @ 16179:05397227b8d4

Fix for debug check abort handling in implicit exception handler
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 24 Jun 2014 12:19:15 +0200
parents 4062efea018b
children 4703a9442f3f
comparison
equal deleted inserted replaced
16178:b96e17e6d6aa 16179:05397227b8d4
884 #ifdef GRAAL 884 #ifdef GRAAL
885 if (nm->is_compiled_by_graal() && nm->pc_desc_at(pc) != NULL) { 885 if (nm->is_compiled_by_graal() && nm->pc_desc_at(pc) != NULL) {
886 // If there's no PcDesc then we'll die way down inside of 886 // If there's no PcDesc then we'll die way down inside of
887 // deopt instead of just getting normal error reporting, 887 // deopt instead of just getting normal error reporting,
888 // so only go there if it will succeed. 888 // so only go there if it will succeed.
889 target_pc = deoptimize_for_implicit_exception(thread, pc, nm, Deoptimization::Reason_null_check); 889 return deoptimize_for_implicit_exception(thread, pc, nm, Deoptimization::Reason_null_check);
890 } else { 890 } else {
891 #endif 891 #endif
892 target_pc = nm->continuation_for_implicit_exception(pc); 892 target_pc = nm->continuation_for_implicit_exception(pc);
893 #ifdef GRAAL 893 #ifdef GRAAL
894 } 894 }
908 #ifndef PRODUCT 908 #ifndef PRODUCT
909 _implicit_div0_throws++; 909 _implicit_div0_throws++;
910 #endif 910 #endif
911 #ifdef GRAAL 911 #ifdef GRAAL
912 if (nm->is_compiled_by_graal() && nm->pc_desc_at(pc) != NULL) { 912 if (nm->is_compiled_by_graal() && nm->pc_desc_at(pc) != NULL) {
913 target_pc = deoptimize_for_implicit_exception(thread, pc, nm, Deoptimization::Reason_div0_check); 913 return deoptimize_for_implicit_exception(thread, pc, nm, Deoptimization::Reason_div0_check);
914 } else { 914 } else {
915 #endif 915 #endif
916 target_pc = nm->continuation_for_implicit_exception(pc); 916 target_pc = nm->continuation_for_implicit_exception(pc);
917 #ifdef GRAAL 917 #ifdef GRAAL
918 } 918 }
926 default: ShouldNotReachHere(); 926 default: ShouldNotReachHere();
927 } 927 }
928 928
929 assert(exception_kind == IMPLICIT_NULL || exception_kind == IMPLICIT_DIVIDE_BY_ZERO, "wrong implicit exception kind"); 929 assert(exception_kind == IMPLICIT_NULL || exception_kind == IMPLICIT_DIVIDE_BY_ZERO, "wrong implicit exception kind");
930 930
931 // for AbortVMOnException flag
932 NOT_PRODUCT(Exceptions::debug_check_abort("java.lang.NullPointerException"));
933 if (exception_kind == IMPLICIT_NULL) { 931 if (exception_kind == IMPLICIT_NULL) {
932 #ifndef PRODUCT
933 // for AbortVMOnException flag
934 Exceptions::debug_check_abort("java.lang.NullPointerException");
935 #endif //PRODUCT
934 Events::log_exception(thread, "Implicit null exception at " INTPTR_FORMAT " to " INTPTR_FORMAT, pc, target_pc); 936 Events::log_exception(thread, "Implicit null exception at " INTPTR_FORMAT " to " INTPTR_FORMAT, pc, target_pc);
935 } else { 937 } else {
938 #ifndef PRODUCT
939 // for AbortVMOnException flag
940 Exceptions::debug_check_abort("java.lang.ArithmeticException");
941 #endif //PRODUCT
936 Events::log_exception(thread, "Implicit division by zero exception at " INTPTR_FORMAT " to " INTPTR_FORMAT, pc, target_pc); 942 Events::log_exception(thread, "Implicit division by zero exception at " INTPTR_FORMAT " to " INTPTR_FORMAT, pc, target_pc);
937 } 943 }
938 return target_pc; 944 return target_pc;
939 } 945 }
940 946