Skip to content

Commit

Permalink
8240267: VM fails to start with CDS enabled but JVMTI disabled
Browse files Browse the repository at this point in the history
Reviewed-by: dholmes
  • Loading branch information
iklam committed Mar 2, 2020
1 parent 742bdf0 commit 0532bd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/hotspot/share/classfile/javaClasses.cpp
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/classfile/systemDictionary.cpp
Expand Up @@ -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");
Expand Down

0 comments on commit 0532bd2

Please sign in to comment.