8187315: [JVMCI] hosted use of JVMCI can crash VM under -Xint

Reviewed-by: kvn, dlong
This commit is contained in:
Doug Simon 2017-11-06 21:38:42 +01:00
parent 614fca959b
commit 40cdb9fd60
4 changed files with 8 additions and 5 deletions

View file

@ -55,10 +55,13 @@ private:
public:
JVMCICompiler();
static JVMCICompiler* instance(TRAPS) {
static JVMCICompiler* instance(bool require_non_null, TRAPS) {
if (!EnableJVMCI) {
THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "JVMCI is not enabled")
}
if (_instance == NULL && require_non_null) {
THROW_MSG_NULL(vmSymbols::java_lang_InternalError(), "The JVMCI compiler instance has not been created");
}
return _instance;
}