Skip to content
Permalink
Browse files
8240267: VM fails to start with CDS enabled but JVMTI disabled
Reviewed-by: dholmes
  • Loading branch information
iklam committed Mar 2, 2020
1 parent 742bdf0 commit 0532bd23cd36c64f83ac5c2b0ea61ddb8dc6178d
Showing with 5 additions and 5 deletions.
  1. +3 −3 src/hotspot/share/classfile/javaClasses.cpp
  2. +2 −2 src/hotspot/share/classfile/systemDictionary.cpp
@@ -4782,9 +4782,9 @@ void JavaClasses::compute_hard_coded_offsets() {
// Compute non-hard-coded field offsets of all the classes in this file
void JavaClasses::compute_offsets() {
if (UseSharedSpaces) {
assert(JvmtiExport::is_early_phase() && !(JvmtiExport::should_post_class_file_load_hook() &&
JvmtiExport::has_early_class_hook_env()),
"JavaClasses::compute_offsets() must be called in early JVMTI phase.");
JVMTI_ONLY(assert(JvmtiExport::is_early_phase() && !(JvmtiExport::should_post_class_file_load_hook() &&
JvmtiExport::has_early_class_hook_env()),
"JavaClasses::compute_offsets() must be called in early JVMTI phase."));
// None of the classes used by the rest of this function can be replaced by
// JMVTI ClassFileLoadHook.
// We are safe to use the archived offsets, which have already been restored
@@ -2070,8 +2070,8 @@ void SystemDictionary::resolve_well_known_classes(TRAPS) {

#ifdef ASSERT
if (UseSharedSpaces) {
assert(JvmtiExport::is_early_phase(),
"All well known classes must be resolved in JVMTI early phase");
JVMTI_ONLY(assert(JvmtiExport::is_early_phase(),
"All well known classes must be resolved in JVMTI early phase"));
for (int i = FIRST_WKID; i < last; i++) {
InstanceKlass* k = _well_known_klasses[i];
assert(k->is_shared(), "must not be replaced by JVMTI class file load hook");

0 comments on commit 0532bd2

Please sign in to comment.