8163313: assert(comp != __null) failed: compiler not available
Summary: Constrain compLevel parameter in WB_IsIntrinsicAvailable() to supported levels
Reviewed-by: kvn
--- 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;