From 150143a6d15d88557355b3c70be60cebdb79b146 Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Wed, 20 May 2026 07:58:21 +0000 Subject: [PATCH 1/9] 8382035: [ubsan] Under UBSAN builds, disable tests that rely on simulated JVM crashes Backport-of: 18d0d27a6ea83ee28ce56215d49725717aac6169 --- test/hotspot/jtreg/runtime/ErrorHandling/TestDwarf.java | 1 + .../jtreg/runtime/ErrorHandling/VeryEarlyAssertTest.java | 5 +++-- test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java | 1 + test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java | 2 ++ test/hotspot/jtreg/serviceability/sa/ClhsdbPmap.java | 1 + test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java | 1 + 6 files changed, 9 insertions(+), 2 deletions(-) diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/TestDwarf.java b/test/hotspot/jtreg/runtime/ErrorHandling/TestDwarf.java index 00b5becdbfa..1331143e929 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/TestDwarf.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/TestDwarf.java @@ -29,6 +29,7 @@ * in the same directory as the libjvm.so file, in a subdirectory called .debug, or in the path specified * by the environment variable _JVM_DWARF_PATH, then no verification of the hs_err_file is done for libjvm.so. * @requires vm.debug == true & vm.flagless & vm.compMode != "Xint" & os.family == "linux" & !vm.graal.enabled & vm.gc.G1 + * @requires !vm.ubsan * @modules java.base/jdk.internal.misc * @run main/native/othervm -Xbootclasspath/a:. -XX:-CreateCoredumpOnCrash TestDwarf */ diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/VeryEarlyAssertTest.java b/test/hotspot/jtreg/runtime/ErrorHandling/VeryEarlyAssertTest.java index 2d26079fa0e..4534a609bb3 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/VeryEarlyAssertTest.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/VeryEarlyAssertTest.java @@ -1,6 +1,6 @@ /* - * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2018, 2022 SAP. All rights reserved. + * Copyright (c) 2013, 2026, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2026 SAP. 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 @@ * @library /test/lib * @modules java.base/jdk.internal.misc * @requires vm.flagless + * @requires !vm.ubsan * @requires (vm.debug == true) * @requires os.family == "linux" * @run driver VeryEarlyAssertTest diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java index 53370fc09d6..46e25eef043 100644 --- a/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbCDSCore.java @@ -27,6 +27,7 @@ * @summary Test the clhsdb commands 'printmdo', 'printall', 'jstack' on a CDS enabled corefile. * @requires vm.cds * @requires vm.hasSA + * @requires !vm.ubsan * @requires vm.flavor == "server" * @library /test/lib * @modules java.base/jdk.internal.misc diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java index c75a38490d5..46cd0efc0f9 100644 --- a/test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java @@ -50,6 +50,7 @@ * @summary Test the clhsdb 'findpc' command with Xcomp on core file * @requires vm.compMode != "Xcomp" * @requires vm.hasSA + * @requires !vm.ubsan * @requires vm.compiler1.enabled * @requires vm.opt.DeoptimizeALot != true * @library /test/lib @@ -72,6 +73,7 @@ * @bug 8193124 * @summary Test the clhsdb 'findpc' command w/o Xcomp on core file * @requires vm.hasSA + * @requires !vm.ubsan * @requires vm.compiler1.enabled * @library /test/lib * @run main/othervm/timeout=480 ClhsdbFindPC false true diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbPmap.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbPmap.java index 5c0aa9457ae..ae11887f920 100644 --- a/test/hotspot/jtreg/serviceability/sa/ClhsdbPmap.java +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbPmap.java @@ -35,6 +35,7 @@ * @bug 8190198 * @summary Test clhsdb pmap command on a live process * @requires vm.hasSA + * @requires !vm.ubsan * @requires (os.arch != "riscv64" | !(vm.cpu.features ~= ".*qemu.*")) * @library /test/lib * @run main/othervm ClhsdbPmap false diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java index cd5b1206ce9..da90b6c9ea9 100644 --- a/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java @@ -35,6 +35,7 @@ * @bug 8190198 * @summary Test clhsdb pstack command on a live process * @requires vm.hasSA + * @requires !vm.ubsan * @requires (os.arch != "riscv64" | !(vm.cpu.features ~= ".*qemu.*")) * @library /test/lib * @run main/othervm ClhsdbPstack false From 36b6670ca3b3adbd946bf140ac8f185ac1a4ace0 Mon Sep 17 00:00:00 2001 From: SendaoYan Date: Wed, 20 May 2026 08:07:11 +0000 Subject: [PATCH 2/9] 8359083: Test jdkCheckHtml.java should report SkippedException rather than report fails when miss tidy Backport-of: 3e0ef832cc553c70eb7e8ee713c43aac67994b91 --- test/docs/jdk/javadoc/doccheck/DocCheck.java | 5 ++++- test/docs/jdk/javadoc/doccheck/checks/jdkCheckHtml.java | 4 ++-- .../doccheck/doccheckutils/checkers/TidyChecker.java | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/test/docs/jdk/javadoc/doccheck/DocCheck.java b/test/docs/jdk/javadoc/doccheck/DocCheck.java index acd61b0e76e..5819f641d6e 100644 --- a/test/docs/jdk/javadoc/doccheck/DocCheck.java +++ b/test/docs/jdk/javadoc/doccheck/DocCheck.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2025, 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 @@ -140,6 +140,9 @@ public void init() { var baseDir = DOCS_DIR.resolve(DIR); fileTester.processFiles(baseDir); files = fileTester.getFiles(); + if (html) { + new TidyChecker(); + } } public List getCheckers() { diff --git a/test/docs/jdk/javadoc/doccheck/checks/jdkCheckHtml.java b/test/docs/jdk/javadoc/doccheck/checks/jdkCheckHtml.java index 3e9f3ab9f82..fdf6ab7e78d 100644 --- a/test/docs/jdk/javadoc/doccheck/checks/jdkCheckHtml.java +++ b/test/docs/jdk/javadoc/doccheck/checks/jdkCheckHtml.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2025, 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 @@ -26,6 +26,6 @@ * @bug 8337109 * @summary Check the html in the generated documentation * @library /test/langtools/tools/lib ../../doccheck /test/lib ../../../../tools/tester - * @build DocTester toolbox.TestRunner + * @build DocTester toolbox.TestRunner jtreg.SkippedException * @run main/othervm -Ddoccheck.checks=html DocCheck */ diff --git a/test/docs/jdk/javadoc/doccheck/doccheckutils/checkers/TidyChecker.java b/test/docs/jdk/javadoc/doccheck/doccheckutils/checkers/TidyChecker.java index 727e90a76e3..36a6a4a7b7a 100644 --- a/test/docs/jdk/javadoc/doccheck/doccheckutils/checkers/TidyChecker.java +++ b/test/docs/jdk/javadoc/doccheck/doccheckutils/checkers/TidyChecker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2024, 2025, 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 @@ -38,6 +38,7 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; +import jtreg.SkippedException; public class TidyChecker implements FileChecker, AutoCloseable { private final Path TIDY; @@ -164,8 +165,7 @@ private Path initTidy() { if (p.isPresent()) { tidyExePath = p.get(); } else { - System.err.println("tidy not found on PATH"); - return Path.of("tidy"); //non-null placeholder return; exception would be better + throw new jtreg.SkippedException("tidy not found on PATH"); } } From f8367a2a0e09d85e4b834d02b463230e97929536 Mon Sep 17 00:00:00 2001 From: Goetz Lindenmaier Date: Thu, 21 May 2026 11:59:23 +0000 Subject: [PATCH 3/9] 8384495: Update Libpng to 1.6.58 Backport-of: 29ffcec4b75487158b51ccca0af5e273ee1cb9f1 --- src/java.desktop/share/legal/libpng.md | 2 +- .../native/libsplashscreen/libpng/CHANGES | 7 +++++++ .../native/libsplashscreen/libpng/README | 2 +- .../share/native/libsplashscreen/libpng/png.c | 4 ++-- .../share/native/libsplashscreen/libpng/png.h | 14 ++++++------- .../native/libsplashscreen/libpng/pngconf.h | 2 +- .../libsplashscreen/libpng/pnglibconf.h | 2 +- .../native/libsplashscreen/libpng/pngrtran.c | 20 ++++++++----------- 8 files changed, 28 insertions(+), 25 deletions(-) diff --git a/src/java.desktop/share/legal/libpng.md b/src/java.desktop/share/legal/libpng.md index 7783fc7ff03..4c17a52a7ef 100644 --- a/src/java.desktop/share/legal/libpng.md +++ b/src/java.desktop/share/legal/libpng.md @@ -1,4 +1,4 @@ -## libpng v1.6.57 +## libpng v1.6.58 ### libpng License
diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/CHANGES b/src/java.desktop/share/native/libsplashscreen/libpng/CHANGES
index ba81df0c0e6..208ca6eaf17 100644
--- a/src/java.desktop/share/native/libsplashscreen/libpng/CHANGES
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/CHANGES
@@ -6379,6 +6379,13 @@ Version 1.6.57 [April 8, 2026]
   Fixed integer overflow in rowbytes computation in read transforms.
     (Contributed by Mohammad Seet.)
 
+Version 1.6.58 [April 15, 2026]
+  Fixed a regression introduced in version 1.6.56 that caused `png_get_PLTE`
+    to return stale palette data after applying gamma and background transforms
+    in-place.
+    (Reported by ralfjunker .)
+
+
 Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
 Subscription is required; visit
 
diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/README b/src/java.desktop/share/native/libsplashscreen/libpng/README
index 179b8dc8cb4..75a92ab7233 100644
--- a/src/java.desktop/share/native/libsplashscreen/libpng/README
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/README
@@ -1,4 +1,4 @@
-README for libpng version 1.6.57
+README for libpng version 1.6.58
 ================================
 
 See the note about version numbers near the top of `png.h`.
diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/png.c b/src/java.desktop/share/native/libsplashscreen/libpng/png.c
index e4e13b0a684..12f7ce53f34 100644
--- a/src/java.desktop/share/native/libsplashscreen/libpng/png.c
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/png.c
@@ -42,7 +42,7 @@
 #include "pngpriv.h"
 
 /* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_57 Your_png_h_is_not_version_1_6_57;
+typedef png_libpng_version_1_6_58 Your_png_h_is_not_version_1_6_58;
 
 /* Sanity check the chunks definitions - PNG_KNOWN_CHUNKS from pngpriv.h and the
  * corresponding macro definitions.  This causes a compile time failure if
@@ -849,7 +849,7 @@ png_get_copyright(png_const_structrp png_ptr)
    return PNG_STRING_COPYRIGHT
 #else
    return PNG_STRING_NEWLINE \
-      "libpng version 1.6.57" PNG_STRING_NEWLINE \
+      "libpng version 1.6.58" PNG_STRING_NEWLINE \
       "Copyright (c) 2018-2026 Cosmin Truta" PNG_STRING_NEWLINE \
       "Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
       PNG_STRING_NEWLINE \
diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/png.h b/src/java.desktop/share/native/libsplashscreen/libpng/png.h
index 349e7d07383..86a7c8ca1b0 100644
--- a/src/java.desktop/share/native/libsplashscreen/libpng/png.h
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/png.h
@@ -29,7 +29,7 @@
  * However, the following notice accompanied the original version of this
  * file and, per its terms, should not be removed:
  *
- * libpng version 1.6.57
+ * libpng version 1.6.58
  *
  * Copyright (c) 2018-2026 Cosmin Truta
  * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
@@ -43,7 +43,7 @@
  *   libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
  *   libpng versions 0.97, January 1998, through 1.6.35, July 2018:
  *     Glenn Randers-Pehrson
- *   libpng versions 1.6.36, December 2018, through 1.6.57, April 2026:
+ *   libpng versions 1.6.36, December 2018, through 1.6.58, April 2026:
  *     Cosmin Truta
  *   See also "Contributing Authors", below.
  */
@@ -267,7 +267,7 @@
  *    ...
  *    1.5.30                  15    10530  15.so.15.30[.0]
  *    ...
- *    1.6.57                  16    10657  16.so.16.57[.0]
+ *    1.6.58                  16    10658  16.so.16.58[.0]
  *
  *    Henceforth the source version will match the shared-library major and
  *    minor numbers; the shared-library major version number will be used for
@@ -303,7 +303,7 @@
  */
 
 /* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.57"
+#define PNG_LIBPNG_VER_STRING "1.6.58"
 #define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n"
 
 /* The versions of shared library builds should stay in sync, going forward */
@@ -314,7 +314,7 @@
 /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
 #define PNG_LIBPNG_VER_MAJOR   1
 #define PNG_LIBPNG_VER_MINOR   6
-#define PNG_LIBPNG_VER_RELEASE 57
+#define PNG_LIBPNG_VER_RELEASE 58
 
 /* This should be zero for a public release, or non-zero for a
  * development version.
@@ -345,7 +345,7 @@
  * From version 1.0.1 it is:
  * XXYYZZ, where XX=major, YY=minor, ZZ=release
  */
-#define PNG_LIBPNG_VER 10657 /* 1.6.57 */
+#define PNG_LIBPNG_VER 10658 /* 1.6.58 */
 
 /* Library configuration: these options cannot be changed after
  * the library has been built.
@@ -455,7 +455,7 @@ extern "C" {
 /* This triggers a compiler error in png.c, if png.c and png.h
  * do not agree upon the version number.
  */
-typedef char *png_libpng_version_1_6_57;
+typedef char *png_libpng_version_1_6_58;
 
 /* Basic control structions.  Read libpng-manual.txt or libpng.3 for more info.
  *
diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/pngconf.h b/src/java.desktop/share/native/libsplashscreen/libpng/pngconf.h
index 1a5bb7b60f8..e035a155803 100644
--- a/src/java.desktop/share/native/libsplashscreen/libpng/pngconf.h
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngconf.h
@@ -29,7 +29,7 @@
  * However, the following notice accompanied the original version of this
  * file and, per its terms, should not be removed:
  *
- * libpng version 1.6.57
+ * libpng version 1.6.58
  *
  * Copyright (c) 2018-2026 Cosmin Truta
  * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/pnglibconf.h b/src/java.desktop/share/native/libsplashscreen/libpng/pnglibconf.h
index de63c998927..46cba507f65 100644
--- a/src/java.desktop/share/native/libsplashscreen/libpng/pnglibconf.h
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/pnglibconf.h
@@ -31,7 +31,7 @@
  * However, the following notice accompanied the original version of this
  * file and, per its terms, should not be removed:
  */
-/* libpng version 1.6.57 */
+/* libpng version 1.6.58 */
 
 /* Copyright (c) 2018-2026 Cosmin Truta */
 /* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */
diff --git a/src/java.desktop/share/native/libsplashscreen/libpng/pngrtran.c b/src/java.desktop/share/native/libsplashscreen/libpng/pngrtran.c
index 838c8460f91..99050080e9d 100644
--- a/src/java.desktop/share/native/libsplashscreen/libpng/pngrtran.c
+++ b/src/java.desktop/share/native/libsplashscreen/libpng/pngrtran.c
@@ -2099,19 +2099,15 @@ png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr)
 {
    png_debug(1, "in png_read_transform_info");
 
-   if (png_ptr->transformations != 0)
+   if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
+       info_ptr->palette != NULL && png_ptr->palette != NULL)
    {
-      if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
-          info_ptr->palette != NULL && png_ptr->palette != NULL)
-      {
-         /* Sync info_ptr->palette with png_ptr->palette.
-          * The function png_init_read_transformations may have modified
-          * png_ptr->palette in place (e.g. for gamma correction or for
-          * background compositing).
-          */
-         memcpy(info_ptr->palette, png_ptr->palette,
-             PNG_MAX_PALETTE_LENGTH * (sizeof (png_color)));
-      }
+      /* Sync info_ptr->palette with png_ptr->palette, which may
+       * have been modified by png_init_read_transformations
+       * (e.g. for gamma correction or background compositing).
+       */
+      memcpy(info_ptr->palette, png_ptr->palette,
+          PNG_MAX_PALETTE_LENGTH * (sizeof (png_color)));
    }
 
 #ifdef PNG_READ_EXPAND_SUPPORTED

From 463d0f86150ee8c865333a630971e9f827f9f409 Mon Sep 17 00:00:00 2001
From: Richard Reingruber 
Date: Thu, 21 May 2026 12:28:38 +0000
Subject: [PATCH 4/9] 8380041: PPC: remove POWER6 remnants

Backport-of: 7c0da6702ffeed4fb5d991241010a133a7225321
---
 src/hotspot/cpu/ppc/assembler_ppc.hpp             |  7 -------
 src/hotspot/cpu/ppc/assembler_ppc.inline.hpp      |  2 --
 src/hotspot/cpu/ppc/disassembler_ppc.cpp          |  3 ---
 src/hotspot/cpu/ppc/macroAssembler_ppc.cpp        |  4 ++--
 src/hotspot/cpu/ppc/macroAssembler_ppc.hpp        |  8 --------
 src/hotspot/cpu/ppc/macroAssembler_ppc.inline.hpp | 13 ++++---------
 src/hotspot/cpu/ppc/ppc.ad                        | 14 --------------
 7 files changed, 6 insertions(+), 45 deletions(-)

diff --git a/src/hotspot/cpu/ppc/assembler_ppc.hpp b/src/hotspot/cpu/ppc/assembler_ppc.hpp
index 314517fd56a..3c444207b11 100644
--- a/src/hotspot/cpu/ppc/assembler_ppc.hpp
+++ b/src/hotspot/cpu/ppc/assembler_ppc.hpp
@@ -1573,10 +1573,6 @@ class Assembler : public AbstractAssembler {
   static bool is_nop(int x) {
     return x == 0x60000000;
   }
-  // endgroup opcode for Power6
-  static bool is_endgroup(int x) {
-    return is_ori(x) && inv_ra_field(x) == 1 && inv_rs_field(x) == 1 && inv_d1_field(x) == 0;
-  }
 
 
  private:
@@ -1652,9 +1648,6 @@ class Assembler : public AbstractAssembler {
   inline void ori_opt( Register d, int ui16);
   inline void oris_opt(Register d, int ui16);
 
-  // endgroup opcode for Power6
-  inline void endgroup();
-
   // count instructions
   inline void cntlzw(  Register a, Register s);
   inline void cntlzw_( Register a, Register s);
diff --git a/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp b/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp
index 792e5d6d5ad..482d01bdab2 100644
--- a/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp
+++ b/src/hotspot/cpu/ppc/assembler_ppc.inline.hpp
@@ -253,8 +253,6 @@ inline void Assembler::mr(      Register d, Register s)   { Assembler::orr(d, s,
 inline void Assembler::ori_opt( Register d, int ui16)     { if (ui16!=0) Assembler::ori( d, d, ui16); }
 inline void Assembler::oris_opt(Register d, int ui16)     { if (ui16!=0) Assembler::oris(d, d, ui16); }
 
-inline void Assembler::endgroup()                         { Assembler::ori(R1, R1, 0); }
-
 // count instructions
 inline void Assembler::cntlzw(  Register a, Register s)              { emit_int32(CNTLZW_OPCODE | rta(a) | rs(s) | rc(0)); }
 inline void Assembler::cntlzw_( Register a, Register s)              { emit_int32(CNTLZW_OPCODE | rta(a) | rs(s) | rc(1)); }
diff --git a/src/hotspot/cpu/ppc/disassembler_ppc.cpp b/src/hotspot/cpu/ppc/disassembler_ppc.cpp
index fb3cb50cdec..2e16e1a301f 100644
--- a/src/hotspot/cpu/ppc/disassembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/disassembler_ppc.cpp
@@ -119,9 +119,6 @@ address Disassembler::decode_instruction0(address here, outputStream * st, addre
   } else if (instruction == 0xbadbabe) {
     st->print(".data 0xbadbabe");
     next = here + Assembler::instr_len(here);
-  } else if (Assembler::is_endgroup(instruction)) {
-    st->print("endgroup");
-    next = here + Assembler::instr_len(here);
   } else {
     next = here;
   }
diff --git a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
index bcb2df203a2..1bd74ca03d6 100644
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp
@@ -482,7 +482,7 @@ void MacroAssembler::set_dest_of_bc_far_at(address instruction_addr, address des
     // variant 3, far cond branch to the next instruction, already patched to nops:
     //
     //    nop
-    //    endgroup
+    //    nop
     //  SKIP/DEST:
     //
     return;
@@ -499,7 +499,7 @@ void MacroAssembler::set_dest_of_bc_far_at(address instruction_addr, address des
   if (is_bc_far_variant2_at(instruction_addr) && dest == instruction_addr + 8) {
     // Far branch to next instruction: Optimize it by patching nops (produce variant 3).
     masm.nop();
-    masm.endgroup();
+    masm.nop();
   } else {
     if (is_bc_far_variant1_at(instruction_addr)) {
       // variant 1, the 1st instruction contains the destination address:
diff --git a/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp b/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp
index 9f272e96bcf..ab7bb653d11 100644
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.hpp
@@ -70,14 +70,6 @@ class MacroAssembler: public Assembler {
   // Move register if destination register and target register are different
   inline void mr_if_needed(Register rd, Register rs);
   inline void fmr_if_needed(FloatRegister rd, FloatRegister rs);
-  // This is dedicated for emitting scheduled mach nodes. For better
-  // readability of the ad file I put it here.
-  // Endgroups are not needed if
-  //  - the scheduler is off
-  //  - the scheduler found that there is a natural group end, in that
-  //    case it reduced the size of the instruction used in the test
-  //    yielding 'needed'.
-  inline void endgroup_if_needed(bool needed);
 
   // Memory barriers.
   inline void membar(int bits);
diff --git a/src/hotspot/cpu/ppc/macroAssembler_ppc.inline.hpp b/src/hotspot/cpu/ppc/macroAssembler_ppc.inline.hpp
index d27011112e2..6212958b819 100644
--- a/src/hotspot/cpu/ppc/macroAssembler_ppc.inline.hpp
+++ b/src/hotspot/cpu/ppc/macroAssembler_ppc.inline.hpp
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2025 SAP SE. All rights reserved.
+ * Copyright (c) 2002, 2026, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2026 SAP SE. 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
@@ -71,11 +71,6 @@ inline void MacroAssembler::mr_if_needed(Register rd, Register rs) {
 inline void MacroAssembler::fmr_if_needed(FloatRegister rd, FloatRegister rs) {
   if (rs != rd) fmr(rd, rs);
 }
-inline void MacroAssembler::endgroup_if_needed(bool needed) {
-  if (needed) {
-    endgroup();
-  }
-}
 
 inline void MacroAssembler::membar(int bits) {
   // Comment: Usage of elemental_membar(bits) is not recommended for Power 8.
@@ -239,13 +234,13 @@ inline bool MacroAssembler::is_bc_far_variant3_at(address instruction_addr) {
   // Variant 3, far cond branch to the next instruction, already patched to nops:
   //
   //    nop
-  //    endgroup
+  //    nop
   //  SKIP/DEST:
   //
   const int instruction_1 = *(int*)(instruction_addr);
   const int instruction_2 = *(int*)(instruction_addr + 4);
   return is_nop(instruction_1) &&
-         is_endgroup(instruction_2);
+         is_nop(instruction_2);
 }
 
 // set dst to -1, 0, +1 as follows: if CR0bi is "greater than", dst is set to 1,
diff --git a/src/hotspot/cpu/ppc/ppc.ad b/src/hotspot/cpu/ppc/ppc.ad
index c4a8172cf92..b68632f0b37 100644
--- a/src/hotspot/cpu/ppc/ppc.ad
+++ b/src/hotspot/cpu/ppc/ppc.ad
@@ -14211,20 +14211,6 @@ instruct tlsLoadP(threadRegP dst) %{
 
 //---Some PPC specific nodes---------------------------------------------------
 
-// Stop a group.
-instruct endGroup() %{
-  ins_cost(0);
-
-  ins_is_nop(true);
-
-  format %{ "End Bundle (ori r1, r1, 0)" %}
-  size(4);
-  ins_encode %{
-    __ endgroup();
-  %}
-  ins_pipe(pipe_class_default);
-%}
-
 // Nop instructions
 
 instruct fxNop() %{

From 3334fd4876f8a4995160995d9b218c410eded6d6 Mon Sep 17 00:00:00 2001
From: Andrew John Hughes 
Date: Thu, 21 May 2026 12:38:06 +0000
Subject: [PATCH 5/9] 8382020: Time Zone Abbreviation Not Localized for
 Non-English Locales 8384043: [REDO] Incorrect handling of Hawaii_Aleutian
 metazone

Reviewed-by: goetz
Backport-of: 49a15be918673ee49c3a02287aa268a87419147a
---
 .../tools/cldrconverter/CLDRConverter.java    |  58 ++-
 .../resources/cldr/TimeZoneNamesTest.java     | 360 ++++++++++--------
 2 files changed, 242 insertions(+), 176 deletions(-)

diff --git a/make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java b/make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java
index 55dd6a8d6ad..da8eba96dc7 100644
--- a/make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java
+++ b/make/jdk/src/classes/build/tools/cldrconverter/CLDRConverter.java
@@ -787,10 +787,7 @@ private static Map extractZoneNames(Map map, Str
             String tzKey = Optional.ofNullable((String)handlerSupplMeta.get(tzid))
                                    .orElse(tzid);
             // Follow link, if needed
-            String tzLink = null;
-            for (var k = tzKey; tzdbLinks.containsKey(k);) {
-                k = tzLink = tzdbLinks.get(k);
-            }
+            String tzLink = getTZDBLink(tzKey);
             if (tzLink == null && tzdbLinks.containsValue(tzKey)) {
                 // reverse link search
                 // this is needed as in tzdb, "America/Buenos_Aires" links to
@@ -810,6 +807,13 @@ private static Map extractZoneNames(Map map, Str
                 data = map.get(TIMEZONE_ID_PREFIX + tzLink);
             }
 
+            String meta = handlerMetaZones.get(tzKey);
+            if (meta == null && tzLink != null) {
+                // Check for tzLink
+                meta = handlerMetaZones.get(tzLink);
+            }
+            String metaKey = meta != null ? METAZONE_ID_PREFIX + meta : null;
+
             if (data instanceof String[] tznames) {
                 // Hack for UTC. UTC is an alias to Etc/UTC in CLDR
                 if (tzid.equals("Etc/UTC") && !map.containsKey(TIMEZONE_ID_PREFIX + "UTC")) {
@@ -819,24 +823,16 @@ private static Map extractZoneNames(Map map, Str
                 } else {
                     // TZDB short names
                     tznames = Arrays.copyOf(tznames, tznames.length);
-                    fillTZDBShortNames(tzid, tznames);
+                    fillTZDBShortNames(tzKey, tznames);
                     names.put(tzid, tznames);
+                    if (meta != null && map.get(metaKey) instanceof String[] metaNames) {
+                        recordMetazone(names, meta, tzKey, metaNames);
+                    }
                 }
             } else {
-                String meta = handlerMetaZones.get(tzKey);
-                if (meta == null && tzLink != null) {
-                    // Check for tzLink
-                    meta = handlerMetaZones.get(tzLink);
-                }
                 if (meta != null) {
-                    String metaKey = METAZONE_ID_PREFIX + meta;
-                    data = map.get(metaKey);
-                    if (data instanceof String[] tznames) {
-                        // TZDB short names
-                        tznames = Arrays.copyOf((String[])names.getOrDefault(metaKey, tznames), 6);
-                        fillTZDBShortNames(tzid, tznames);
-                        // Keep the metazone prefix here.
-                        names.putIfAbsent(metaKey, tznames);
+                    if (map.get(metaKey) instanceof String[] metaNames) {
+                        recordMetazone(names, meta, tzKey, metaNames);
                         names.put(tzid, meta);
                         if (tzLink != null && availableIds.contains(tzLink)) {
                             names.put(tzLink, meta);
@@ -1484,12 +1480,12 @@ private static String flipIfNeeded(boolean inVanguard, String format) {
      * Fill the TZDB short names if there is no name provided by the CLDR
      */
     private static void fillTZDBShortNames(String tzid, String[] names) {
-        var val = tzdbShortNamesMap.get(tzdbLinks.getOrDefault(tzid, tzid));
+        var val = tzdbShortNamesMap.getOrDefault(tzid, tzdbShortNamesMap.get(getTZDBLink(tzid)));
         if (val != null) {
             var format = val.split(NBSP)[0];
             var rule = val.split(NBSP)[1];
             IntStream.of(1, 3, 5).forEach(i -> {
-                if (names[i] == null) {
+                if (names[i] == null || names[i].isEmpty()) {
                     if (format.contains("%s")) {
                         names[i] = switch (i) {
                             case 1 -> format.formatted(tzdbSubstLetters.get(rule + NBSP + STD));
@@ -1511,6 +1507,28 @@ private static void fillTZDBShortNames(String tzid, String[] names) {
         }
     }
 
+    private static void recordMetazone(Map names, String meta, String tzid, String[] tznames) {
+        String zone001 = handlerMetaZones.zidMap().get(meta);
+        var tzLink = getTZDBLink(tzid);
+
+        // Record the metazone names only from the default
+        // (001) zone, with short names filled from TZDB
+        if (canonicalTZMap.getOrDefault(tzid, tzid).equals(zone001) ||
+            tzLink != null && canonicalTZMap.getOrDefault(tzLink, tzLink).equals(zone001)) {
+            tznames = Arrays.copyOf(tznames, tznames.length);
+            fillTZDBShortNames(tzid, tznames);
+            names.put(METAZONE_ID_PREFIX + meta, tznames);
+        }
+    }
+
+    private static String getTZDBLink(String tzid) {
+        String tzLink = null;
+        for (var k = tzid; tzdbLinks.containsKey(k);) {
+            k = tzLink = tzdbLinks.get(k);
+        }
+        return tzLink;
+    }
+
     /*
      * Convert TZDB offsets to JDK's offsets, eg, "-08" to "GMT-08:00".
      * If it cannot recognize the pattern, return the argument as is.
diff --git a/test/jdk/sun/util/resources/cldr/TimeZoneNamesTest.java b/test/jdk/sun/util/resources/cldr/TimeZoneNamesTest.java
index ed6fb2a58d8..3d6b3896150 100644
--- a/test/jdk/sun/util/resources/cldr/TimeZoneNamesTest.java
+++ b/test/jdk/sun/util/resources/cldr/TimeZoneNamesTest.java
@@ -24,6 +24,7 @@
  /*
  * @test
  * @bug 8181157 8202537 8234347 8236548 8261279 8322647 8174269 8346948
+ *      8382020 8384043
  * @modules jdk.localedata
  * @summary Checks CLDR time zone names are generated correctly at
  * either build or runtime
@@ -55,164 +56,211 @@ Object[][] sampleTZs() {
             // on the CLDR data upgrade.
 
             // no "metazone" zones
-            {"Asia/Srednekolymsk",      Locale.US, "Srednekolymsk Standard Time",
-                                                    "GMT+11:00",
-                                                    "Srednekolymsk Daylight Time",
-                                                    "GMT+12:00",
-                                                    "Srednekolymsk Time",
-                                                    "GMT+11:00"},
-            {"Asia/Srednekolymsk",      Locale.FRANCE, "Srednekolymsk (heure standard)",
-                                                    "UTC+11:00",
-                                                    "Srednekolymsk (heure d\u2019\u00e9t\u00e9)",
-                                                    "UTC+12:00",
-                                                    "heure : Srednekolymsk",
-                                                    "UTC+11:00"},
-            {"America/Punta_Arenas",    Locale.US, "Punta Arenas Standard Time",
-                                                    "GMT-03:00",
-                                                    "Punta Arenas Daylight Time",
-                                                    "GMT-02:00",
-                                                    "Punta Arenas Time",
-                                                    "GMT-03:00"},
-            {"America/Punta_Arenas",    Locale.FRANCE, "Punta Arenas (heure standard)",
-                                                    "UTC\u221203:00",
-                                                    "Punta Arenas (heure d\u2019\u00e9t\u00e9)",
-                                                    "UTC\u221202:00",
-                                                    "heure : Punta Arenas",
-                                                    "UTC\u221203:00"},
-            {"Asia/Famagusta",          Locale.US, "Famagusta Standard Time",
-                                                    "EET",
-                                                    "Famagusta Daylight Time",
-                                                    "EEST",
-                                                    "Famagusta Time",
-                                                    "EET"},
-            {"Asia/Famagusta",          Locale.FRANCE, "Famagouste (heure standard)",
-                                                    "EET",
-                                                    "Famagouste (heure d\u2019\u00e9t\u00e9)",
-                                                    "EEST",
-                                                    "heure : Famagouste",
-                                                    "EET"},
-            {"Europe/Astrakhan",        Locale.US, "Astrakhan Standard Time",
-                                                    "GMT+04:00",
-                                                    "Astrakhan Daylight Time",
-                                                    "GMT+05:00",
-                                                    "Astrakhan Time",
-                                                    "GMT+04:00"},
-            {"Europe/Astrakhan",        Locale.FRANCE, "Astrakhan (heure standard)",
-                                                    "UTC+04:00",
-                                                    "Astrakhan (heure d\u2019\u00e9t\u00e9)",
-                                                    "UTC+05:00",
-                                                    "heure : Astrakhan",
-                                                    "UTC+04:00"},
-            {"Europe/Saratov",          Locale.US, "Saratov Standard Time",
-                                                    "GMT+04:00",
-                                                    "Saratov Daylight Time",
-                                                    "GMT+05:00",
-                                                    "Saratov Time",
-                                                    "GMT+04:00"},
-            {"Europe/Saratov",          Locale.FRANCE, "Saratov (heure standard)",
-                                                    "UTC+04:00",
-                                                    "Saratov (heure d\u2019\u00e9t\u00e9)",
-                                                    "UTC+05:00",
-                                                    "heure : Saratov",
-                                                    "UTC+04:00"},
-            {"Europe/Ulyanovsk",        Locale.US, "Ulyanovsk Standard Time",
-                                                    "GMT+04:00",
-                                                    "Ulyanovsk Daylight Time",
-                                                    "GMT+05:00",
-                                                    "Ulyanovsk Time",
-                                                    "GMT+04:00"},
-            {"Europe/Ulyanovsk",        Locale.FRANCE, "Oulianovsk (heure standard)",
-                                                    "UTC+04:00",
-                                                    "Oulianovsk (heure d\u2019\u00e9t\u00e9)",
-                                                    "UTC+05:00",
-                                                    "heure : Oulianovsk",
-                                                    "UTC+04:00"},
-            {"Pacific/Bougainville",    Locale.US, "Bougainville Standard Time",
-                                                    "GMT+11:00",
-                                                    "Bougainville Daylight Time",
-                                                    "GMT+11:00",
-                                                    "Bougainville Time",
-                                                    "GMT+11:00"},
-            {"Pacific/Bougainville",    Locale.FRANCE, "Bougainville (heure standard)",
-                                                    "UTC+11:00",
-                                                    "Bougainville (heure d\u2019\u00e9t\u00e9)",
-                                                    "UTC+11:00",
-                                                    "heure : Bougainville",
-                                                    "UTC+11:00"},
-            {"Europe/Istanbul",    Locale.US, "Istanbul Standard Time",
-                                                    "GMT+03:00",
-                                                    "Istanbul Daylight Time",
-                                                    "GMT+04:00",
-                                                    "Istanbul Time",
-                                                    "GMT+03:00"},
-            {"Europe/Istanbul",    Locale.FRANCE, "Istanbul (heure standard)",
-                                                    "UTC+03:00",
-                                                    "Istanbul (heure d\u2019\u00e9t\u00e9)",
-                                                    "UTC+04:00",
-                                                    "heure : Istanbul",
-                                                    "UTC+03:00"},
-            {"Asia/Istanbul",    Locale.US, "Istanbul Standard Time",
-                                                    "GMT+03:00",
-                                                    "Istanbul Daylight Time",
-                                                    "GMT+04:00",
-                                                    "Istanbul Time",
-                                                    "GMT+03:00"},
-            {"Asia/Istanbul",    Locale.FRANCE, "Istanbul (heure standard)",
-                                                    "UTC+03:00",
-                                                    "Istanbul (heure d\u2019\u00e9t\u00e9)",
-                                                    "UTC+04:00",
-                                                    "heure : Istanbul",
-                                                    "UTC+03:00"},
-            {"Turkey",    Locale.US, "Istanbul Standard Time",
-                                                    "GMT+03:00",
-                                                    "Istanbul Daylight Time",
-                                                    "GMT+04:00",
-                                                    "Istanbul Time",
-                                                    "GMT+03:00"},
-            {"Turkey",    Locale.FRANCE, "Istanbul (heure standard)",
-                                                    "UTC+03:00",
-                                                    "Istanbul (heure d\u2019\u00e9t\u00e9)",
-                                                    "UTC+04:00",
-                                                    "heure : Istanbul",
-                                                    "UTC+03:00"},
+            {"Asia/Srednekolymsk", Locale.US,
+                "Srednekolymsk Standard Time",
+                "GMT+11:00",
+                "Srednekolymsk Daylight Time",
+                "GMT+12:00",
+                "Srednekolymsk Time",
+                "GMT+11:00"},
+            {"Asia/Srednekolymsk", Locale.FRANCE,
+                "Srednekolymsk (heure standard)",
+                "UTC+11:00",
+                "Srednekolymsk (heure d\u2019\u00e9t\u00e9)",
+                "UTC+12:00",
+                "heure : Srednekolymsk",
+                "UTC+11:00"},
+            {"America/Punta_Arenas", Locale.US,
+                "Punta Arenas Standard Time",
+                "GMT-03:00",
+                "Punta Arenas Daylight Time",
+                "GMT-02:00",
+                "Punta Arenas Time",
+                "GMT-03:00"},
+            {"America/Punta_Arenas", Locale.FRANCE,
+                "Punta Arenas (heure standard)",
+                "UTC\u221203:00",
+                "Punta Arenas (heure d\u2019\u00e9t\u00e9)",
+                "UTC\u221202:00",
+                "heure : Punta Arenas",
+                "UTC\u221203:00"},
+            {"Asia/Famagusta", Locale.US,
+                "Famagusta Standard Time",
+                "EET",
+                "Famagusta Daylight Time",
+                "EEST",
+                "Famagusta Time",
+                "EET"},
+            {"Asia/Famagusta", Locale.FRANCE,
+                "Famagouste (heure standard)",
+                "EET",
+                "Famagouste (heure d\u2019\u00e9t\u00e9)",
+                "EEST",
+                "heure : Famagouste",
+                "EET"},
+            {"Europe/Astrakhan", Locale.US,
+                "Astrakhan Standard Time",
+                "GMT+04:00",
+                "Astrakhan Daylight Time",
+                "GMT+05:00",
+                "Astrakhan Time",
+                "GMT+04:00"},
+            {"Europe/Astrakhan", Locale.FRANCE,
+                "Astrakhan (heure standard)",
+                "UTC+04:00",
+                "Astrakhan (heure d\u2019\u00e9t\u00e9)",
+                "UTC+05:00",
+                "heure : Astrakhan",
+                "UTC+04:00"},
+            {"Europe/Saratov", Locale.US,
+                "Saratov Standard Time",
+                "GMT+04:00",
+                "Saratov Daylight Time",
+                "GMT+05:00",
+                "Saratov Time",
+                "GMT+04:00"},
+            {"Europe/Saratov", Locale.FRANCE,
+                "Saratov (heure standard)",
+                "UTC+04:00",
+                "Saratov (heure d\u2019\u00e9t\u00e9)",
+                "UTC+05:00",
+                "heure : Saratov",
+                "UTC+04:00"},
+            {"Europe/Ulyanovsk", Locale.US,
+                "Ulyanovsk Standard Time",
+                "GMT+04:00",
+                "Ulyanovsk Daylight Time",
+                "GMT+05:00",
+                "Ulyanovsk Time",
+                "GMT+04:00"},
+            {"Europe/Ulyanovsk", Locale.FRANCE,
+                "Oulianovsk (heure standard)",
+                "UTC+04:00",
+                "Oulianovsk (heure d\u2019\u00e9t\u00e9)",
+                "UTC+05:00",
+                "heure : Oulianovsk",
+                "UTC+04:00"},
+            {"Pacific/Bougainville", Locale.US,
+                "Bougainville Standard Time",
+                "GMT+11:00",
+                "Bougainville Daylight Time",
+                "GMT+11:00",
+                "Bougainville Time",
+                "GMT+11:00"},
+            {"Pacific/Bougainville", Locale.FRANCE,
+                "Bougainville (heure standard)",
+                "UTC+11:00",
+                "Bougainville (heure d\u2019\u00e9t\u00e9)",
+                "UTC+11:00",
+                "heure : Bougainville",
+                "UTC+11:00"},
+            {"Europe/Istanbul", Locale.US,
+                "Istanbul Standard Time",
+                "GMT+03:00",
+                "Istanbul Daylight Time",
+                "GMT+04:00",
+                "Istanbul Time",
+                "GMT+03:00"},
+            {"Europe/Istanbul", Locale.FRANCE,
+                "Istanbul (heure standard)",
+                "UTC+03:00",
+                "Istanbul (heure d\u2019\u00e9t\u00e9)",
+                "UTC+04:00",
+                "heure : Istanbul",
+                "UTC+03:00"},
+            {"Asia/Istanbul", Locale.US,
+                "Istanbul Standard Time",
+                "GMT+03:00",
+                "Istanbul Daylight Time",
+                "GMT+04:00",
+                "Istanbul Time",
+                "GMT+03:00"},
+            {"Asia/Istanbul", Locale.FRANCE,
+                "Istanbul (heure standard)",
+                "UTC+03:00",
+                "Istanbul (heure d\u2019\u00e9t\u00e9)",
+                "UTC+04:00",
+                "heure : Istanbul",
+                "UTC+03:00"},
+            {"Turkey", Locale.US,
+                "Istanbul Standard Time",
+                "GMT+03:00",
+                "Istanbul Daylight Time",
+                "GMT+04:00",
+                "Istanbul Time",
+                "GMT+03:00"},
+            {"Turkey", Locale.FRANCE,
+                "Istanbul (heure standard)",
+                "UTC+03:00",
+                "Istanbul (heure d\u2019\u00e9t\u00e9)",
+                "UTC+04:00",
+                "heure : Istanbul",
+                "UTC+03:00"},
 
             // Short names derived from TZDB at build time
-            {"Europe/Lisbon",    Locale.US, "Western European Standard Time",
-                        "WET",
-                        "Western European Summer Time",
-                        "WEST",
-                        "Western European Time",
-                        "WET"},
-            {"Atlantic/Azores",    Locale.US, "Azores Standard Time",
-                        "GMT-01:00",
-                        "Azores Summer Time",
-                        "GMT",
-                        "Azores Time",
-                        "GMT-01:00"},
-            {"Australia/Perth",    Locale.US, "Australian Western Standard Time",
-                        "AWST",
-                        "Australian Western Daylight Time",
-                        "AWDT",
-                        "Australian Western Time",
-                        "AWT"},
-            {"Africa/Harare",    Locale.US, "Central Africa Time",
-                        "CAT",
-                        "Harare Daylight Time",
-                        "CAT",
-                        "Harare Time",
-                        "CAT"},
-            {"Europe/Dublin",    Locale.US, "Greenwich Mean Time",
-                        "GMT",
-                        "Irish Standard Time",
-                        "IST",
-                        "Dublin Time",
-                        "GMT"},
-            {"Pacific/Gambier",    Locale.US, "Gambier Time",
-                        "GMT-09:00",
-                        "Gambier Daylight Time",
-                        "GMT-09:00",
-                        "Gambier Time",
-                        "GMT-09:00"},
+            {"Europe/Lisbon", Locale.US,
+                "Western European Standard Time",
+                "WET",
+                "Western European Summer Time",
+                "WEST",
+                "Western European Time",
+                "WET"},
+            {"Atlantic/Azores", Locale.US,
+                "Azores Standard Time",
+                "GMT-01:00",
+                "Azores Summer Time",
+                "GMT",
+                "Azores Time",
+                "GMT-01:00"},
+            {"Australia/Perth", Locale.US,
+                "Australian Western Standard Time",
+                "AWST",
+                "Australian Western Daylight Time",
+                "AWDT",
+                "Australian Western Time",
+                "AWT"},
+            {"Africa/Harare", Locale.US,
+                "Central Africa Time",
+                "CAT",
+                "Harare Daylight Time",
+                "CAT",
+                "Harare Time",
+                "CAT"},
+            {"Europe/Dublin", Locale.US,
+                "Greenwich Mean Time",
+                "GMT",
+                "Irish Standard Time",
+                "IST",
+                "Dublin Time",
+                "GMT"},
+            {"Pacific/Gambier", Locale.US,
+                "Gambier Time",
+                "GMT-09:00",
+                "Gambier Daylight Time",
+                "GMT-09:00",
+                "Gambier Time",
+                "GMT-09:00"},
+
+            // Hawaii/Aleutian
+            //
+            // CLDR v47 does not contain CLDR-18531
+            // so both Pacific/Honolulu and America/Adak
+            // share the same long names and differ only
+            // on the short names.
+            {"Pacific/Honolulu", Locale.US,
+                "Hawaii-Aleutian Standard Time",
+                "HST",
+                "Hawaii-Aleutian Daylight Time",
+                "HDT",
+                "Hawaii-Aleutian Time",
+                "HST"},
+            {"America/Adak", Locale.US,
+                "Hawaii-Aleutian Standard Time",
+                "HAST",
+                "Hawaii-Aleutian Daylight Time",
+                "HADT",
+                "Hawaii-Aleutian Time",
+                "HAT"},
         };
     }
 

From f37367e0f07b61b804617e9b5a20701d340b2cdc Mon Sep 17 00:00:00 2001
From: SendaoYan 
Date: Thu, 21 May 2026 12:39:22 +0000
Subject: [PATCH 6/9] 8380316: Test runtime/os/AvailableProcessors.java fails
 Invalid argument

Backport-of: 5c2ef74931c05cac1aa589a8e1f9c242361dc247
---
 .../jtreg/runtime/os/AvailableProcessors.java | 49 +++++++++++++++++--
 1 file changed, 46 insertions(+), 3 deletions(-)

diff --git a/test/hotspot/jtreg/runtime/os/AvailableProcessors.java b/test/hotspot/jtreg/runtime/os/AvailableProcessors.java
index 18201d99127..51d6742b832 100644
--- a/test/hotspot/jtreg/runtime/os/AvailableProcessors.java
+++ b/test/hotspot/jtreg/runtime/os/AvailableProcessors.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2026, 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
@@ -38,6 +38,9 @@
 
 import java.util.ArrayList;
 import java.io.File;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
 
 public class AvailableProcessors {
 
@@ -73,13 +76,17 @@ public static void main(String[] args) throws Exception {
                                                                      "AvailableProcessors");
 
             int[] expected = new int[] { 1, available/2, available-1, available };
+            int cpuId = getFirstAllowedCpu();
+            if (cpuId == -1) {
+                throw new SkippedException("Could not determine allowed CPU cores");
+            }
 
             for (int i : expected) {
                 System.out.println("Testing for " + i + " processors ...");
-                int max = i - 1;
+                int max = i - 1 + cpuId;
                 ArrayList cmdline = new ArrayList<>(master.command());
                 // prepend taskset command
-                cmdline.add(0, "0-" + max);
+                cmdline.add(0, cpuId + "-" + max);
                 cmdline.add(0, "-c");
                 cmdline.add(0, taskset);
                 // append expected processor count
@@ -104,4 +111,40 @@ static void checkProcessors(int expected) {
         else
             System.out.println(SUCCESS_STRING + available);
     }
+
+    /**
+     * Retrieves the first available CPU core ID allowed for the current process on Linux.
+     *
+     * @return The first CPU ID in Cpus_allowed_list, or -1 if unavailable.
+     */
+    static int getFirstAllowedCpu() {
+        final String statusFile = "/proc/self/status";
+        final String targetKey = "Cpus_allowed_list:";
+
+        try (BufferedReader br = new BufferedReader(new FileReader(statusFile))) {
+            String line;
+            while ((line = br.readLine()) != null) {
+                // Look for the line starting with "Cpus_allowed_list:"
+                if (line.startsWith(targetKey)) {
+                    // Extract the value part, e.g., "0-15,32-47" or "80,82,84"
+                    String listValue = line.substring(targetKey.length()).trim();
+                    if (listValue.isEmpty()) return -1;
+
+                    // Get the first segment before any comma (e.g., "0-15" from "0-15,32")
+                    String firstSegment = listValue.split(",")[0];
+
+                    // If it is a range (e.g., "80-159"), take the start number
+                    if (firstSegment.contains("-")) {
+                        return Integer.parseInt(firstSegment.split("-")[0]);
+                    } else {
+                        // If it is a single ID (e.g., "1"), parse it directly
+                        return Integer.parseInt(firstSegment);
+                    }
+                }
+            }
+        } catch (IOException | NumberFormatException | ArrayIndexOutOfBoundsException e) {
+            throw new RuntimeException("Failed to read or parse " + statusFile, e);
+        }
+        return -1;
+    }
 }

From 5c23188dd7612e8ba4bf3aa3945788e6005dd91a Mon Sep 17 00:00:00 2001
From: Matthias Baesken 
Date: Fri, 22 May 2026 11:03:22 +0000
Subject: [PATCH 7/9] 8384163: (so) SocketChannel.connect and finishConnect()
 exception messages could be improved

Reviewed-by: clanger
Backport-of: 05684dbbc011935b64be6e455dc5136869ff2351
---
 src/java.base/unix/native/libnio/ch/Net.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/java.base/unix/native/libnio/ch/Net.c b/src/java.base/unix/native/libnio/ch/Net.c
index 28c1814f422..2b281f9a204 100644
--- a/src/java.base/unix/native/libnio/ch/Net.c
+++ b/src/java.base/unix/native/libnio/ch/Net.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2026, 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
@@ -929,13 +929,13 @@ Java_sun_nio_ch_Net_pollConnect(JNIEnv *env, jobject this, jobject fdo, jlong ti
         errno = 0;
         result = getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &n);
         if (result < 0) {
-            handleSocketError(env, errno);
+            handleSocketErrorWithMessage(env, errno, "getsockopt failed");
             return JNI_FALSE;
         } else if (error) {
-            handleSocketError(env, error);
+            handleSocketErrorWithMessage(env, error, "connect failed");
             return JNI_FALSE;
         } else if ((poller.revents & POLLHUP) != 0) {
-            handleSocketError(env, ENOTCONN);
+            handleSocketErrorWithMessage(env, ENOTCONN, "peer closed connection after accepting");
             return JNI_FALSE;
         }
         // connected

From da515f95f9f903a5948b410db7a892439e884681 Mon Sep 17 00:00:00 2001
From: Frederic Thevenet 
Date: Tue, 26 May 2026 10:03:50 +0000
Subject: [PATCH 8/9] 8374168: Resolve disabled warnings in JDWP agent

Backport-of: fa8ea6b32d463a84affa529d37cfb97280503fc6
---
 make/modules/jdk.jdwp.agent/Lib.gmk               | 15 ---------------
 .../share/native/libjdwp/EventRequestImpl.c       |  6 ++----
 src/jdk.jdwp.agent/share/native/libjdwp/SDE.c     | 15 +--------------
 .../share/native/libjdwp/debugInit.c              |  6 +++---
 .../share/native/libjdwp/error_messages.c         |  7 ++++++-
 .../share/native/libjdwp/eventFilter.c            |  3 +--
 .../share/native/libjdwp/inStream.c               |  3 ++-
 .../share/native/libjdwp/log_messages.c           |  3 ++-
 .../share/native/libjdwp/threadControl.c          |  6 ++++--
 .../share/native/libjdwp/utf_util.c               |  6 +++---
 src/jdk.jdwp.agent/share/native/libjdwp/util.h    |  8 ++++++++
 11 files changed, 32 insertions(+), 46 deletions(-)

diff --git a/make/modules/jdk.jdwp.agent/Lib.gmk b/make/modules/jdk.jdwp.agent/Lib.gmk
index 6ae053d4bec..ce58e145f59 100644
--- a/make/modules/jdk.jdwp.agent/Lib.gmk
+++ b/make/modules/jdk.jdwp.agent/Lib.gmk
@@ -54,21 +54,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJDWP, \
     NAME := jdwp, \
     OPTIMIZATION := LOW, \
     CFLAGS := -DJDWP_LOGGING $(ICONV_CFLAGS), \
-    DISABLED_WARNINGS_gcc_eventFilter.c := unused-variable, \
-    DISABLED_WARNINGS_gcc_SDE.c := unused-function, \
-    DISABLED_WARNINGS_gcc_threadControl.c := unused-but-set-variable \
-        unused-variable, \
-    DISABLED_WARNINGS_gcc_utf_util.c := unused-but-set-variable, \
-    DISABLED_WARNINGS_clang_error_messages.c := format-nonliteral, \
-    DISABLED_WARNINGS_clang_eventFilter.c := unused-variable, \
-    DISABLED_WARNINGS_clang_EventRequestImpl.c := self-assign, \
-    DISABLED_WARNINGS_clang_inStream.c := sometimes-uninitialized, \
-    DISABLED_WARNINGS_clang_log_messages.c := format-nonliteral, \
-    DISABLED_WARNINGS_clang_SDE.c := unused-function, \
-    DISABLED_WARNINGS_clang_threadControl.c := unused-but-set-variable \
-        unused-variable, \
-    DISABLED_WARNINGS_clang_utf_util.c := unused-but-set-variable, \
-    DISABLED_WARNINGS_microsoft_debugInit.c := 5287, \
     LDFLAGS := $(ICONV_LDFLAGS), \
     EXTRA_HEADER_DIRS := \
         include \
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/EventRequestImpl.c b/src/jdk.jdwp.agent/share/native/libjdwp/EventRequestImpl.c
index 3eddb01eaa5..2bc6fa5259e 100644
--- a/src/jdk.jdwp.agent/share/native/libjdwp/EventRequestImpl.c
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/EventRequestImpl.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2025, 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
@@ -84,12 +84,10 @@ readAndSetFilters(JNIEnv *env, PacketInputStream *in, HandlerNode *node,
             }
 
             case JDWP_REQUEST_MODIFIER(LocationOnly): {
-                jbyte tag;
                 jclass clazz;
                 jmethodID method;
                 jlocation location;
-                tag = inStream_readByte(in); /* not currently used */
-                tag = tag; /* To shut up lint */
+                (void)inStream_readByte(in); /* not currently used */
                 if ( (serror = inStream_error(in)) != JDWP_ERROR(NONE) )
                     break;
                 clazz = inStream_readClassRef(env, in);
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/SDE.c b/src/jdk.jdwp.agent/share/native/libjdwp/SDE.c
index b1f18dd10be..4334b4cbc63 100644
--- a/src/jdk.jdwp.agent/share/native/libjdwp/SDE.c
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/SDE.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2025, 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
@@ -718,19 +718,6 @@ private jboolean isValid(void);
                                    lineTable[lti].jplsLineInc));
     }
 
-    private int fileTableIndex(int sti, int fileId) {
-        int i;
-        int fileIndexStart = stratumTable[sti].fileIndex;
-        /* one past end */
-        int fileIndexEnd = stratumTable[sti+1].fileIndex;
-        for (i = fileIndexStart; i < fileIndexEnd; ++i) {
-            if (fileTable[i].fileId == fileId) {
-                return i;
-            }
-        }
-        return -1;
-    }
-
     private jboolean isValid(void) {
         return sourceMapIsValid;
     }
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c b/src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c
index 73ea9a295e6..b837a2c71b2 100644
--- a/src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c
@@ -181,11 +181,11 @@ DEF_Agent_OnLoad(JavaVM *vm, char *options, void *reserved)
     vmInitialized = JNI_FALSE;
     gdata->vmDead = JNI_FALSE;
 
-    jvmtiCompileTimeMajorVersion  = ( JVMTI_VERSION & JVMTI_VERSION_MASK_MAJOR )
+    jvmtiCompileTimeMajorVersion  = ((unsigned)JVMTI_VERSION & JVMTI_VERSION_MASK_MAJOR)
                                         >> JVMTI_VERSION_SHIFT_MAJOR;
-    jvmtiCompileTimeMinorVersion  = ( JVMTI_VERSION & JVMTI_VERSION_MASK_MINOR )
+    jvmtiCompileTimeMinorVersion  = ((unsigned)JVMTI_VERSION & JVMTI_VERSION_MASK_MINOR)
                                         >> JVMTI_VERSION_SHIFT_MINOR;
-    jvmtiCompileTimeMicroVersion  = ( JVMTI_VERSION & JVMTI_VERSION_MASK_MICRO )
+    jvmtiCompileTimeMicroVersion  = ((unsigned)JVMTI_VERSION & JVMTI_VERSION_MASK_MICRO)
                                         >> JVMTI_VERSION_SHIFT_MICRO;
 
     /* Get the JVMTI Env, IMPORTANT: Do this first! For jvmtiAllocate(). */
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/error_messages.c b/src/jdk.jdwp.agent/share/native/libjdwp/error_messages.c
index a37b88e70df..6ddc6fe739a 100644
--- a/src/jdk.jdwp.agent/share/native/libjdwp/error_messages.c
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/error_messages.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2025, 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
@@ -61,6 +61,8 @@
  *    NOTE: This function is at the lowest level of the call tree.
  *          Do not use the ERROR* macros here.
  */
+
+ATTRIBUTE_PRINTF(4, 0)
 static void
 vprint_message(FILE *fp, const char *prefix, const char *suffix,
                const char *format, va_list ap)
@@ -84,6 +86,7 @@ vprint_message(FILE *fp, const char *prefix, const char *suffix,
  *    NOTE: This function is at the lowest level of the call tree.
  *          Do not use the ERROR* macros here.
  */
+ATTRIBUTE_PRINTF(4, 5)
 void
 print_message(FILE *fp, const char *prefix,  const char *suffix,
               const char *format, ...)
@@ -96,6 +99,7 @@ print_message(FILE *fp, const char *prefix,  const char *suffix,
 }
 
 /* Generate error message */
+ATTRIBUTE_PRINTF(1, 2)
 void
 error_message(const char *format, ...)
 {
@@ -110,6 +114,7 @@ error_message(const char *format, ...)
 }
 
 /* Print plain message to stdout. */
+ATTRIBUTE_PRINTF(1, 2)
 void
 tty_message(const char *format, ...)
 {
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/eventFilter.c b/src/jdk.jdwp.agent/share/native/libjdwp/eventFilter.c
index 3ba875e88cd..6fe01044a2c 100644
--- a/src/jdk.jdwp.agent/share/native/libjdwp/eventFilter.c
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/eventFilter.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2025, 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
@@ -976,7 +976,6 @@ eventFilter_setSourceNameMatchFilter(HandlerNode *node,
 
 jvmtiError eventFilter_setPlatformThreadsOnlyFilter(HandlerNode *node, jint index)
 {
-    PlatformThreadsFilter *filter = &FILTER(node, index).u.PlatformThreadsOnly;
     if (index >= FILTER_COUNT(node)) {
         return AGENT_ERROR_ILLEGAL_ARGUMENT;
     }
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/inStream.c b/src/jdk.jdwp.agent/share/native/libjdwp/inStream.c
index 232da2cb348..de424853175 100644
--- a/src/jdk.jdwp.agent/share/native/libjdwp/inStream.c
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/inStream.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2025, 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
@@ -470,6 +470,7 @@ inStream_readValue(PacketInputStream *stream)
                 break;
             default:
                 stream->error = JDWP_ERROR(INVALID_TAG);
+                value.j = 0L; // to make compiler happy
                 break;
         }
     }
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/log_messages.c b/src/jdk.jdwp.agent/share/native/libjdwp/log_messages.c
index ebc39febff9..e24fcd57156 100644
--- a/src/jdk.jdwp.agent/share/native/libjdwp/log_messages.c
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/log_messages.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2025, 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
@@ -155,6 +155,7 @@ standard_logging_format(FILE *fp,
 }
 
 /* End a log entry */
+ATTRIBUTE_PRINTF(1, 2)
 void
 log_message_end(const char *format, ...)
 {
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c b/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c
index 4b037142d52..caf0a60bf46 100644
--- a/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/threadControl.c
@@ -2504,12 +2504,16 @@ threadControl_setEventMode(jvmtiEventMode mode, EventIndex ei, jthread thread)
 
 /*
  * Returns the current thread.
+ * Returns NULL on error (JVMTI_ERROR_WRONG_PHASE, JVMTI_ERROR_UNATTACHED_THREAD).
  */
 jthread
 threadControl_currentThread(void)
 {
     jthread thread = NULL;
     jvmtiError error = JVMTI_FUNC_PTR(gdata->jvmti,GetCurrentThread)(gdata->jvmti, &thread);
+    if (error != JVMTI_ERROR_NONE) {
+        return NULL;
+    }
     return thread;
 }
 
@@ -2536,11 +2540,9 @@ threadControl_getFrameGeneration(jthread thread)
 jthread *
 threadControl_allVThreads(jint *numVThreads)
 {
-    JNIEnv *env;
     ThreadNode *node;
     jthread* vthreads;
 
-    env = getEnv();
     debugMonitorEnter(threadLock);
     *numVThreads = numRunningVThreads;
 
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/utf_util.c b/src/jdk.jdwp.agent/share/native/libjdwp/utf_util.c
index f5573930d34..6bae02fce54 100644
--- a/src/jdk.jdwp.agent/share/native/libjdwp/utf_util.c
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/utf_util.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2025, 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
@@ -173,7 +173,7 @@ int JNICALL utf8mToUtf8sLength(jbyte *string, int length) {
 
     newLength = 0;
     for ( i = 0 ; i < length ; i++ ) {
-        unsigned byte1, byte2, byte3, byte4, byte5, byte6;
+        unsigned byte1, byte2, byte4, byte5, byte6;
 
         byte1 = (unsigned char)string[i];
         if ( (byte1 & 0x80) == 0 ) { /* 1byte encoding */
@@ -196,7 +196,7 @@ int JNICALL utf8mToUtf8sLength(jbyte *string, int length) {
                 break; /* Error condition */
             }
             byte2 = (unsigned char)string[++i];
-            byte3 = (unsigned char)string[++i];
+            ++i; // byte3 is not used
             newLength += 3;
             /* Possible process a second 3byte encoding */
             if ( (i+3) < length && byte1 == 0xED && (byte2 & 0xF0) == 0xA0 ) {
diff --git a/src/jdk.jdwp.agent/share/native/libjdwp/util.h b/src/jdk.jdwp.agent/share/native/libjdwp/util.h
index 3d499d7d569..c03bd8e7c09 100644
--- a/src/jdk.jdwp.agent/share/native/libjdwp/util.h
+++ b/src/jdk.jdwp.agent/share/native/libjdwp/util.h
@@ -59,6 +59,14 @@
 #include "error_messages.h"
 #include "debugInit.h"
 
+/* To handle "format string is not a string literal" warning. */
+#if !defined(_MSC_VER)
+  #define ATTRIBUTE_PRINTF(fmt_pos_num, vargs_pos_num) \
+          __attribute__((format(printf, fmt_pos_num, vargs_pos_num)))
+#else
+  #define ATTRIBUTE_PRINTF(fmt_pos_num, vargs_pos_num)
+#endif
+
 /* Definition of a CommonRef tracked by the backend for the frontend */
 typedef struct RefNode {
     jlong        seqNum;        /* ID of reference, also key for hash table */

From e8f9ebe5ea813b675410a89fbfafa22e42c04e6a Mon Sep 17 00:00:00 2001
From: Matthias Baesken 
Date: Tue, 26 May 2026 13:33:42 +0000
Subject: [PATCH 9/9] 8375177: Gtest os_linux.decoder_get_source_info_valid_vm
 fails with -ffunction-sections

Backport-of: 7c4c04486f371e980c1b75275b7d319e8db3e9b1
---
 make/hotspot/lib/CompileGtest.gmk | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/make/hotspot/lib/CompileGtest.gmk b/make/hotspot/lib/CompileGtest.gmk
index d2cdc7685c9..544adf572b1 100644
--- a/make/hotspot/lib/CompileGtest.gmk
+++ b/make/hotspot/lib/CompileGtest.gmk
@@ -45,6 +45,15 @@ else
   GTEST_COPY_DEBUG_SYMBOLS := false
 endif
 
+GTEST_LIBJVM_CFLAGS := $(JVM_CFLAGS)
+# Decoder does not work with debuginfo of the gtest libjvm when sections are used,
+# so we get wrong file names. That's why we filter out the section flags.
+ifeq ($(ENABLE_LINKTIME_GC), true)
+  ifeq ($(TOOLCHAIN_TYPE), gcc)
+    GTEST_LIBJVM_CFLAGS := $(filter-out -ffunction-sections -fdata-sections, $(JVM_CFLAGS))
+  endif
+endif
+
 ################################################################################
 ## Build libgtest
 ################################################################################
@@ -94,7 +103,7 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
     EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
     EXTRA_OBJECT_FILES := $(BUILD_LIBJVM_ALL_OBJS), \
     DEFAULT_CFLAGS := false, \
-    CFLAGS := $(JVM_CFLAGS) \
+    CFLAGS := $(GTEST_LIBJVM_CFLAGS) \
         -I$(GTEST_FRAMEWORK_SRC)/googletest/include \
         -I$(GTEST_FRAMEWORK_SRC)/googlemock/include \
         $(addprefix -I, $(GTEST_TEST_SRC)), \