8260341: CDS dump VM init code does not check exceptions

Reviewed-by: coleenp, hseigel
This commit is contained in:
Ioi Lam 2021-02-11 05:11:48 +00:00
parent 447db62762
commit adca84cc29
12 changed files with 93 additions and 85 deletions

View file

@ -3361,6 +3361,10 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
#if INCLUDE_CDS
// capture the module path info from the ModuleEntryTable
ClassLoader::initialize_module_path(THREAD);
if (HAS_PENDING_EXCEPTION) {
java_lang_Throwable::print(PENDING_EXCEPTION, tty);
vm_exit_during_initialization("ClassLoader::initialize_module_path() failed unexpectedly");
}
#endif
#if INCLUDE_JVMCI