8163313: assert(comp != __null) failed: compiler not available

Constrain compLevel parameter in WB_IsIntrinsicAvailable() to supported levels

Reviewed-by: kvn
This commit is contained in:
Igor Veresov 2016-08-06 11:52:37 -07:00
parent 3c025b715c
commit 6ca8a98449

View file

@ -679,7 +679,7 @@ WB_ENTRY(jboolean, WB_IsMethodQueuedForCompilation(JNIEnv* env, jobject o, jobje
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;