https://github.com/openjdk/jdk/blame/50239716403732fe8af73b4b6f006b6a4b7b22db/src/hotspot/share/cds/filemap.cpp#L306
bool has_extra_module_paths;
if (!config->validate(header()->has_aot_linked_classes(), &has_extra_module_paths)) {
The has_extra_module_paths variable is not always set by the config->validate() call. We should explicitly set it to false before calling validate().
Proposed fix:
$ git diff
diff --git a/src/hotspot/share/cds/filemap.cpp b/src/hotspot/share/cds/filemap.cpp
index ab9fcd8621a..8d0cb0a73f5 100644
--- a/src/hotspot/share/cds/filemap.cpp
+++ b/src/hotspot/share/cds/filemap.cpp
@@ -310,7 +310,7 @@ bool FileMapInfo::validate_class_location() {
assert(CDSConfig::is_using_archive(), "runtime only");
AOTClassLocationConfig* config = header()->class_location_config();
- bool has_extra_module_paths;
+ bool has_extra_module_paths = false;
if (!config->validate(header()->has_aot_linked_classes(), &has_extra_module_paths)) {
if (PrintSharedArchiveAndExit) {
MetaspaceShared::set_archive_loading_failed();
bool has_extra_module_paths;
if (!config->validate(header()->has_aot_linked_classes(), &has_extra_module_paths)) {
The has_extra_module_paths variable is not always set by the config->validate() call. We should explicitly set it to false before calling validate().
Proposed fix:
$ git diff
diff --git a/src/hotspot/share/cds/filemap.cpp b/src/hotspot/share/cds/filemap.cpp
index ab9fcd8621a..8d0cb0a73f5 100644
--- a/src/hotspot/share/cds/filemap.cpp
+++ b/src/hotspot/share/cds/filemap.cpp
@@ -310,7 +310,7 @@ bool FileMapInfo::validate_class_location() {
assert(CDSConfig::is_using_archive(), "runtime only");
AOTClassLocationConfig* config = header()->class_location_config();
- bool has_extra_module_paths;
+ bool has_extra_module_paths = false;
if (!config->validate(header()->has_aot_linked_classes(), &has_extra_module_paths)) {
if (PrintSharedArchiveAndExit) {
MetaspaceShared::set_archive_loading_failed();
- caused by
-
JDK-8350666 cmp-baseline builds fail after JDK-8280682
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/d422abc5
-
Review(master) openjdk/jdk/23780