Thu, 11 Apr 2013 23:06:33 -0400
8012052: java/lang/invoke/6987555/Test6987555.java crashes with assert(mcs != NULL) failed: MethodCounters cannot be NULL.
Summary: Skip counter decay if the MethodCounters is NULL in NonTieredCompPolicy::delay_compilation().
Reviewed-by: kvn, dholmes
src/share/vm/runtime/compilationPolicy.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/runtime/compilationPolicy.cpp Tue Apr 09 17:17:41 2013 -0400 1.2 +++ b/src/share/vm/runtime/compilationPolicy.cpp Thu Apr 11 23:06:33 2013 -0400 1.3 @@ -297,9 +297,10 @@ 1.4 // that it's recommended to delay the complation of this method. 1.5 void NonTieredCompPolicy::delay_compilation(Method* method) { 1.6 MethodCounters* mcs = method->method_counters(); 1.7 - assert(mcs != NULL, "MethodCounters cannot be NULL"); 1.8 - mcs->invocation_counter()->decay(); 1.9 - mcs->backedge_counter()->decay(); 1.10 + if (mcs != NULL) { 1.11 + mcs->invocation_counter()->decay(); 1.12 + mcs->backedge_counter()->decay(); 1.13 + } 1.14 } 1.15 1.16 void NonTieredCompPolicy::disable_compilation(Method* method) {