changeset 4333:539375f92462

8009539: JVM crash when run lambda testng tests Summary: Ensure class pointer is non-null before dereferencing it to check if it is loaded. Reviewed-by: kvn
author bharadwaj
date Fri, 22 Mar 2013 07:58:55 -0700
parents e388232ba684
children 795212ad5b1b aea9eb48dafd
files src/share/vm/opto/parse2.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/opto/parse2.cpp	Mon Mar 18 13:19:06 2013 +0100
+++ b/src/share/vm/opto/parse2.cpp	Fri Mar 22 07:58:55 2013 -0700
@@ -104,7 +104,8 @@
     if (C->log() != NULL)   C->log()->elem("observe that='!need_range_check'");
   }
 
-  if (!arytype->klass()->is_loaded()) {
+  ciKlass * arytype_klass = arytype->klass();
+  if ((arytype_klass != NULL) && (!arytype_klass->is_loaded())) {
     // Only fails for some -Xcomp runs
     // The class is unloaded.  We have to run this bytecode in the interpreter.
     uncommon_trap(Deoptimization::Reason_unloaded,
@@ -1385,6 +1386,7 @@
   if (TraceOptoParse) {
     tty->print(" @");
     dump_bci(bci());
+    tty->cr();
   }
 #endif