Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package java-17-openjdk for openSUSE:Factory 
checked in at 2026-08-25 13:19:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/java-17-openjdk (Old)
 and      /work/SRC/openSUSE:Factory/.java-17-openjdk.new.1258 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "java-17-openjdk"

Tue Aug 25 13:19:39 2026 rev:51 rq:1373459 version:17.0.20.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/java-17-openjdk/java-17-openjdk.changes  
2026-07-22 19:08:08.811308326 +0200
+++ 
/work/SRC/openSUSE:Factory/.java-17-openjdk.new.1258/java-17-openjdk.changes    
    2026-08-25 13:19:44.387218277 +0200
@@ -1,0 +2,31 @@
+Mon Aug 24 17:05:34 UTC 2026 - Fridrich Strba <[email protected]>
+
+- Upgrade to upstream tag jdk-17.0.20.1+1 (August 2026 CSPU)
+  * Changes:
+    + JDK-8389947: [17u] Remove designator
+      DEFAULT_PROMOTED_VERSION_PRE=ea for release 17.0.20.1
+    + JDK-8386205, bsc#1275764, CVE-2026-70907: Enhance TLS server
+    + JDK-8384708, bsc#1275778, CVE-2026-61308: Enhance HTTP
+      Connections
+    + JDK-8382471, bsc#1275777, CVE-2026-60589: Improve Resource
+      Resolving
+    + JDK-8333743: Change .jcheck/conf branches property to match
+      valid branches
+    + JDK-8388790: Bump update version for OpenJDK: jdk-17.0.20.1
+- Added patch:
+  * tzdata-2026c.patch
+    + backport upcoming upgrade of timezone data (bsc#1275035)
+
+-------------------------------------------------------------------
+Tue Jul 28 11:07:55 UTC 2026 - Bernhard Wiedemann <[email protected]>
+
+- Add patches for reproducible builds:
+  * java-40y.patch
+  * reproducible-cds-archive-g1.patch
+  * reproducible-cds-deterministic.patch
+  * reproducible-classlist-g1.patch
+  * reproducible-classlist-striped64.patch
+  * reproducible-default.patch
+  * reproducible-source-date-epoch.patch
+
+-------------------------------------------------------------------

Old:
----
  jdk-17.0.20+8.tar.gz

New:
----
  java-40y.patch
  jdk-17.0.20.1+1.tar.gz
  reproducible-cds-archive-g1.patch
  reproducible-cds-deterministic.patch
  reproducible-classlist-g1.patch
  reproducible-classlist-striped64.patch
  reproducible-source-date-epoch.patch
  tzdata-2026c.patch

----------(New B)----------
  New:- Add patches for reproducible builds:
  * java-40y.patch
  * reproducible-cds-archive-g1.patch
  New:  * java-40y.patch
  * reproducible-cds-archive-g1.patch
  * reproducible-cds-deterministic.patch
  New:  * reproducible-cds-archive-g1.patch
  * reproducible-cds-deterministic.patch
  * reproducible-classlist-g1.patch
  New:  * reproducible-cds-deterministic.patch
  * reproducible-classlist-g1.patch
  * reproducible-classlist-striped64.patch
  New:  * reproducible-classlist-g1.patch
  * reproducible-classlist-striped64.patch
  * reproducible-default.patch
  New:  * reproducible-default.patch
  * reproducible-source-date-epoch.patch
  New:- Added patch:
  * tzdata-2026c.patch
    + backport upcoming upgrade of timezone data (bsc#1275035)
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ java-17-openjdk.spec ++++++
--- /var/tmp/diff_new_pack.MAitqR/_old  2026-08-25 13:19:49.489397939 +0200
+++ /var/tmp/diff_new_pack.MAitqR/_new  2026-08-25 13:19:49.491398009 +0200
@@ -38,7 +38,8 @@
 %global featurever      17
 %global interimver      0
 %global updatever       20
-%global buildver        8
+%global patchver        1
+%global buildver        1
 %global openjdk_repo    jdk17u
 %global openjdk_tag     
jdk-%{featurever}.%{interimver}.%{updatever}%{?patchver:.%{patchver}}+%{buildver}
 %global openjdk_dir     
%{openjdk_repo}-jdk-%{featurever}.%{interimver}.%{updatever}%{?patchver:.%{patchver}}-%{buildver}
@@ -183,6 +184,21 @@
 #
 Patch21:        reproducible-javadoc-timestamp.patch
 Patch22:        reproducible-directory-mtime.patch
+# Honour the SOURCE_DATE_EPOCH from the environment and derive
+# HOTSPOT_BUILD_TIME from it (JDK-8282567, in JDK 20)
+Patch23:        reproducible-source-date-epoch.patch
+# Dump the shipped CDS archives with G1, so that they do not depend on the
+# CPU count of the build machine (JDK 17 shaped equivalent of JDK-8292329)
+Patch24:        reproducible-cds-archive-g1.patch
+# Same for the classlist generated during the build
+Patch25:        reproducible-classlist-g1.patch
+# Load Striped64$Cell explicitly, its presence in the classlist otherwise
+# depends on thread contention (JDK-8295951, in JDK 21)
+Patch26:        reproducible-classlist-striped64.patch
+Patch27:        java-40y.patch
+# Make the CDS dump itself deterministic: no racing threads during the dump,
+# no uninitialized padding, no timing dependent counters (JDK-8253495, in JDK 
19)
+Patch28:        reproducible-cds-deterministic.patch
 #
 Patch31:        bsc_1255446.patch
 #
@@ -193,6 +209,8 @@
 Patch301:       JDK-8303509.patch
 Patch302:       disable-doclint-by-default.patch
 #
+Patch400:       tzdata-2026c.patch
+#
 BuildRequires:  alsa-lib-devel
 BuildRequires:  autoconf
 BuildRequires:  automake
@@ -430,6 +448,12 @@
 
 %patch -P 21 -p1
 %patch -P 22 -p1
+%patch -P 23 -p1
+%patch -P 24 -p1
+%patch -P 25 -p1
+%patch -P 26 -p1
+%patch -P 27 -p1
+%patch -P 28 -p1
 
 %patch -P 31 -p1
 
@@ -438,6 +462,8 @@
 %patch -P 301 -p1
 %patch -P 302 -p1
 
+%patch -P 400 -p1
+
 # Extract systemtap tapsets
 
 %if %{with_systemtap}

++++++ java-40y.patch ++++++
--- 
jdk21u-jdk-21.0.1-12/make/jdk/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
        
+++ 
jdk21u-jdk-21.0.1-12/make/jdk/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
        
@@ -311,8 +311,8 @@ public class GenerateCurrencyData {
             checkCurrencyCode(newCurrency);
             String timeString = currencyInfo.substring(4, length - 4);
             long time = format.parse(timeString).getTime();
-            if (Math.abs(time - System.currentTimeMillis()) > ((long) 10) * 
365 * 24 * 60 * 60 * 1000) {
-                throw new RuntimeException("time is more than 10 years from 
present: " + time);
+            if (Math.abs(time - System.currentTimeMillis()) > ((long) 40) * 
365 * 24 * 60 * 60 * 1000) {
+                throw new RuntimeException("time is more than 40 years from 
present: " + time);
             }
             specialCaseCutOverTimes[specialCaseCount] = time;
             specialCaseOldCurrencies[specialCaseCount] = oldCurrency;

++++++ jdk-17.0.20+8.tar.gz -> jdk-17.0.20.1+1.tar.gz ++++++
/work/SRC/openSUSE:Factory/java-17-openjdk/jdk-17.0.20+8.tar.gz 
/work/SRC/openSUSE:Factory/.java-17-openjdk.new.1258/jdk-17.0.20.1+1.tar.gz 
differ: char 13, line 1

++++++ reproducible-cds-archive-g1.patch ++++++
# Make CDS archive generation independent of the build machine CPU count
#
# JDK 17 can only archive Java heap objects with G1
# (HeapShared::is_heap_object_archiving_allowed() requires UseG1GC), while
# GC ergonomics select SerialGC on a machine with a single CPU, because
# os::is_server_class_machine() requires at least two. A 1-core builder
# therefore dumps lib/server/classes.jsa without any archived heap
# regions, so the shipped archive differs from the one a multi-core
# builder produces.
#
# Pin G1 for the four -Xshare:dump commands if the JVM supports it. The
# guard expands to nothing for variants built without the g1gc feature
# (zero, minimal), so those builds are unaffected.
#
# This is the JDK 17 shaped equivalent of JDK-8292329, which added
# "Only G1 supports dumping the shared heap, so explicitly use G1 if the
# JVM supports it" to Images.gmk in JDK 20. It cannot be cherry-picked
# because it edits the CreateCDSArchive macro introduced by JDK-8290981,
# which JDK 17 does not have.
#
# Note that the two _nocoops archives additionally pass
# -XX:-UseCompressedOops, and JDK 17 also requires UseCompressedOops to
# archive heap objects, so those archives never contain heap regions
# regardless of the GC; passing the flag there is only for consistency.
#

diff --git a/make/Images.gmk b/make/Images.gmk
index 841ccef7637..8b6be5c5d2f 100644
--- a/make/Images.gmk
+++ b/make/Images.gmk
@@ -123,6 +123,14 @@ ifeq ($(BUILD_CDS_ARCHIVE), true)
     CDS_NOCOOPS_ARCHIVE := lib/server/classes_nocoops.jsa
   endif
 
+  # Only G1 can dump the archived heap 
(HeapShared::is_heap_object_archiving_allowed()
+  # requires UseG1GC), and GC ergonomics select SerialGC on single-CPU 
machines because
+  # os::is_server_class_machine() requires at least 2 CPUs. Without archived 
heap regions
+  # the resulting archive differs, so explicitly use G1 if the JVM supports 
it. This makes
+  # the shipped archives independent of the CPU count of the build machine.
+  CDS_DUMP_FLAGS := -Xmx128M -Xms128M \
+      $(if $(filter g1gc, $(JVM_FEATURES_$(JVM_VARIANT_MAIN))),-XX:+UseG1GC)
+
   $(eval $(call SetupExecute, gen_cds_archive_jdk, \
       WARN := Creating CDS archive for jdk image, \
       DEPS := $(jlink_jdk), \
@@ -130,7 +138,7 @@ ifeq ($(BUILD_CDS_ARCHIVE), true)
       SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \
       COMMAND := $(FIXPATH) $(JDK_IMAGE_DIR)/bin/java -Xshare:dump \
           -XX:SharedArchiveFile=$(JDK_IMAGE_DIR)/$(CDS_ARCHIVE) \
-          -Xmx128M -Xms128M $(LOG_INFO), \
+          $(CDS_DUMP_FLAGS) $(LOG_INFO), \
   ))
 
   JDK_TARGETS += $(gen_cds_archive_jdk)
@@ -142,7 +150,7 @@ ifeq ($(BUILD_CDS_ARCHIVE), true)
       SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre, \
       COMMAND := $(FIXPATH) $(JRE_IMAGE_DIR)/bin/java -Xshare:dump \
           -XX:SharedArchiveFile=$(JRE_IMAGE_DIR)/$(CDS_ARCHIVE) \
-          -Xmx128M -Xms128M $(LOG_INFO), \
+          $(CDS_DUMP_FLAGS) $(LOG_INFO), \
   ))
 
   JRE_TARGETS += $(gen_cds_archive_jre)
@@ -156,7 +164,7 @@ ifeq ($(BUILD_CDS_ARCHIVE), true)
         COMMAND := $(FIXPATH) $(JDK_IMAGE_DIR)/bin/java -Xshare:dump \
             -XX:SharedArchiveFile=$(JDK_IMAGE_DIR)/$(CDS_NOCOOPS_ARCHIVE) \
             -XX:-UseCompressedOops \
-            -Xmx128M -Xms128M $(LOG_INFO), \
+            $(CDS_DUMP_FLAGS) $(LOG_INFO), \
     ))
 
     JDK_TARGETS += $(gen_cds_nocoops_archive_jdk)
@@ -169,7 +177,7 @@ ifeq ($(BUILD_CDS_ARCHIVE), true)
         COMMAND := $(FIXPATH) $(JRE_IMAGE_DIR)/bin/java -Xshare:dump \
             -XX:SharedArchiveFile=$(JRE_IMAGE_DIR)/$(CDS_NOCOOPS_ARCHIVE) \
             -XX:-UseCompressedOops \
-            -Xmx128M -Xms128M $(LOG_INFO), \
+            $(CDS_DUMP_FLAGS) $(LOG_INFO), \
     ))
 
     JRE_TARGETS += $(gen_cds_nocoops_archive_jre)

++++++ reproducible-cds-deterministic.patch ++++++
# 8253495: CDS generates non-deterministic output
#
# Reviewed-by: erikj, kbarrett, ccheung, ihse
# (cherry picked from commit de4f04cb71a26ce03b96460cb8d1c1e28cd1ed38)
#
# Backported to make the shipped CDS archives of openSUSE
# java-17-openjdk reproducible. After pinning the build timestamp,
# lib/server/classes.jsa and classes_nocoops.jsa were the only remaining
# differences between two builds: the read-only region differed in size by
# 8 bytes and the rw, ro, bm and heap region checksums all differed, so
# the dump itself is not deterministic.
#
# This addresses all the causes:
#   - JVM_StartThread(): during -Xshare:dump, other Java threads
#     (ReferenceHandler, FinalizerThread, CleanerImpl) load symbols and
#     classes in a racy order, which changes the layout of the metaspace
#     regions.
#   - os::malloc(): alignment gaps in C++ structures are copied into the
#     archive, so they must be filled deterministically instead of being
#     left uninitialized.
#   - MethodCounters: execution counters depend on how much interpretation
#     happened before the dump, so they are now set to NULL like
#     MethodData already was.
#   - filler arrays: their contents end up in the archived heap and were
#     only zapped in debug builds.
#   - the dump time subgraph info table was hashed by Klass address, which
#     varies with ASLR, so its iteration order and hence the order of the
#     ro region allocations varied between runs.
#
# Adapted for 17, which is otherwise unchanged:
#   - src/hotspot/share/cds/dumpTimeClassInfo.hpp does not exist yet; on 17
#     DumpTimeSharedClassTable_hash() lives in systemDictionaryShared.cpp
#     and is not visible to heapShared.hpp. Rather than move it, keep
#     HeapShared::klass_hash() and give it the same deterministic body
#     (hash the offset of the class name within the symbol space). The
#     upstream template change exists only to let both tables share one
#     function, so nothing is lost.
#   - the corresponding hunks in os.cpp and prims/jvm.cpp were applied by
#     hand, the surrounding context differs.
#   - the test and make/scripts/compare.sh hunks were dropped.
#

diff --git a/src/hotspot/share/cds/archiveBuilder.cpp 
b/src/hotspot/share/cds/archiveBuilder.cpp
index 699926fcfe0..8e12cdabb8e 100644
--- a/src/hotspot/share/cds/archiveBuilder.cpp
+++ b/src/hotspot/share/cds/archiveBuilder.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -540,7 +540,8 @@ ArchiveBuilder::FollowMode 
ArchiveBuilder::get_follow_mode(MetaspaceClosure::Ref
   if (MetaspaceShared::is_in_shared_metaspace(obj)) {
     // Don't dump existing shared metadata again.
     return point_to_it;
-  } else if (ref->msotype() == MetaspaceObj::MethodDataType) {
+  } else if (ref->msotype() == MetaspaceObj::MethodDataType ||
+             ref->msotype() == MetaspaceObj::MethodCountersType) {
     return set_to_null;
   } else {
     if (ref->msotype() == MetaspaceObj::ClassType) {
diff --git a/src/hotspot/share/cds/archiveUtils.hpp 
b/src/hotspot/share/cds/archiveUtils.hpp
index cdb3d99ab53..6d8e0b43a68 100644
--- a/src/hotspot/share/cds/archiveUtils.hpp
+++ b/src/hotspot/share/cds/archiveUtils.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,7 @@
 #include "memory/virtualspace.hpp"
 #include "utilities/bitMap.hpp"
 #include "utilities/exceptions.hpp"
+#include "utilities/macros.hpp"
 
 class BootstrapInfo;
 class ReservedSpace;
@@ -142,7 +143,7 @@ public:
   char* expand_top_to(char* newtop);
   char* allocate(size_t num_bytes);
 
-  void append_intptr_t(intptr_t n, bool need_to_mark = false);
+  void append_intptr_t(intptr_t n, bool need_to_mark = false) NOT_CDS_RETURN;
 
   char* base()      const { return _base;        }
   char* top()       const { return _top;         }
diff --git a/src/hotspot/share/cds/heapShared.cpp 
b/src/hotspot/share/cds/heapShared.cpp
index 709282028a2..811da73ef24 100644
--- a/src/hotspot/share/cds/heapShared.cpp
+++ b/src/hotspot/share/cds/heapShared.cpp
@@ -454,7 +454,7 @@ KlassSubGraphInfo* HeapShared::init_subgraph_info(Klass* k, 
bool is_full_module_
   bool created;
   Klass* relocated_k = ArchiveBuilder::get_relocated_klass(k);
   KlassSubGraphInfo* info =
-    _dump_time_subgraph_info_table->put_if_absent(relocated_k, 
KlassSubGraphInfo(relocated_k, is_full_module_graph),
+    _dump_time_subgraph_info_table->put_if_absent(k, 
KlassSubGraphInfo(relocated_k, is_full_module_graph),
                                                   &created);
   assert(created, "must not initialize twice");
   return info;
@@ -462,8 +462,7 @@ KlassSubGraphInfo* HeapShared::init_subgraph_info(Klass* k, 
bool is_full_module_
 
 KlassSubGraphInfo* HeapShared::get_subgraph_info(Klass* k) {
   assert(DumpSharedSpaces, "dump time only");
-  Klass* relocated_k = ArchiveBuilder::get_relocated_klass(k);
-  KlassSubGraphInfo* info = _dump_time_subgraph_info_table->get(relocated_k);
+  KlassSubGraphInfo* info = _dump_time_subgraph_info_table->get(k);
   assert(info != NULL, "must have been initialized");
   return info;
 }
@@ -624,7 +623,8 @@ struct CopyKlassSubGraphInfoToArchive : StackObj {
         
(ArchivedKlassSubGraphInfoRecord*)ArchiveBuilder::ro_region_alloc(sizeof(ArchivedKlassSubGraphInfoRecord));
       record->init(&info);
 
-      unsigned int hash = 
SystemDictionaryShared::hash_for_shared_dictionary((address)klass);
+      Klass* relocated_k = ArchiveBuilder::get_relocated_klass(klass);
+      unsigned int hash = 
SystemDictionaryShared::hash_for_shared_dictionary((address)relocated_k);
       u4 delta = ArchiveBuilder::current()->any_to_offset_u4(record);
       _writer->add(hash, delta);
     }
diff --git a/src/hotspot/share/cds/heapShared.hpp 
b/src/hotspot/share/cds/heapShared.hpp
index 74de74d6c92..3473357ea6b 100644
--- a/src/hotspot/share/cds/heapShared.hpp
+++ b/src/hotspot/share/cds/heapShared.hpp
@@ -170,8 +170,16 @@ private:
   }
 
   static unsigned klass_hash(Klass* const& klass) {
-    // Generate deterministic hashcode even if SharedBaseAddress is changed 
due to ASLR.
-    return primitive_hash<address>(address(klass) - SharedBaseAddress);
+    if (DumpSharedSpaces) {
+      // Deterministic archive contents: hash by the offset of the class name
+      // within the symbol space. Unlike the Klass address, that offset does 
not
+      // depend on where the VM happened to map its memory (ASLR). This mirrors
+      // DumpTimeSharedClassTable_hash() in systemDictionaryShared.cpp.
+      uintx delta = klass->name() - MetaspaceShared::symbol_rs_base();
+      return primitive_hash<uintx>(delta);
+    } else {
+      return primitive_hash<Klass*>(klass);
+    }
   }
 
   class DumpTimeKlassSubGraphInfoTable
diff --git a/src/hotspot/share/gc/shared/collectedHeap.cpp 
b/src/hotspot/share/gc/shared/collectedHeap.cpp
index 2f90992f6ee..27e4f5765be 100644
--- a/src/hotspot/share/gc/shared/collectedHeap.cpp
+++ b/src/hotspot/share/gc/shared/collectedHeap.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -406,6 +406,11 @@ size_t CollectedHeap::filler_array_min_size() {
   return align_object_size(filler_array_hdr_size()); // align to 
MinObjAlignment
 }
 
+void CollectedHeap::zap_filler_array_with(HeapWord* start, size_t words, juint 
value) {
+  Copy::fill_to_words(start + filler_array_hdr_size(),
+                      words - filler_array_hdr_size(), value);
+}
+
 #ifdef ASSERT
 void CollectedHeap::fill_args_check(HeapWord* start, size_t words)
 {
@@ -416,8 +421,7 @@ void CollectedHeap::fill_args_check(HeapWord* start, size_t 
words)
 void CollectedHeap::zap_filler_array(HeapWord* start, size_t words, bool zap)
 {
   if (ZapFillerObjects && zap) {
-    Copy::fill_to_words(start + filler_array_hdr_size(),
-                        words - filler_array_hdr_size(), 0XDEAFBABE);
+    zap_filler_array_with(start, words, 0XDEAFBABE);
   }
 }
 #endif // ASSERT
@@ -434,7 +438,13 @@ CollectedHeap::fill_with_array(HeapWord* start, size_t 
words, bool zap)
 
   ObjArrayAllocator allocator(Universe::intArrayKlassObj(), words, (int)len, 
/* do_zero */ false);
   allocator.initialize(start);
-  DEBUG_ONLY(zap_filler_array(start, words, zap);)
+  if (DumpSharedSpaces) {
+    // This array is written into the CDS archive. Make sure it
+    // has deterministic contents.
+    zap_filler_array_with(start, words, 0);
+  } else {
+    DEBUG_ONLY(zap_filler_array(start, words, zap);)
+  }
 }
 
 void
diff --git a/src/hotspot/share/gc/shared/collectedHeap.hpp 
b/src/hotspot/share/gc/shared/collectedHeap.hpp
index cf1a6b6ff31..65b9c21c951 100644
--- a/src/hotspot/share/gc/shared/collectedHeap.hpp
+++ b/src/hotspot/share/gc/shared/collectedHeap.hpp
@@ -157,6 +157,7 @@ class CollectedHeap : public CHeapObj<mtGC> {
   static inline size_t filler_array_hdr_size();
   static inline size_t filler_array_min_size();
 
+  static inline void zap_filler_array_with(HeapWord* start, size_t words, 
juint value);
   DEBUG_ONLY(static void fill_args_check(HeapWord* start, size_t words);)
   DEBUG_ONLY(static void zap_filler_array(HeapWord* start, size_t words, bool 
zap = true);)
 
diff --git a/src/hotspot/share/prims/jvm.cpp b/src/hotspot/share/prims/jvm.cpp
index 7419921cd9a..3c9eb2d9dd7 100644
--- a/src/hotspot/share/prims/jvm.cpp
+++ b/src/hotspot/share/prims/jvm.cpp
@@ -2852,6 +2852,26 @@ static void thread_entry(JavaThread* thread, TRAPS) {
 
 
 JVM_ENTRY(void, JVM_StartThread(JNIEnv* env, jobject jthread))
+#if INCLUDE_CDS
+  if (DumpSharedSpaces) {
+    // During java -Xshare:dump, if we allow multiple Java threads to
+    // execute in parallel, symbols and classes may be loaded in
+    // random orders which will make the resulting CDS archive
+    // non-deterministic.
+    //
+    // Lucikly, during java -Xshare:dump, it's important to run only
+    // the code in the main Java thread (which is NOT started here) that
+    // creates the module graph, etc. It's safe to not start the other
+    // threads which are launched by class static initializers
+    // (ReferenceHandler, FinalizerThread and CleanerImpl).
+    if (log_is_enabled(Info, cds)) {
+      ResourceMark rm;
+      oop t = JNIHandles::resolve_non_null(jthread);
+      log_info(cds)("JVM_StartThread() ignored: %s", 
t->klass()->external_name());
+    }
+    return;
+  }
+#endif
   JavaThread *native_thread = NULL;
 
   // We cannot hold the Threads_lock when we throw an exception,
diff --git a/src/hotspot/share/runtime/os.cpp b/src/hotspot/share/runtime/os.cpp
index ae3c39f3b1e..338b18533e8 100644
--- a/src/hotspot/share/runtime/os.cpp
+++ b/src/hotspot/share/runtime/os.cpp
@@ -693,7 +693,12 @@ void* os::malloc(size_t size, MEMFLAGS memflags, const 
NativeCallStack& stack) {
 
   void* const inner_ptr = MemTracker::record_malloc((address)outer_ptr, size, 
memflags, stack);
 
-  DEBUG_ONLY(::memset(inner_ptr, uninitBlockPad, size);)
+  if (DumpSharedSpaces) {
+    // Need to deterministically fill all the alignment gaps in C++ structures.
+    ::memset(inner_ptr, 0, size);
+  } else {
+    DEBUG_ONLY(::memset(inner_ptr, uninitBlockPad, size);)
+  }
   DEBUG_ONLY(break_if_ptr_caught(inner_ptr);)
 
   return inner_ptr;

++++++ reproducible-classlist-g1.patch ++++++
# Make default classlist generation independent of the build CPU count
#
# JDK 17 can only archive Java heap objects with G1
# (HeapShared::is_heap_object_archiving_allowed() requires UseG1GC), while
# GC ergonomics select SerialGC on a machine with a single CPU. The
# intermediate -Xshare:dump of the classlist recipe therefore produces an
# archive without archived heap objects on a 1-core builder, the second
# HelloClasslist run does not restore the archived subgraphs, and the set
# of loaded classes changes. java/lang/Byte$ByteCache,
# java/lang/Short$ShortCache and jdk/internal/math/FDBigInteger are the
# visible symptom; the resulting lib/classlist difference then propagates
# into lib/modules, lib/server/classes*.jsa and jmods/java.base.jmod.
#
# Pin G1 for classlist generation if the JVM supports it, the same way the
# preceding change does for the shipped CDS archives. The guard expands to
# nothing for variants built without the g1gc feature.
#
# Measured on jdk21u-dev, where make/GenerateLinkOptData.gmk is identical:
# with this change the classlist and the intermediate archive are
# bit-identical for 1, 2, 4 and 16 CPUs and under taskset -c 0, and match
# what multi-core builds produce today, so the shipped content does not
# change. Upstream only removed the G1 requirement in JDK 24 via
# JDK-8298614, which is not suitable for 17u.
#

diff --git a/make/GenerateLinkOptData.gmk b/make/GenerateLinkOptData.gmk
index 5dd766c8c07..4ade4373842 100644
--- a/make/GenerateLinkOptData.gmk
+++ b/make/GenerateLinkOptData.gmk
@@ -59,6 +59,19 @@ ifeq ($(EXTERNAL_BUILDJDK), true)
   INTERIM_IMAGE_DIR := $(BUILD_JDK)
 endif
 
+# These are needed for deterministic classlist:
+# - The classlist can be influenced by locale. Always set it to en/US.
+# - Only G1 supports dumping the shared heap, and GC ergonomics pick SerialGC 
on
+#   single-CPU machines. Without archived heap objects a different set of 
classes
+#   is loaded, so the classlist would depend on the CPU count of the build 
machine.
+#   Explicitly use G1 if the JVM supports it, like Images.gmk does for the 
shipped
+#   CDS archives.
+CLASSLIST_GC_OPT := $(if $(filter g1gc, 
$(JVM_FEATURES_$(JVM_VARIANT_MAIN))),-XX:+UseG1GC)
+
+CLASSLIST_FILE_VM_OPTS = \
+    -Duser.language=en -Duser.country=US \
+    $(CLASSLIST_GC_OPT)
+
 # Save the stderr output of the command and print it along with stdout in case
 # something goes wrong.
 $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) 
$(CLASSLIST_JAR)
@@ -66,17 +79,17 @@ $(CLASSLIST_FILE): 
$(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
        $(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $@))
        $(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, 
$(JLI_TRACE_FILE)))
        $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -XX:[email protected] 
\
-           -Duser.language=en -Duser.country=US \
+           $(CLASSLIST_FILE_VM_OPTS) \
            -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
            build.tools.classlist.HelloClasslist $(LOG_DEBUG)
        $(GREP) -v HelloClasslist [email protected] > [email protected]
        $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java -Xshare:dump \
            -XX:[email protected] -XX:[email protected] \
-           -Xmx128M -Xms128M $(LOG_INFO)
+           $(CLASSLIST_GC_OPT) -Xmx128M -Xms128M $(LOG_INFO)
        $(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java 
-XX:[email protected] \
            -XX:[email protected] -XX:[email protected] \
            -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
-           -Duser.language=en -Duser.country=US \
+           $(CLASSLIST_FILE_VM_OPTS) \
            --module-path $(SUPPORT_OUTPUTDIR)/classlist.jar \
            -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
            build.tools.classlist.HelloClasslist \

++++++ reproducible-classlist-striped64.patch ++++++
# 8295951: intermittent cmp_baseline task failures with CDS files
#
# Reviewed-by: iklam, erikj
# (cherry picked from commit e193a0b72a143889170b64da19fb22f7f8555e89)
#
# Applied manually, the surrounding context differs on 17.
#
# Striped64$Cell is only loaded when several threads contend in
# LongAdder.increment(), so whether it ends up in the default classlist
# depends on the timing and on the number of CPUs of the build machine.
# Loading it explicitly removes that source of non-determinism.
#

diff --git a/make/jdk/src/classes/build/tools/classlist/HelloClasslist.java 
b/make/jdk/src/classes/build/tools/classlist/HelloClasslist.java
index e5a1d044676..d70e385fa8b 100644
--- a/make/jdk/src/classes/build/tools/classlist/HelloClasslist.java
+++ b/make/jdk/src/classes/build/tools/classlist/HelloClasslist.java
@@ -124,6 +124,12 @@ public class HelloClasslist {
         invoke(handle("staticMethod_V", MethodType.methodType(void.class)));
 
         LOGGER.log(Level.FINE, "New Date: " + newDate + " - old: " + oldDate);
+
+        // The Striped64$Cell is loaded rarely only when there's a contention 
among
+        // multiple threads performing LongAdder.increment(). This results in
+        // an inconsistency in the classlist between builds (see JDK-8295951).
+        // To avoid the problem, load the class explicitly.
+        Class<?> striped64Class = 
Class.forName("java.util.concurrent.atomic.Striped64$Cell");
     }
 
     public static void staticMethod_V() {}

++++++ reproducible-source-date-epoch.patch ++++++
# 8282567: Improve source-date handling in build system
#
# Reviewed-by: erikj, sgehwolf
# (cherry picked from commit 5d5bf16b0af419781fd336fe33d8eab5adf8be5a)
#
# Backported to make openSUSE java-17-openjdk builds reproducible.
#
# Without this, configure ignores the SOURCE_DATE_EPOCH exported by the
# build service and defaults SOURCE_DATE to "updated", so
# SetupReproducibleBuild in make/InitSupport.gmk replaces the inherited
# SOURCE_DATE_EPOCH with $(shell date +%s) at make start. Every build
# therefore compiles with a different SOURCE_DATE_EPOCH, and since gcc
# derives __DATE__ and __TIME__ from that variable, the HOTSPOT_BUILD_TIME
# fallback in abstract_vm_version.cpp embeds a different timestamp in
# libjvm.so on each build. The same string reaches the CDS archives
# through FileMapHeader::_jvm_ident (filemap.cpp), and libjvm.so is also
# packaged inside java.base.jmod, so a single wall clock read makes four
# shipped files differ. The clobbered epoch additionally lands in
# lib/ct.sym, whose entries are stamped with SOURCE_DATE_EPOCH by
# make/modules/jdk.compiler/Gendata.gmk, which propagates into
# jdk.compiler.jmod.
#
# With this change SOURCE_DATE_EPOCH from the environment is honoured, it
# sets with_source_date_present=true so ENABLE_REPRODUCIBLE_BUILD becomes
# true (enabling jar --date, jmod --date, reproducible zips and
# -frandom-seed), and HOTSPOT_BUILD_TIME is derived from it.
#
# The doc/building.{md,html} hunks were dropped; they only document the
# new configure behaviour and conflict with 17u generated HTML.
#

diff --git a/make/InitSupport.gmk b/make/InitSupport.gmk
index d2291c50f21..62fdc438c8a 100644
--- a/make/InitSupport.gmk
+++ b/make/InitSupport.gmk
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -310,17 +310,16 @@ else # $(HAS_SPEC)=true
   # level of reproducible builds
   define SetupReproducibleBuild
     ifeq ($$(SOURCE_DATE), updated)
-      SOURCE_DATE := $$(shell $$(DATE) +"%s")
-    endif
-    export SOURCE_DATE_EPOCH := $$(SOURCE_DATE)
-    ifeq ($$(IS_GNU_DATE), yes)
-      export SOURCE_DATE_ISO_8601 := $$(shell $$(DATE) --utc \
-                                                       
--date="@$$(SOURCE_DATE_EPOCH)" \
-                                                       +"%Y-%m-%dT%H:%M:%SZ" 
2> /dev/null)
-    else
-      export SOURCE_DATE_ISO_8601 := $$(shell $$(DATE) -u \
-                                                       -j -f "%s" 
"$$(SOURCE_DATE_EPOCH)" \
-                                                       +"%Y-%m-%dT%H:%M:%SZ" 
2> /dev/null)
+      # For static values of SOURCE_DATE (not "updated"), these are set in 
spec.gmk
+      export SOURCE_DATE_EPOCH := $$(shell $$(DATE) +"%s")
+      ifeq ($$(IS_GNU_DATE), yes)
+        export SOURCE_DATE_ISO_8601 := $$(shell $$(DATE) --utc \
+            --date="@$$(SOURCE_DATE_EPOCH)" +"$$(ISO_8601_FORMAT_STRING)" \
+            2> /dev/null)
+      else
+        export SOURCE_DATE_ISO_8601 := $$(shell $$(DATE) -u -j -f "%s" \
+            "$$(SOURCE_DATE_EPOCH)" +"$$(ISO_8601_FORMAT_STRING)" 2> /dev/null)
+      endif
     endif
   endef
 
diff --git a/make/autoconf/configure.ac b/make/autoconf/configure.ac
index 173d533359d..83997e45710 100644
--- a/make/autoconf/configure.ac
+++ b/make/autoconf/configure.ac
@@ -153,6 +153,7 @@ BOOTJDK_SETUP_DOCS_REFERENCE_JDK
 #
 ###############################################################################
 
+JDKOPT_SETUP_REPRODUCIBLE_BUILD
 JDKOPT_SETUP_JDK_OPTIONS
 
 ###############################################################################
@@ -205,7 +206,6 @@ PLATFORM_SETUP_OPENJDK_TARGET_BITS
 PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
 
 # Configure flags for the tools. Need to know if we should build reproducible.
-JDKOPT_SETUP_REPRODUCIBLE_BUILD
 FLAGS_SETUP_FLAGS
 
 # Setup debug symbols (need objcopy from the toolchain for that)
diff --git a/make/autoconf/help.m4 b/make/autoconf/help.m4
index 139d18a8628..8cbf9276df0 100644
--- a/make/autoconf/help.m4
+++ b/make/autoconf/help.m4
@@ -284,6 +284,13 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: 
$OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
 
+  if test "x$SOURCE_DATE" != xupdated; then
+    source_date_info="$SOURCE_DATE ($SOURCE_DATE_ISO_8601)"
+  else
+    source_date_info="Determined at build time"
+  fi
+  printf "* Source date:    $source_date_info\n"
+
   printf "\n"
   printf "Tools summary:\n"
   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
diff --git a/make/autoconf/hotspot.m4 b/make/autoconf/hotspot.m4
index 43653c115be..2f9f5e7111e 100644
--- a/make/autoconf/hotspot.m4
+++ b/make/autoconf/hotspot.m4
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -123,12 +123,26 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC],
     HOTSPOT_TARGET_CPU_ARCH=zero
   fi
 
+
   AC_ARG_WITH([hotspot-build-time], 
[AS_HELP_STRING([--with-hotspot-build-time],
-  [timestamp to use in hotspot version string, empty for on-the-fly 
@<:@empty@:>@])])
+  [timestamp to use in hotspot version string, empty means determined at build 
time @<:@source-date/empty@:>@])])
+
+  AC_MSG_CHECKING([what hotspot build time to use])
 
   if test "x$with_hotspot_build_time" != x; then
     HOTSPOT_BUILD_TIME="$with_hotspot_build_time"
+    AC_MSG_RESULT([$HOTSPOT_BUILD_TIME (from --with-hotspot-build-time)])
+  else
+    if test "x$SOURCE_DATE" = xupdated; then
+      HOTSPOT_BUILD_TIME=""
+      AC_MSG_RESULT([determined at build time (default)])
+    else
+      # If we have a fixed value for SOURCE_DATE, use it as default
+      HOTSPOT_BUILD_TIME="$SOURCE_DATE_ISO_8601"
+      AC_MSG_RESULT([$HOTSPOT_BUILD_TIME (from --with-source-date)])
+    fi
   fi
+
   AC_SUBST(HOTSPOT_BUILD_TIME)
 
 
diff --git a/make/autoconf/jdk-options.m4 b/make/autoconf/jdk-options.m4
index c20e8c7e291..4f569c8ab3b 100644
--- a/make/autoconf/jdk-options.m4
+++ b/make/autoconf/jdk-options.m4
@@ -221,16 +221,16 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
 
   # Setup default copyright year. Mostly overridden when building close to a 
new year.
   AC_ARG_WITH(copyright-year, [AS_HELP_STRING([--with-copyright-year],
-      [Set copyright year value for build @<:@current year@:>@])])
+      [Set copyright year value for build @<:@current year/source-date@:>@])])
   if test "x$with_copyright_year" = xyes; then
     AC_MSG_ERROR([Copyright year must have a value])
   elif test "x$with_copyright_year" != x; then
     COPYRIGHT_YEAR="$with_copyright_year"
-  elif test "x$SOURCE_DATE_EPOCH" != x; then
+  elif test "x$SOURCE_DATE" != xupdated; then
     if test "x$IS_GNU_DATE" = xyes; then
-      COPYRIGHT_YEAR=`date --date=@$SOURCE_DATE_EPOCH +%Y`
+      COPYRIGHT_YEAR=`$DATE --date=@$SOURCE_DATE +%Y`
     else
-      COPYRIGHT_YEAR=`date -j -f %s $SOURCE_DATE_EPOCH +%Y`
+      COPYRIGHT_YEAR=`$DATE -j -f %s $SOURCE_DATE +%Y`
     fi
   else
     COPYRIGHT_YEAR=`$DATE +'%Y'`
@@ -649,15 +649,28 @@ AC_DEFUN([JDKOPT_ALLOW_ABSOLUTE_PATHS_IN_OUTPUT],
 AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
 [
   AC_ARG_WITH([source-date], [AS_HELP_STRING([--with-source-date],
-      [how to set SOURCE_DATE_EPOCH ('updated', 'current', 'version' a 
timestamp or an ISO-8601 date) @<:@updated@:>@])],
+      [how to set SOURCE_DATE_EPOCH ('updated', 'current', 'version' a 
timestamp or an ISO-8601 date) @<:@updated/value of SOURCE_DATE_EPOCH@:>@])],
       [with_source_date_present=true], [with_source_date_present=false])
 
+  if test "x$SOURCE_DATE_EPOCH" != x && test "x$with_source_date" != x; then
+    AC_MSG_WARN([--with-source-date will override SOURCE_DATE_EPOCH])
+  fi
+
   AC_MSG_CHECKING([what source date to use])
 
   if test "x$with_source_date" = xyes; then
     AC_MSG_ERROR([--with-source-date must have a value])
-  elif test "x$with_source_date" = xupdated || test "x$with_source_date" = x; 
then
-    # Tell the makefiles to update at each build
+  elif test "x$with_source_date" = x; then
+    if test "x$SOURCE_DATE_EPOCH" != x; then
+      SOURCE_DATE=$SOURCE_DATE_EPOCH
+      with_source_date_present=true
+      AC_MSG_RESULT([$SOURCE_DATE, from SOURCE_DATE_EPOCH])
+    else
+      # Tell the makefiles to update at each build
+      SOURCE_DATE=updated
+      AC_MSG_RESULT([determined at build time (default)])
+    fi
+  elif test "x$with_source_date" = xupdated; then
     SOURCE_DATE=updated
     AC_MSG_RESULT([determined at build time, from 'updated'])
   elif test "x$with_source_date" = xcurrent; then
@@ -689,6 +702,18 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
     fi
   fi
 
+  ISO_8601_FORMAT_STRING="%Y-%m-%dT%H:%M:%SZ"
+  if test "x$SOURCE_DATE" != xupdated; then
+    # If we have a fixed value for SOURCE_DATE, we need to set 
SOURCE_DATE_EPOCH
+    # for the rest of configure.
+    SOURCE_DATE_EPOCH="$SOURCE_DATE"
+    if test "x$IS_GNU_DATE" = xyes; then
+      SOURCE_DATE_ISO_8601=`$DATE --utc --date="@$SOURCE_DATE" 
+"$ISO_8601_FORMAT_STRING" 2> /dev/null`
+    else
+      SOURCE_DATE_ISO_8601=`$DATE -u -j -f "%s" "$SOURCE_DATE" 
+"$ISO_8601_FORMAT_STRING" 2> /dev/null`
+    fi
+  fi
+
   REPRODUCIBLE_BUILD_DEFAULT=$with_source_date_present
 
   if test "x$OPENJDK_BUILD_OS" = xwindows && \
@@ -713,6 +738,8 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
 
   AC_SUBST(SOURCE_DATE)
   AC_SUBST(ENABLE_REPRODUCIBLE_BUILD)
+  AC_SUBST(ISO_8601_FORMAT_STRING)
+  AC_SUBST(SOURCE_DATE_ISO_8601)
 ])
 
 
################################################################################
diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in
index 807ba27589b..f5536ab886c 100644
--- a/make/autoconf/spec.gmk.in
+++ b/make/autoconf/spec.gmk.in
@@ -127,6 +127,13 @@ RELEASE_FILE_LIBC:=@RELEASE_FILE_LIBC@
 
 SOURCE_DATE := @SOURCE_DATE@
 ENABLE_REPRODUCIBLE_BUILD := @ENABLE_REPRODUCIBLE_BUILD@
+ISO_8601_FORMAT_STRING := @ISO_8601_FORMAT_STRING@
+
+ifneq ($(SOURCE_DATE), updated)
+  # For "updated" source date value, these are set in InitSupport.gmk
+  export SOURCE_DATE_EPOCH := $(SOURCE_DATE)
+  SOURCE_DATE_ISO_8601 := @SOURCE_DATE_ISO_8601@
+endif
 
 LIBM:=@LIBM@
 LIBDL:=@LIBDL@

++++++ tzdata-2026c.patch ++++++
++++ 807 lines (skipped)

Reply via email to