8163313: assert(comp != __null) failed: compiler not available
authoriveresov
Sat, 06 Aug 2016 11:52:37 -0700
changeset 40370 2f564c75bcde
parent 40369 9fe6781cbe39
child 40371 98d4822ec8ef
8163313: assert(comp != __null) failed: compiler not available Summary: Constrain compLevel parameter in WB_IsIntrinsicAvailable() to supported levels Reviewed-by: kvn
hotspot/src/share/vm/prims/whitebox.cpp
--- a/hotspot/src/share/vm/prims/whitebox.cpp	Fri Aug 05 13:37:53 2016 -0700
+++ b/hotspot/src/share/vm/prims/whitebox.cpp	Sat Aug 06 11:52:37 2016 -0700
@@ -679,7 +679,7 @@
 WB_END
 
 WB_ENTRY(jboolean, WB_IsIntrinsicAvailable(JNIEnv* env, jobject o, jobject method, jobject compilation_context, jint compLevel))
-  if (compLevel < CompLevel_none || compLevel > TieredStopAtLevel) {
+  if (compLevel < CompLevel_none || compLevel > MIN2((CompLevel) TieredStopAtLevel, CompLevel_highest_tier)) {
     return false; // Intrinsic is not available on a non-existent compilation level.
   }
   jmethodID method_id, compilation_context_id;