Fri, 22 Mar 2013 07:58:55 -0700
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
src/share/vm/opto/parse2.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/opto/parse2.cpp Thu Mar 21 10:13:56 2013 -0700 1.2 +++ b/src/share/vm/opto/parse2.cpp Fri Mar 22 07:58:55 2013 -0700 1.3 @@ -104,7 +104,8 @@ 1.4 if (C->log() != NULL) C->log()->elem("observe that='!need_range_check'"); 1.5 } 1.6 1.7 - if (!arytype->klass()->is_loaded()) { 1.8 + ciKlass * arytype_klass = arytype->klass(); 1.9 + if ((arytype_klass != NULL) && (!arytype_klass->is_loaded())) { 1.10 // Only fails for some -Xcomp runs 1.11 // The class is unloaded. We have to run this bytecode in the interpreter. 1.12 uncommon_trap(Deoptimization::Reason_unloaded, 1.13 @@ -1385,6 +1386,7 @@ 1.14 if (TraceOptoParse) { 1.15 tty->print(" @"); 1.16 dump_bci(bci()); 1.17 + tty->cr(); 1.18 } 1.19 #endif 1.20