equal
deleted
inserted
replaced
802 // and processed. |
802 // and processed. |
803 // For stack overflow in deoptimization blob, cleanup thread. |
803 // For stack overflow in deoptimization blob, cleanup thread. |
804 if (thread->deopt_mark() != NULL) { |
804 if (thread->deopt_mark() != NULL) { |
805 Deoptimization::cleanup_deopt_info(thread, NULL); |
805 Deoptimization::cleanup_deopt_info(thread, NULL); |
806 } |
806 } |
|
807 Events::log_exception(thread, "StackOverflowError at " INTPTR_FORMAT, pc); |
807 return StubRoutines::throw_StackOverflowError_entry(); |
808 return StubRoutines::throw_StackOverflowError_entry(); |
808 } |
809 } |
809 |
810 |
810 case IMPLICIT_NULL: { |
811 case IMPLICIT_NULL: { |
811 if (VtableStubs::contains(pc)) { |
812 if (VtableStubs::contains(pc)) { |
818 // If vt_stub is NULL, then return NULL to signal handler to report the SEGV error. |
819 // If vt_stub is NULL, then return NULL to signal handler to report the SEGV error. |
819 if (vt_stub == NULL) return NULL; |
820 if (vt_stub == NULL) return NULL; |
820 |
821 |
821 if (vt_stub->is_abstract_method_error(pc)) { |
822 if (vt_stub->is_abstract_method_error(pc)) { |
822 assert(!vt_stub->is_vtable_stub(), "should never see AbstractMethodErrors from vtable-type VtableStubs"); |
823 assert(!vt_stub->is_vtable_stub(), "should never see AbstractMethodErrors from vtable-type VtableStubs"); |
|
824 Events::log_exception(thread, "AbstractMethodError at " INTPTR_FORMAT, pc); |
823 return StubRoutines::throw_AbstractMethodError_entry(); |
825 return StubRoutines::throw_AbstractMethodError_entry(); |
824 } else { |
826 } else { |
|
827 Events::log_exception(thread, "NullPointerException at vtable entry " INTPTR_FORMAT, pc); |
825 return StubRoutines::throw_NullPointerException_at_call_entry(); |
828 return StubRoutines::throw_NullPointerException_at_call_entry(); |
826 } |
829 } |
827 } else { |
830 } else { |
828 CodeBlob* cb = CodeCache::find_blob(pc); |
831 CodeBlob* cb = CodeCache::find_blob(pc); |
829 |
832 |
836 // 3. Implict null exception in nmethod |
839 // 3. Implict null exception in nmethod |
837 |
840 |
838 if (!cb->is_nmethod()) { |
841 if (!cb->is_nmethod()) { |
839 guarantee(cb->is_adapter_blob() || cb->is_method_handles_adapter_blob(), |
842 guarantee(cb->is_adapter_blob() || cb->is_method_handles_adapter_blob(), |
840 "exception happened outside interpreter, nmethods and vtable stubs (1)"); |
843 "exception happened outside interpreter, nmethods and vtable stubs (1)"); |
|
844 Events::log_exception(thread, "NullPointerException in code blob at " INTPTR_FORMAT, pc); |
841 // There is no handler here, so we will simply unwind. |
845 // There is no handler here, so we will simply unwind. |
842 return StubRoutines::throw_NullPointerException_at_call_entry(); |
846 return StubRoutines::throw_NullPointerException_at_call_entry(); |
843 } |
847 } |
844 |
848 |
845 // Otherwise, it's an nmethod. Consult its exception handlers. |
849 // Otherwise, it's an nmethod. Consult its exception handlers. |
847 if (nm->inlinecache_check_contains(pc)) { |
851 if (nm->inlinecache_check_contains(pc)) { |
848 // exception happened inside inline-cache check code |
852 // exception happened inside inline-cache check code |
849 // => the nmethod is not yet active (i.e., the frame |
853 // => the nmethod is not yet active (i.e., the frame |
850 // is not set up yet) => use return address pushed by |
854 // is not set up yet) => use return address pushed by |
851 // caller => don't push another return address |
855 // caller => don't push another return address |
|
856 Events::log_exception(thread, "NullPointerException in IC check " INTPTR_FORMAT, pc); |
852 return StubRoutines::throw_NullPointerException_at_call_entry(); |
857 return StubRoutines::throw_NullPointerException_at_call_entry(); |
853 } |
858 } |
854 |
859 |
855 #ifndef PRODUCT |
860 #ifndef PRODUCT |
856 _implicit_null_throws++; |
861 _implicit_null_throws++; |