changeset 14709:d3225562f0d8

guard implicit exception deopt
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Thu, 20 Mar 2014 17:36:43 -0700
parents 0f73f8b75b81
children 6fd5f25b546c
files src/share/vm/runtime/sharedRuntime.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/sharedRuntime.cpp	Thu Mar 20 16:56:21 2014 -0700
+++ b/src/share/vm/runtime/sharedRuntime.cpp	Thu Mar 20 17:36:43 2014 -0700
@@ -886,7 +886,10 @@
           _implicit_null_throws++;
 #endif
 #ifdef GRAAL
-          if (nm->is_compiled_by_graal()) {
+          if (nm->is_compiled_by_graal() && nm->pc_desc_at(pc) != NULL) {
+            // 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);
           } else {
 #endif