We shouldn't store the timestamp of $JAVA_HOME/lib/modules into the CDS archive. Otherwise the contents of the CDS archive will be environment dependent (on the time of the build) and thus will not be deterministic
Here's the fix
$ git diff
diff --git a/src/hotspot/share/cds/aotClassLocation.cpp b/src/hotspot/share/cds/aotClassLocation.cpp
index c083213b933..6df2a9c1634 100644
--- a/src/hotspot/share/cds/aotClassLocation.cpp
+++ b/src/hotspot/share/cds/aotClassLocation.cpp
@@ -270,7 +270,7 @@ AOTClassLocation* AOTClassLocation::allocate(JavaThread* current, const char* pa
cs->_manifest_length = manifest_length;
cs->_check_time = check_time;
cs->_from_cpattr = from_cpattr;
- cs->_timestamp = timestamp;
+ cs->_timestamp = check_time ? timestamp : 0;
cs->_filesize = filesize;
cs->_file_type = type;
cs->_group = group;
Here's the fix
$ git diff
diff --git a/src/hotspot/share/cds/aotClassLocation.cpp b/src/hotspot/share/cds/aotClassLocation.cpp
index c083213b933..6df2a9c1634 100644
--- a/src/hotspot/share/cds/aotClassLocation.cpp
+++ b/src/hotspot/share/cds/aotClassLocation.cpp
@@ -270,7 +270,7 @@ AOTClassLocation* AOTClassLocation::allocate(JavaThread* current, const char* pa
cs->_manifest_length = manifest_length;
cs->_check_time = check_time;
cs->_from_cpattr = from_cpattr;
- cs->_timestamp = timestamp;
+ cs->_timestamp = check_time ? timestamp : 0;
cs->_filesize = filesize;
cs->_file_type = type;
cs->_group = group;
- caused by
-
JDK-8350619 [premain] Reimplement -XX:CacheOnlyClassesIn after JDK-8280682
-
- Open
-
-
JDK-8280682 Refactor AOT code source validation checks
-
- Resolved
-
- causes
-
JDK-8350668 has_extra_module_paths in filemap.cpp may be uninitialized
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/037e4711
-
Review(master) openjdk/jdk/23787