8215947: JVM crash with -XX:+DumpSharedSpaces

Disable JIT compilation if -XX:+DumpSharedSpaces is specified by the user

Reviewed-by: lfoltan, jiangli
This commit is contained in:
Calvin Cheung 2019-01-03 14:33:58 -08:00
parent 103c8dc608
commit a97d8a9a76
2 changed files with 11 additions and 0 deletions

View file

@ -3111,6 +3111,10 @@ jint Arguments::finalize_vm_init_args(bool patch_mod_javabase) {
BytecodeVerificationRemote = true;
log_info(cds)("All non-system classes will be verified (-Xverify:remote) during CDS dump time.");
}
// Compilation is already disabled if the user specifies -Xshare:dump.
// Disable compilation in case user specifies -XX:+DumpSharedSpaces instead of -Xshare:dump.
set_mode_flags(_int);
}
if (UseSharedSpaces && patch_mod_javabase) {
no_shared_spaces("CDS is disabled when " JAVA_BASE_NAME " module is patched.");