Version in base suite: 25~32ea-1 Base version: openjdk-25_25~32ea-1 Target version: openjdk-25_25.0.1+8-1~deb13u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/o/openjdk-25/openjdk-25_25~32ea-1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/o/openjdk-25/openjdk-25_25.0.1+8-1~deb13u1.dsc .jcheck/conf | 4 debian/JB-doc.overrides.in | 3 debian/JB-jre-headless.overrides.in | 3 debian/JB-jvmci-jdk.overrides.in | 12 debian/changelog | 78 + debian/control | 6 debian/control.in | 6 debian/copyright | 4 debian/copyright-generator/copyright-gen.py | 6 debian/patches/jdk-8369450-proposed.patch | 18 debian/patches/jdk-8370049-proposed.patch | 59 + debian/patches/series | 2 debian/rules | 23 debian/source/lintian-overrides | 4 debian/tests/control | 2 debian/tests/control.in | 2 debian/tests/dependencies.sh | 2 debian/tests/hotspot-autopkgtest.in | 1 debian/tests/hotspot-autopkgtest.sh | 1 debian/tests/jdk-autopkgtest.in | 1 debian/tests/jdk-autopkgtest.sh | 1 debian/tests/problems.csv | 56 - debian/tests/skip-large-autopkgtest.txt | 7 debian/watch | 4 make/conf/version-numbers.conf | 6 make/jdk/src/classes/build/tools/cldrconverter/Bundle.java | 34 src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp | 3 src/hotspot/cpu/riscv/macroAssembler_riscv.cpp | 101 -- src/hotspot/cpu/riscv/macroAssembler_riscv.hpp | 4 src/hotspot/cpu/riscv/riscv.ad | 11 src/hotspot/cpu/riscv/vm_version_riscv.cpp | 42 - src/hotspot/cpu/x86/stubDeclarations_x86.hpp | 2 src/hotspot/share/classfile/stackMapTable.cpp | 10 src/hotspot/share/classfile/stackMapTable.hpp | 2 src/hotspot/share/classfile/verifier.cpp | 32 src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp | 28 src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp | 2 src/hotspot/share/gc/z/zPageAllocator.cpp | 2 src/hotspot/share/gc/z/zPhysicalMemoryManager.cpp | 13 src/hotspot/share/gc/z/z_globals.hpp | 5 src/hotspot/share/interpreter/bytecodeStream.hpp | 19 src/hotspot/share/jfr/instrumentation/jfrClassTransformer.cpp | 7 src/hotspot/share/jfr/instrumentation/jfrClassTransformer.hpp | 4 src/hotspot/share/jfr/jfr.cpp | 7 src/hotspot/share/jfr/jfr.hpp | 2 src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroup.cpp | 417 ---------- src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroup.hpp | 65 - src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroupManager.cpp | 331 +++++++ src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroupManager.hpp | 48 + src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp | 17 src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.hpp | 7 src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeManager.cpp | 4 src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp | 5 src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSetUtils.hpp | 2 src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp | 8 src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp | 32 src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp | 4 src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdLoadBarrier.inline.hpp | 32 src/hotspot/share/jfr/recorder/jfrRecorder.cpp | 9 src/hotspot/share/jfr/recorder/jfrRecorder.hpp | 1 src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp | 2 src/hotspot/share/jfr/recorder/stacktrace/jfrStackTraceRepository.cpp | 2 src/hotspot/share/jfr/support/jfrDeprecationManager.cpp | 9 src/hotspot/share/jfr/support/jfrKlassExtension.hpp | 2 src/hotspot/share/jfr/support/jfrThreadLocal.cpp | 58 + src/hotspot/share/jfr/support/jfrThreadLocal.hpp | 4 src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp | 10 src/hotspot/share/jfr/support/methodtracer/jfrInstrumentedClass.hpp | 8 src/hotspot/share/jfr/support/methodtracer/jfrMethodProcessor.cpp | 2 src/hotspot/share/jfr/support/methodtracer/jfrMethodTracer.cpp | 45 - src/hotspot/share/jfr/support/methodtracer/jfrMethodTracer.hpp | 4 src/hotspot/share/jfr/support/methodtracer/jfrTraceTagging.cpp | 165 ++- src/hotspot/share/jfr/support/methodtracer/jfrTraceTagging.hpp | 14 src/hotspot/share/opto/library_call.cpp | 15 src/hotspot/share/opto/stringopts.cpp | 11 src/hotspot/share/opto/subnode.cpp | 12 src/hotspot/share/opto/subnode.hpp | 29 src/hotspot/share/prims/jvmtiRedefineClasses.cpp | 6 src/hotspot/share/prims/whitebox.cpp | 26 src/hotspot/share/prims/whitebox.hpp | 5 src/hotspot/share/runtime/javaThread.cpp | 2 src/hotspot/share/runtime/safepointMechanism.cpp | 2 src/hotspot/share/runtime/stubRoutines.cpp | 5 src/java.base/share/classes/java/io/File.java | 18 src/java.base/share/classes/java/lang/AbstractStringBuilder.java | 8 src/java.base/share/classes/java/lang/foreign/MemoryLayout.java | 8 src/java.base/share/classes/java/lang/invoke/MethodHandles.java | 7 src/java.base/share/classes/java/text/DecimalFormat.java | 13 src/java.base/share/classes/java/time/LocalDate.java | 8 src/java.base/share/classes/java/time/MonthDay.java | 8 src/java.base/share/classes/java/time/YearMonth.java | 4 src/java.base/share/classes/java/time/chrono/HijrahDate.java | 14 src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java | 4 src/java.base/share/classes/sun/security/util/DerValue.java | 16 src/java.base/share/classes/sun/security/validator/EntrustTLSPolicy.java | 16 src/java.base/share/classes/sun/security/x509/AVA.java | 48 + src/java.base/share/data/cacerts/affirmtrustcommercialca | 27 src/java.base/share/data/cacerts/affirmtrustnetworkingca | 27 src/java.base/share/data/cacerts/affirmtrustpremiumca | 38 src/java.base/share/data/cacerts/affirmtrustpremiumeccca | 20 src/java.base/share/data/currency/CurrencyData.properties | 8 src/java.base/share/man/java.md | 5 src/java.base/share/native/libverify/check_code.c | 39 src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java | 136 +++ src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java | 144 +-- src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c | 36 src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxMenuItemUI.java | 21 src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java | 16 src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java | 142 +++ src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuUI.java | 21 src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsRadioButtonMenuItemUI.java | 20 src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties | 2 src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java | 19 src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java | 10 src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java | 9 src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImplUtil.java | 12 src/java.xml/share/classes/jdk/xml/internal/JdkXmlUtils.java | 16 src/java.xml/share/classes/jdk/xml/internal/XMLSecurityManager.java | 16 src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_de.properties | 22 src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties | 22 src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties | 22 src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_de.properties | 7 src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties | 1 src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties | 1 src/jdk.compiler/share/classes/com/sun/tools/javac/resources/launcher_de.properties | 2 src/jdk.jfr/share/classes/jdk/jfr/events/FileReadEvent.java | 8 src/jdk.jfr/share/classes/jdk/jfr/events/FileWriteEvent.java | 8 src/jdk.jfr/share/classes/jdk/jfr/events/SocketReadEvent.java | 4 src/jdk.jfr/share/classes/jdk/jfr/events/SocketWriteEvent.java | 4 src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformEventType.java | 23 src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/ConstantMap.java | 2 src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_de.properties | 1 src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_ja.properties | 1 src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_zh_CN.properties | 1 test/hotspot/jtreg/TEST.ROOT | 2 test/hotspot/jtreg/applications/scimark/Scimark.java | 58 - test/hotspot/jtreg/compiler/c2/irTests/InvolutionIdentityTests.java | 206 ---- test/hotspot/jtreg/compiler/c2/irTests/stringopts/TestArrayCopySelect.java | 118 ++ test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java | 10 test/hotspot/jtreg/compiler/vectorization/runner/BasicIntOpTest.java | 2 test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsFlagsWithUlimit.java | 2 test/hotspot/jtreg/gc/z/TestCommitFailure.java | 103 ++ test/hotspot/jtreg/runtime/Thread/TestBreakSignalThreadDump.java | 2 test/hotspot/jtreg/runtime/XCheckJniJsig/XCheckJSig.java | 2 test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java | 10 test/hotspot/jtreg/serviceability/dcmd/vm/SystemDumpMapTest.java | 2 test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTest.java | 4 test/hotspot/jtreg/serviceability/jvmti/thread/GetCurrentContendedMonitor/contmon01/contmon01.java | 4 test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace010/TestDescription.java | 4 test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace011/TestDescription.java | 4 test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace012/TestDescription.java | 4 test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace013/TestDescription.java | 4 test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace014/TestDescription.java | 4 test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace015/TestDescription.java | 4 test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace016/TestDescription.java | 4 test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace017/TestDescription.java | 4 test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace018/TestDescription.java | 4 test/jdk/ProblemList.txt | 1 test/jdk/TEST.ROOT | 2 test/jdk/build/AbsPathsInImage.java | 4 test/jdk/java/awt/event/KeyEvent/KeyCharTest/KeyCharTest.java | 52 - test/jdk/java/io/File/EmptyPath.java | 56 + test/jdk/java/util/Calendar/JapaneseCalendarNameTest.java | 108 ++ test/jdk/java/util/Calendar/JapaneseEraNameTest.java | 66 - test/jdk/java/util/Currency/ISO4217-list-one.txt | 12 test/jdk/java/util/Currency/ValidateISO4217.java | 4 test/jdk/javax/swing/JMenuItem/TestRadioAndCheckMenuItemWithIcon.java | 155 +++ test/jdk/jdk/jfr/event/io/TestIOTopFrame.java | 372 ++++++++ test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java | 58 - test/jdk/sun/security/lib/cacerts/VerifyCACerts.java | 14 test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/Entrust.java | 15 test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustcommercialca-chain.pem | 77 - test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustnetworkingca-chain.pem | 76 - test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustpremiumca-chain.pem | 88 -- test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustpremiumeccca-chain.pem | 63 - test/jdk/sun/security/tools/keytool/i18n.java | 14 test/jtreg-ext/requires/VMProps.java | 11 test/lib/jdk/test/lib/containers/docker/ContainerRuntimeVersionTestUtils.java | 13 test/lib/jdk/test/lib/security/CertificateBuilder.java | 23 test/lib/jdk/test/whitebox/WhiteBox.java | 4 180 files changed, 2928 insertions(+), 2067 deletions(-) gpgv: Signature made Thu Oct 23 10:31:48 2025 UTC gpgv: using RSA key B6E62F3D12AC38495C0DA90510C293B6C37C4E36 gpgv: Note: signatures using the SHA1 algorithm are rejected gpgv: Can't check signature: Bad public key dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmply49k9vn/openjdk-25_25.0.1+8-1~deb13u1.dsc: no acceptable signature found diff -Nru openjdk-25-25~32ea/.jcheck/conf openjdk-25-25.0.1+8/.jcheck/conf --- openjdk-25-25~32ea/.jcheck/conf 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/.jcheck/conf 2025-09-25 16:16:56.000000000 +0000 @@ -1,7 +1,7 @@ [general] -project=jdk +project=jdk-updates jbs=JDK -version=25 +version=25.0.1 [checks] error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists,copyright diff -Nru openjdk-25-25~32ea/debian/JB-doc.overrides.in openjdk-25-25.0.1+8/debian/JB-doc.overrides.in --- openjdk-25-25~32ea/debian/JB-doc.overrides.in 2024-08-08 06:16:47.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/JB-doc.overrides.in 2025-09-27 10:40:54.000000000 +0000 @@ -3,3 +3,6 @@ # chromium and firefox snaps are unable to load scripts from /usr/share/javascript # LP: 2032992 @basename@-doc binary: embedded-javascript-library + +# override warning for the old mailing address in upstream copyright +@basename@-doc binary: old-fsf-address-in-copyright-file diff -Nru openjdk-25-25~32ea/debian/JB-jre-headless.overrides.in openjdk-25-25.0.1+8/debian/JB-jre-headless.overrides.in --- openjdk-25-25~32ea/debian/JB-jre-headless.overrides.in 2024-08-08 06:16:47.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/JB-jre-headless.overrides.in 2025-09-27 10:40:54.000000000 +0000 @@ -16,3 +16,6 @@ # repeated lib due to upstream implementation directory layout @basename@-jre-headless binary: repeated-path-segment + +# override warning for the old mailing address in upstream copyright +@basename@-jre-headless binary: old-fsf-address-in-copyright-file diff -Nru openjdk-25-25~32ea/debian/JB-jvmci-jdk.overrides.in openjdk-25-25.0.1+8/debian/JB-jvmci-jdk.overrides.in --- openjdk-25-25~32ea/debian/JB-jvmci-jdk.overrides.in 2025-07-18 11:45:02.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/JB-jvmci-jdk.overrides.in 2025-09-27 10:40:54.000000000 +0000 @@ -1,2 +1,14 @@ # Strip libjvm.so with --strip-debug instead of --strip-unneeded. LP: #574997. @basename@-jvmci-jdk binary: unstripped-binary-or-object + +# override warning for the old mailing address in upstream copyright +@basename@-jvmci-jdk binary: old-fsf-address-in-copyright-file + +# repeated lib due to upstream implementation directory layout +@basename@-jvmci-jdk binary: repeated-path-segment + +# Override due to upstream copyright +@basename@-jvmci-jdk binary: spelling-error-in-copyright "GNU Public License" "GNU General Public License" + +# False positive https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1115545 +@basename@-jvmci-jdk binary: arch-dependent-file-not-in-arch-specific-directory diff -Nru openjdk-25-25~32ea/debian/changelog openjdk-25-25.0.1+8/debian/changelog --- openjdk-25-25~32ea/debian/changelog 2025-07-18 11:45:05.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/changelog 2025-10-23 10:25:46.000000000 +0000 @@ -1,3 +1,81 @@ +openjdk-25 (25.0.1+8-1~deb13u1) trixie-security; urgency=medium + + * Rebuild for trixie + + -- Moritz Mühlenhoff Thu, 23 Oct 2025 12:25:46 +0200 + +openjdk-25 (25.0.1+8-1) unstable; urgency=medium + + * OpenJDK 25.0.1 release, build 8. + - CVEs: + + CVE-2025-53057, 8360937: Enhance certificate handling. + + CVE-2025-53066, 8356294: Enhance Path Factories. + + CVE-2025-61748, 8359454: Enhance String handling. + + [ Vladimir Petko ] + * d/s/lintian-overrides: Override false positive nproc warning. + * d/{JB-doc.overrides.in, JB-jre-headless.overrides.in}: Add override for + old FSF copyright address. + * d/JB-jvmci-jdk.overrides.in: Update overrides for jvmci package. + * d/t/problems.csv: DocRootDirPermissionsTest.java - Fix typo in + the test name. + * d/t/problems.csv: Synchronize problem list. + * d/t/dependencies.sh: Relax test assertion for PC/SC library. + * d/rules: Prefer openjdk-25 for bootstrap. + * d/control: Regenerate. + * d/p/jdk-8369450.patch: Fix ftbfs due to rust-coreutils date. LP: #2127120. + * Security Manager was removed in -25, so the JDK image no longer has + default.policy and java.policy. + * jaxp-strict.properties.template was moved by d/rules to + jaxp-strict.properties, but we still created symlink to + jaxp-strict.properties.template. Replace mv with cp so that link + to jaxp-strict.properties.template is not broken. + * d/rules: Run jtreg autopkgtests only on jtreg architectures. + * d/t/{hotspot-autopkgtest.in, jdk-autopkgtest.in}: Skip tests + that require a large amount of memory. + * d/t/{control,hotspot-autopkgtest.sh, jdk-autopkgtest.sh}: + Regenerate. + * d/p/jdk-8370049-proposed.patch: s390x G1 barrier compare and exchange + operation should update output parameter instead of input. LP: #2127750. + + [ Matthias Klose ] + * d/rules: Let the install target depend on the build target. + Closes: #1105520. + * Update the location of the upstream VCS. + + -- Matthias Klose Wed, 22 Oct 2025 12:19:10 +0200 + +openjdk-25 (25+36-1) unstable; urgency=medium + + * OpenJDK 25 GA, build 36. Release notes: + https://mail.openjdk.org/pipermail/jdk-dev/2025-September/010483.html + + [ Vladimir Petko ] + * d/rules: Mark as release. + * d/watch: Regenerate. + + -- Matthias Klose Wed, 17 Sep 2025 02:43:31 +0200 + +openjdk-25 (25~36ea-1) unstable; urgency=medium + + * OpenJDK 25 snapshot, Build 36. + * Build using GCC 15 on development releases. + + -- Matthias Klose Fri, 29 Aug 2025 11:59:40 +0200 + +openjdk-25 (25~34ea-1) unstable; urgency=medium + + * OpenJDK 25 snapshot, Build 34. + + [ Matthias Klose ] + * Update VCS attributes. + + [ Vladimir Petko ] + * d/copyright-generator/copyright-gen.py: bump copyright year. + * d/copyright: regenerate. + + -- Matthias Klose Tue, 05 Aug 2025 08:35:23 +0200 + openjdk-25 (25~32ea-1) unstable; urgency=medium * OpenJDK 25 snapshot, Build 32. diff -Nru openjdk-25-25~32ea/debian/control openjdk-25-25.0.1+8/debian/control --- openjdk-25-25~32ea/debian/control 2025-07-18 11:45:02.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/control 2025-10-23 10:25:46.000000000 +0000 @@ -18,10 +18,10 @@ openjdk-25-jdk-headless , Build-Depends-Indep: graphviz, pandoc, Rules-Requires-Root: no -Standards-Version: 4.7.0 +Standards-Version: 4.7.2 Homepage: https://openjdk.java.net/ -Vcs-Browser: https://salsa.debian.org/openjdk-team/openjdk -Vcs-Git: https://salsa.debian.org/openjdk-team/openjdk.git +Vcs-Browser: https://salsa.debian.org/openjdk-team/openjdk/tree/openjdk-25 +Vcs-Git: https://salsa.debian.org/openjdk-team/openjdk.git -b openjdk-25 Package: openjdk-25-jdk-headless Architecture: alpha amd64 arc armel armhf arm64 hppa i386 ia64 loong64 mips mipsel mips64 mips64el powerpc ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 diff -Nru openjdk-25-25~32ea/debian/control.in openjdk-25-25.0.1+8/debian/control.in --- openjdk-25-25~32ea/debian/control.in 2025-07-18 11:45:02.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/control.in 2025-10-23 10:25:46.000000000 +0000 @@ -18,10 +18,10 @@ @bd_cross@ Build-Depends-Indep: graphviz, pandoc, Rules-Requires-Root: no -Standards-Version: 4.7.0 +Standards-Version: 4.7.2 Homepage: https://openjdk.java.net/ -Vcs-Browser: https://salsa.debian.org/openjdk-team/openjdk -Vcs-Git: https://salsa.debian.org/openjdk-team/openjdk.git +Vcs-Browser: https://salsa.debian.org/openjdk-team/openjdk/tree/openjdk-25 +Vcs-Git: https://salsa.debian.org/openjdk-team/openjdk.git -b openjdk-25 Package: @basename@-jdk-headless Architecture: @any_archs@ diff -Nru openjdk-25-25~32ea/debian/copyright openjdk-25-25.0.1+8/debian/copyright --- openjdk-25-25~32ea/debian/copyright 2024-01-15 10:02:11.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/copyright 2025-09-27 12:03:57.000000000 +0000 @@ -18,7 +18,7 @@ src/java.desktop/share/native/libjavajpeg/jv* src/java.desktop/share/native/libjavajpeg/ju* src/java.desktop/share/native/libjavajpeg/README -Source: https://github.com/openjdk/jdk +Source: https://github.com/openjdk/jdk25u Comment: Upstream Authors: OpenJDK: @@ -40,7 +40,7 @@ Files: * Copyright: - Copyright (c) 1996-2023 Oracle and/or its affiliates. + Copyright (c) 1996-2025 Oracle and/or its affiliates. Copyright (c) 1996-2003 Sun Microsystems, Inc. Copyright (c) 2009-2012 Red Hat, Inc. Copyright (c) 2012-2022 SAP SE. diff -Nru openjdk-25-25~32ea/debian/copyright-generator/copyright-gen.py openjdk-25-25.0.1+8/debian/copyright-generator/copyright-gen.py --- openjdk-25-25~32ea/debian/copyright-generator/copyright-gen.py 2024-03-20 15:21:47.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/copyright-generator/copyright-gen.py 2025-09-27 12:00:55.000000000 +0000 @@ -52,7 +52,7 @@ ## TODO: Can the script deduce this list? openjdk_copyrights = [ - "Copyright (c) 1996-2023 Oracle and/or its affiliates.", + "Copyright (c) 1996-2025 Oracle and/or its affiliates.", "Copyright (c) 1996-2003 Sun Microsystems, Inc.", "Copyright (c) 2009-2012 Red Hat, Inc.", "Copyright (c) 2012-2022 SAP SE.", @@ -133,7 +133,7 @@ def generate_header_stanza(): format = "https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/" excluded = generate_excluded_files_str() - source = "https://github.com/openjdk/jdk" + source = "https://github.com/openjdk/jdk25u" comment = generate_comment_str() print_header_stanza(format, excluded, source, comment) @@ -285,7 +285,7 @@ version = detect_version() sys.stdout = open('./debian/copyright', 'w') - supported_versions = ["11", "17", "21", "22", "23"] + supported_versions = ["11", "17", "21", "22", "23", "24", "25"] if version in supported_versions: generate_copyright() diff -Nru openjdk-25-25~32ea/debian/patches/jdk-8369450-proposed.patch openjdk-25-25.0.1+8/debian/patches/jdk-8369450-proposed.patch --- openjdk-25-25~32ea/debian/patches/jdk-8369450-proposed.patch 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/patches/jdk-8369450-proposed.patch 2025-10-09 08:00:49.000000000 +0000 @@ -0,0 +1,18 @@ +Description: [Ubuntu 25.10] openjdk fails to build due to rust-coreutils date + Add uutils as a GNU-compatible date provider. +Author: Vladimir Petko +Origin: upstream, https://github.com/openjdk/jdk/pull/27705 +Bug: https://bugs.openjdk.org/browse/JDK-8369450 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/openjdk-25/+bug/2127120 +Last-Update: 2025-10-09 +--- a/make/autoconf/basic_tools.m4 ++++ b/make/autoconf/basic_tools.m4 +@@ -378,7 +378,7 @@ + + # Check if it's a GNU date compatible version + AC_MSG_CHECKING([if date is a GNU compatible version]) +- check_date=`$DATE --version 2>&1 | $GREP "GNU\|BusyBox"` ++ check_date=`$DATE --version 2>&1 | $GREP "GNU\|BusyBox\|uutils"` + if test "x$check_date" != x; then + AC_MSG_RESULT([yes]) + IS_GNU_DATE=yes diff -Nru openjdk-25-25~32ea/debian/patches/jdk-8370049-proposed.patch openjdk-25-25.0.1+8/debian/patches/jdk-8370049-proposed.patch --- openjdk-25-25~32ea/debian/patches/jdk-8370049-proposed.patch 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/patches/jdk-8370049-proposed.patch 2025-10-21 09:33:09.000000000 +0000 @@ -0,0 +1,59 @@ +Description: [s390x] G1 barrier compareAndExchange does not return old value when compareExchange fails + Correct typo in g1CompareAndExchangeP +Author: Vladimir Petko +Origin: upstream, https://github.com/openjdk/jdk/pull/27857 +Bug: https://bugs.openjdk.org/browse/JDK-8370049 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/openjdk-25/+bug/2127750 +Last-Update: 2025-10-20 + +diff --git a/src/hotspot/cpu/s390/gc/g1/g1_s390.ad b/src/hotspot/cpu/s390/gc/g1/g1_s390.ad +index 7aed374fdae..000ac3bc5ba 100644 +--- a/src/hotspot/cpu/s390/gc/g1/g1_s390.ad ++++ b/src/hotspot/cpu/s390/gc/g1/g1_s390.ad +@@ -356,7 +356,7 @@ instruct g1CompareAndExchangeP(iRegP mem_ptr, rarg5RegP oldval, iRegP_N2P newval + + __ z_lgr($res$$Register, $oldval$$Register); // previous content + +- __ z_csg($oldval$$Register, $newval$$Register, 0, $mem_ptr$$reg); ++ __ z_csg($res$$Register, $newval$$Register, 0, $mem_ptr$$reg); + + write_barrier_post(masm, this, + $mem_ptr$$Register /* store_addr */, +diff --git a/test/hotspot/jtreg/compiler/gcbarriers/TestG1BarrierGeneration.java b/test/hotspot/jtreg/compiler/gcbarriers/TestG1BarrierGeneration.java +index 01e015d50cb..c1e2dd7a112 100644 +--- a/test/hotspot/jtreg/compiler/gcbarriers/TestG1BarrierGeneration.java ++++ b/test/hotspot/jtreg/compiler/gcbarriers/TestG1BarrierGeneration.java +@@ -880,6 +880,16 @@ public void runAtomicTests() { + Asserts.assertEquals(oldVal, oldVal2); + Asserts.assertEquals(o.f, newVal); + } ++ { ++ Outer o = new Outer(); ++ Object oldVal = new Object(); ++ o.f = oldVal; ++ Object cmpVal = new Object(); ++ Object newVal = new Object(); ++ Object oldVal2 = testCompareAndExchange(o, cmpVal, newVal); ++ Asserts.assertEquals(oldVal2, oldVal); ++ Asserts.assertEquals(o.f, oldVal); ++ } + { + Outer o = new Outer(); + Object oldVal = new Object(); +@@ -889,6 +899,16 @@ public void runAtomicTests() { + Asserts.assertTrue(b); + Asserts.assertEquals(o.f, newVal); + } ++ { ++ Outer o = new Outer(); ++ Object oldVal = new Object(); ++ o.f = oldVal; ++ Object cmpVal = new Object(); ++ Object newVal = new Object(); ++ boolean b = testCompareAndSwap(o, cmpVal, newVal); ++ Asserts.assertFalse(b); ++ Asserts.assertEquals(o.f, oldVal); ++ } + { + Outer o = new Outer(); + Object oldVal = new Object(); diff -Nru openjdk-25-25~32ea/debian/patches/series openjdk-25-25.0.1+8/debian/patches/series --- openjdk-25-25~32ea/debian/patches/series 2025-07-18 11:45:05.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/patches/series 2025-10-21 09:33:09.000000000 +0000 @@ -42,3 +42,5 @@ power-opt.diff test-empty-path.patch jdk-8359735.patch +jdk-8369450-proposed.patch +jdk-8370049-proposed.patch diff -Nru openjdk-25-25~32ea/debian/rules openjdk-25-25.0.1+8/debian/rules --- openjdk-25-25~32ea/debian/rules 2025-07-18 11:45:05.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/rules 2025-10-22 10:19:10.000000000 +0000 @@ -89,7 +89,7 @@ is_default = yes endif -#is_upstream_release = yes +is_upstream_release = yes srcdir = . builddir = build @@ -288,10 +288,14 @@ export CC = $(DEB_HOST_GNU_TYPE)-gcc-13 export CXX = $(DEB_HOST_GNU_TYPE)-g++-13 bd_gcc = g++-13 , -else +else ifneq (,$(filter $(distrel),trixie oracular plucky)) export CC = $(DEB_HOST_GNU_TYPE)-gcc-14 export CXX = $(DEB_HOST_GNU_TYPE)-g++-14 bd_gcc = g++-14 , +else + export CC = $(DEB_HOST_GNU_TYPE)-gcc-15 + export CXX = $(DEB_HOST_GNU_TYPE)-g++-15 + bd_gcc = g++-15 , endif # GCC 11 only @@ -673,7 +677,6 @@ bd_bootstrap = openjdk-25-jdk-headless:native | openjdk-24-jdk-headless:native, else bd_bootstrap = openjdk-25-jdk-headless:native | openjdk-24-jdk-headless:native, - bd_bootstrap = openjdk-24-jdk-headless:native | openjdk-25-jdk-headless:native, endif ifeq (,$(filter $(distrel),squeeze wheezy jessie precise trusty xenial)) @@ -999,6 +1002,7 @@ -e 's/@jtreg_dep@/$(jtreg_dep)/g' \ -e 's/@testng_dep@/$(testng_dep)/g' \ -e 's/@basename@/$(basename)/g' \ + -e 's/@jtreg_archs@/$(jtreg_archs)/g' \ $< > $@; debian/tests/%.sh: debian/tests/%.in debian/rules @@ -1366,7 +1370,7 @@ lib_ext_dirs := $(filter-out arm hppa, $(lib_ext_dirs)) endif -install: packaging-files +install: packaging-files build dh_testdir dh_testroot dh_prep || dh_clean -k @@ -1475,9 +1479,10 @@ : # FIXME: merge nss changes from IcedTea cp debian/nss.cfg $(d)/$(basedir)/conf/security/nss.cfg - : # move config files to $(etcdir) and symlink them. - mv $(d)/$(basedir)/conf/jaxp-strict.properties.template \ + cp $(d)/$(basedir)/conf/jaxp-strict.properties.template \ $(d)/$(basedir)/conf/jaxp-strict.properties + + : # move config files to $(etcdir) and symlink them. rm -f $(d_jrehl).links for i in \ conf/accessibility.properties \ @@ -1494,7 +1499,6 @@ conf/swing.properties \ conf/management/jmxremote.access \ conf/management/management.properties \ - conf/security/java.policy \ conf/security/java.security \ conf/security/policy/limited/default_local.policy \ conf/security/policy/limited/exempt_local.policy \ @@ -1504,7 +1508,6 @@ conf/security/policy/README.txt \ $$([ -f $(d)/$(basedir)/conf/security/nss.cfg ] && echo conf/security/nss.cfg) \ $(if $(findstring ca-cert,$(pkg_certs)),,lib/security/cacerts) \ - lib/security/default.policy \ lib/security/blocked.certs \ lib/security/public_suffix_list.dat; \ do \ @@ -2067,8 +2070,8 @@ NO_PKG_MANGLE=1 \ dh_builddeb -a $(nodemo) $(nojrez) #$(bd_options) -git_project = jdk -git_tag = jdk-25+32 +git_project = jdk25u +git_tag = jdk-25.0.1+8 package_version = $(shell echo $(PKGVERSION) | sed 's/-[^-][^-]*$$//') ifneq ($(is_upstream_release),yes) package_version := $(subst +,~,$(package_version)) diff -Nru openjdk-25-25~32ea/debian/source/lintian-overrides openjdk-25-25.0.1+8/debian/source/lintian-overrides --- openjdk-25-25~32ea/debian/source/lintian-overrides 2025-07-18 11:45:02.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/source/lintian-overrides 2025-09-27 10:40:54.000000000 +0000 @@ -22,3 +22,7 @@ # chromium and firefox snaps are unable to load scripts from /usr/share/javascript # LP: 2032992 openjdk-25 source: source-contains-prebuilt-javascript-object + +# false positive: nproc is called to print the number of processors +# to the log +openjdk-25 source: debian-rules-calls-nproc diff -Nru openjdk-25-25~32ea/debian/tests/control openjdk-25-25.0.1+8/debian/tests/control --- openjdk-25-25~32ea/debian/tests/control 2025-07-18 11:45:02.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/tests/control 2025-10-23 10:25:46.000000000 +0000 @@ -9,10 +9,12 @@ Tests: hotspot-autopkgtest.sh Depends: @, jtreg7 (>= 7.5.1+1~), libtestng7-java, build-essential, bash, lsb-release, xfwm4, xvfb, xauth, dbus-x11, libatk-wrapper-java, libatk-wrapper-java-jni Restrictions: allow-stderr, skippable, flaky, rw-build-tree +Architecture: amd64 arm64 ppc64 ppc64el riscv64 s390x alpha ia64 powerpc ppc64 sh4 x32 armel loong64 mipsel mips64el riscv64 Tests: jdk-autopkgtest.sh Depends: @, jtreg7 (>= 7.5.1+1~), libtestng7-java, build-essential, bash, lsb-release, xfwm4, xvfb, xauth, dbus-x11, libatk-wrapper-java, libatk-wrapper-java-jni Restrictions: allow-stderr, skippable, flaky, rw-build-tree +Architecture: amd64 arm64 ppc64 ppc64el riscv64 s390x alpha ia64 powerpc ppc64 sh4 x32 armel loong64 mipsel mips64el riscv64 Tests: dependencies.sh Depends: @, build-essential, bash diff -Nru openjdk-25-25~32ea/debian/tests/control.in openjdk-25-25.0.1+8/debian/tests/control.in --- openjdk-25-25~32ea/debian/tests/control.in 2024-07-30 04:20:35.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/tests/control.in 2025-10-17 07:17:07.000000000 +0000 @@ -9,10 +9,12 @@ Tests: hotspot-autopkgtest.sh Depends: @, @jtreg_dep@, @testng_dep@, build-essential, bash, lsb-release, xfwm4, xvfb, xauth, dbus-x11, libatk-wrapper-java, libatk-wrapper-java-jni Restrictions: allow-stderr, skippable, flaky, rw-build-tree +Architecture: @jtreg_archs@ Tests: jdk-autopkgtest.sh Depends: @, @jtreg_dep@, @testng_dep@, build-essential, bash, lsb-release, xfwm4, xvfb, xauth, dbus-x11, libatk-wrapper-java, libatk-wrapper-java-jni Restrictions: allow-stderr, skippable, flaky, rw-build-tree +Architecture: @jtreg_archs@ Tests: dependencies.sh Depends: @, build-essential, bash diff -Nru openjdk-25-25~32ea/debian/tests/dependencies.sh openjdk-25-25.0.1+8/debian/tests/dependencies.sh --- openjdk-25-25~32ea/debian/tests/dependencies.sh 2025-07-18 11:45:02.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/tests/dependencies.sh 2025-10-07 07:58:10.000000000 +0000 @@ -27,7 +27,7 @@ ${jdk_path}/bin/java -Djava.security.debug=all \ -cp . ${AUTOPKGTEST_TMP}/Test.java > ${AUTOPKGTEST_TMP}/dependencies-pcsc.log 2>&1 -if grep "pcsc: Using PC/SC library" ${AUTOPKGTEST_TMP}/dependencies-pcsc.log; then +if grep "Using PC/SC library" ${AUTOPKGTEST_TMP}/dependencies-pcsc.log; then echo "Test passed." else cat ${AUTOPKGTEST_TMP}/dependencies-pcsc.log diff -Nru openjdk-25-25~32ea/debian/tests/hotspot-autopkgtest.in openjdk-25-25.0.1+8/debian/tests/hotspot-autopkgtest.in --- openjdk-25-25~32ea/debian/tests/hotspot-autopkgtest.in 2024-07-20 08:15:29.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/tests/hotspot-autopkgtest.in 2025-10-17 07:17:07.000000000 +0000 @@ -22,6 +22,7 @@ problem_list=${AUTOPKGTEST_TMP}/problems.txt debian/tests/write-problems.sh ${problem_list} ${HOTSPOT_JTREG_PATH}/ProblemList.txt hotspot +cat debian/tests/skip-large-autopkgtest.txt >> ${problem_list} ARGS="$*" JT_DEFAULT_ARGS="-exclude:${problem_list} -k:!stress :tier1" diff -Nru openjdk-25-25~32ea/debian/tests/hotspot-autopkgtest.sh openjdk-25-25.0.1+8/debian/tests/hotspot-autopkgtest.sh --- openjdk-25-25~32ea/debian/tests/hotspot-autopkgtest.sh 2025-07-18 11:45:02.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/tests/hotspot-autopkgtest.sh 2025-10-17 07:17:07.000000000 +0000 @@ -22,6 +22,7 @@ problem_list=${AUTOPKGTEST_TMP}/problems.txt debian/tests/write-problems.sh ${problem_list} ${HOTSPOT_JTREG_PATH}/ProblemList.txt hotspot +cat debian/tests/skip-large-autopkgtest.txt >> ${problem_list} ARGS="$*" JT_DEFAULT_ARGS="-exclude:${problem_list} -k:!stress :tier1" diff -Nru openjdk-25-25~32ea/debian/tests/jdk-autopkgtest.in openjdk-25-25.0.1+8/debian/tests/jdk-autopkgtest.in --- openjdk-25-25~32ea/debian/tests/jdk-autopkgtest.in 2024-07-20 08:15:29.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/tests/jdk-autopkgtest.in 2025-10-17 07:17:07.000000000 +0000 @@ -43,6 +43,7 @@ problem_list=${AUTOPKGTEST_TMP}/problems.txt debian/tests/write-problems.sh ${problem_list} ${JDK_JTREG_PATH}/ProblemList.txt jdk +cat debian/tests/skip-large-autopkgtest.txt >> ${problem_list} ARGS="$*" JT_DEFAULT_ARGS="-exclude:${problem_list} -k:!stress :tier1" diff -Nru openjdk-25-25~32ea/debian/tests/jdk-autopkgtest.sh openjdk-25-25.0.1+8/debian/tests/jdk-autopkgtest.sh --- openjdk-25-25~32ea/debian/tests/jdk-autopkgtest.sh 2025-07-18 11:45:02.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/tests/jdk-autopkgtest.sh 2025-10-17 07:17:07.000000000 +0000 @@ -43,6 +43,7 @@ problem_list=${AUTOPKGTEST_TMP}/problems.txt debian/tests/write-problems.sh ${problem_list} ${JDK_JTREG_PATH}/ProblemList.txt jdk +cat debian/tests/skip-large-autopkgtest.txt >> ${problem_list} ARGS="$*" JT_DEFAULT_ARGS="-exclude:${problem_list} -k:!stress :tier1" diff -Nru openjdk-25-25~32ea/debian/tests/problems.csv openjdk-25-25.0.1+8/debian/tests/problems.csv --- openjdk-25-25~32ea/debian/tests/problems.csv 2025-07-18 11:45:02.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/tests/problems.csv 2025-09-27 10:46:55.000000000 +0000 @@ -1,7 +1,7 @@ Test,Bug,Comment,Packages,Arch,Release -Error: runtime/Unsafe/InternalErrorTest.java,JDK-8335238,"To investigate, not critical for security release – JDK-22 will expire before OO release",:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,i386,:release-all +Error: runtime/Unsafe/InternalErrorTest.java,JDK-8335238,"To investigate, not critical for security release – JDK-22 will expire before OO release",:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,i386,:release-all Error: serviceability/jvmti/vthread/SuspendResume1/SuspendResume1.java#default,,"Deadlock, new failure, not critical – JDK-22 will expire before OO release",:openjdk-22,ppc64el,:release-all -FAILED: compiler/arguments/CheckCICompilerCount.java,,"Existing failure (exit code 0, expected 1)",:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,i386,:release-all +FAILED: compiler/arguments/CheckCICompilerCount.java,,"Existing failure (exit code 0, expected 1)",:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,i386,:release-all FAILED: compiler/codecache/MHIntrinsicAllocFailureTest.java,JDK-8298947,The issue only happens on armhf platform. ,:openjdk-17:openjdk-21,armhf,:release-all FAILED: gtest/GTestWrapper.java,,"17:UninitializedDoubleElementWorkerDataArrayTest.print_summary_on_test_vm, ",:openjdk-17:openjdk-21,i386,:release-all FAILED: java/foreign/critical/TestCritical.java,,"SEGSEGV in test, submit bug, not critical for security release",:openjdk-22,s390x,:release-all @@ -12,38 +12,38 @@ FAILED: java/foreign/TestSegments.java,,Ignore test failure in the preview api,:openjdk-21,:i386,:release-all FAILED: java/foreign/TestUpcallHighArity.java,,Ignore test failure in the preview api,:openjdk-21,:i386,:release-all FAILED: java/foreign/TestUpcallStructScope.java,,Ignore test failure in the preview api,:openjdk-21,:i386,:release-all -FAILED: java/io/File/createTempFile/TargetDirectory.java,JDK-8166162,Container issue,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all +FAILED: java/io/File/createTempFile/TargetDirectory.java,JDK-8166162,Container issue,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all FAILED: java/io/File/GetXSpace.java,,"Container issue, disk space size exceeds 32 bit integer",:openjdk-17:openjdk-21:openjdk-22,:i386:armhf,:release-all -FAILED: java/nio/channels/FileChannel/directio/DirectIOTest.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/channels/FileChannel/directio/PreadDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/channels/FileChannel/directio/PwriteDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/channels/FileChannel/directio/ReadDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/channels/FileChannel/directio/WriteDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/file/attribute/AclFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all +FAILED: java/nio/channels/FileChannel/directio/DirectIOTest.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/channels/FileChannel/directio/PreadDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/channels/FileChannel/directio/PwriteDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/channels/FileChannel/directio/ReadDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/channels/FileChannel/directio/WriteDirect.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/file/attribute/AclFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all FAILED: java/nio/file/attribute/BasicFileAttributeView/CreationTime.java,JDK-8166162,Container issue,:openjdk-22,i386,:release-all -FAILED: java/nio/file/attribute/BasicFileAttributeView/SetTimesNanos.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/file/attribute/DosFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/file/attribute/PosixFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/file/Files/CheckPermissions.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/file/Files/CopyAndMove.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/file/Files/CopyMoveVariations.java,JDK-8166162,Container issue,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/file/Files/FileAttributes.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/file/Files/InterruptCopy.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/file/Files/Misc.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/file/Files/TemporaryFiles.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: java/nio/file/FileStore/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: com/sun/net/httpserver/simpleserver/RootDirPermissionsTest.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all +FAILED: java/nio/file/attribute/BasicFileAttributeView/SetTimesNanos.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/file/attribute/DosFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/file/attribute/PosixFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/file/attribute/UserDefinedFileAttributeView/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/file/Files/CheckPermissions.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/file/Files/CopyAndMove.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/file/Files/CopyMoveVariations.java,JDK-8166162,Container issue,:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/file/Files/FileAttributes.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/file/Files/InterruptCopy.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/file/Files/Misc.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/file/Files/TemporaryFiles.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: java/nio/file/FileStore/Basic.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: com/sun/net/httpserver/simpleserver/DocRootDirPermissionsTest.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11::openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all FAILED: runtime/cds/appcds/jcmd/JCmdTestDynamicDump.java,,flaky test (?) existing comment,:openjdk-17,:arch-all,:release-all FAILED: runtime/cds/appcds/jcmd/JCmdTestFileSafety.java,,flaky test (?) existing comment,:openjdk-17,i386:arm64:amd64:ppc64el,:release-all FAILED: runtime/cds/appcds/jcmd/JCmdTestStaticDump.java,,flaky test (?) existing comment,:openjdk-17,:arch-all,:release-all FAILED: runtime/ErrorHandling/MachCodeFramesInErrorFile.java,,java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code at java.base/java.lang.Long.toHexString(Long.java:309) at,:openjdk-17:openjdk-21,armhf,:release-all FAILED: runtime/jni/nativeStack/TestNativeStack.java,JDK-8312016,"Backport fix (do not add patch, the fix just disables the test)",:openjdk-lts:openjdk-11:openjdk-17,armhf,:release-all -FAILED: runtime/LoadClass/LongBCP.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all +FAILED: runtime/LoadClass/LongBCP.java,JDK-8166162,Container issue,:openjdk-lts:openjdk-11:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all FAILED: runtime/Monitor/ConcurrentDeflation.java,,LockingMode == 0 (LM_MONITOR) is not fully implemented on this architectureError: Could not create the Java Virtual Machine.,:openjdk-21,armhf,:release-all -FAILED: runtime/NMT/VirtualAllocCommitMerge.java,JDK-8309698,P4 bug (existing issue),:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,s390x,:release-all +FAILED: runtime/NMT/VirtualAllocCommitMerge.java,JDK-8309698,P4 bug (existing issue),:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,s390x,:release-all FAILED: serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java,JDK-8303168,Existing bug,:openjdk-21,armhf,:release-all -FAILED: tools/jlink/JLinkTest.java,JDK-8240349,Bugfix failed for i386 (P4 bug),:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:,i386,:release-all +FAILED: tools/jlink/JLinkTest.java,JDK-8240349,Bugfix failed for i386 (P4 bug),:openjdk-17:openjdk-21:openjdk-22:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,i386,:release-all FAILED: jdk/javadoc/doclet/dupThrowsTags/TestDupThrowsTags.java,,tests failing due to disable-doclint-by-default.diff (reproducible build maintainer patch),:openjdk-lts:openjdk-11,:arch-all,:release-all FAILED: jdk/javadoc/doclet/T6735320/T6735320.java,,tests failing due to disable-doclint-by-default.diff (reproducible build maintainer patch),:openjdk-lts:openjdk-11,:arch-all,:release-all FAILED: jdk/javadoc/doclet/testBadHtml/TestBadHtml.java,,tests failing due to disable-doclint-by-default.diff (reproducible build maintainer patch),:openjdk-lts:openjdk-11,:arch-all,:release-all @@ -84,6 +84,6 @@ FAILED: java/foreign/TestUpcallStack.java,, asserts due to the invalid structure size. Ignore as this is a preview API and the issue does not occur in openjdk-22. I will add it to the problemlist.,:openjdk-21,:armhf,:release-all FAILED: java/foreign/TestVarArgs.java,, asserts due to the invalid structure size. Ignore as this is a preview API and the issue does not occur in openjdk-22. I will add it to the problemlist.,:openjdk-21,:armhf,:release-all FAILED: runtime/os/TestTrimNative.java#trimNative,, java.lang.RuntimeException: We found fewer (periodic) trim lines in UL log than expected (expected at least 13 found 11). This looks like a flaky test - it asserts number of lines from the periodic trimmer e.g. src/hotspot/share/runtime/trimNativeHeap.hpp:56 which causes the test to fail due to the slow VM. Test passes locally.,:openjdk-21,:armhf,:release-all -FAILED: sun/security/util/Debug/DebugOptions.java,JDK-8339713,Stack overflow error on 32-bit platforms,:openjdk-17:openjdk-21:openjdk-23:openjdk-24:openjdk-25:,:armhf:i386:s390x,:release-all -Error: jdk/jshell/TerminalNoExecTest.java,,BackingStoreException: Couldn't get file lock - possibly because the LP (non-root) container has no home directory,:openjdk-23:openjdk-24:openjdk-25:,:arch-all,:release-all -FAILED: applications/ctw/modules/jdk_jfr.java,JDK-8352567, Unimplemented SharedRuntime::generate_jfr_write_checkpoint for S390x, :openjdk-25:,:s390x,:release-all +FAILED: sun/security/util/Debug/DebugOptions.java,JDK-8339713,Stack overflow error on 32-bit platforms,:openjdk-17:openjdk-21:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:armhf:i386:s390x,:release-all +Error: jdk/jshell/TerminalNoExecTest.java,,BackingStoreException: Couldn't get file lock - possibly because the LP (non-root) container has no home directory,:openjdk-23:openjdk-24:openjdk-25:openjdk-26:,:arch-all,:release-all +FAILED: applications/ctw/modules/jdk_jfr.java,JDK-8352567, Unimplemented SharedRuntime::generate_jfr_write_checkpoint for S390x, :openjdk-25:openjdk-26:,:s390x,:release-all diff -Nru openjdk-25-25~32ea/debian/tests/skip-large-autopkgtest.txt openjdk-25-25.0.1+8/debian/tests/skip-large-autopkgtest.txt --- openjdk-25-25~32ea/debian/tests/skip-large-autopkgtest.txt 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/tests/skip-large-autopkgtest.txt 2025-10-17 07:17:07.000000000 +0000 @@ -0,0 +1,7 @@ +# The list of tier1 tests that require large amount of memory >=2G + +runtime/cds/NonJVMVariantLocation.java 0000000 generic-all +runtime/jni/checked/TestLargeUTF8Length.java 0000000 generic-all +java/foreign/TestLargeSegmentCopy.java 0000000 generic-all +java/foreign/TestStringEncodingJumbo.java 0000000 generic-all +java/util/HashMap/WhiteBoxResizeTest.java 0000000 generic-all diff -Nru openjdk-25-25~32ea/debian/watch openjdk-25-25.0.1+8/debian/watch --- openjdk-25-25~32ea/debian/watch 2025-02-03 11:20:59.000000000 +0000 +++ openjdk-25-25.0.1+8/debian/watch 2025-10-23 10:25:46.000000000 +0000 @@ -1,8 +1,8 @@ version=4 opts=\ -repack,repacksuffix=ea,oversionmangle=s/\+(\d+)/\~$1/,dversionmangle=s/\~(\d*)ea$/\+$1/,\ +repack,\ compression=xz, \ - https://github.com/openjdk/jdk/tags \ + https://github.com/openjdk/jdk25u/tags \ (?:.*?/)?jdk-(25[\+\.\d]*)\.tar\.gz opts=\ diff -Nru openjdk-25-25~32ea/make/conf/version-numbers.conf openjdk-25-25.0.1+8/make/conf/version-numbers.conf --- openjdk-25-25~32ea/make/conf/version-numbers.conf 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/make/conf/version-numbers.conf 2025-09-25 16:16:56.000000000 +0000 @@ -28,15 +28,15 @@ DEFAULT_VERSION_FEATURE=25 DEFAULT_VERSION_INTERIM=0 -DEFAULT_VERSION_UPDATE=0 +DEFAULT_VERSION_UPDATE=1 DEFAULT_VERSION_PATCH=0 DEFAULT_VERSION_EXTRA1=0 DEFAULT_VERSION_EXTRA2=0 DEFAULT_VERSION_EXTRA3=0 -DEFAULT_VERSION_DATE=2025-09-16 +DEFAULT_VERSION_DATE=2025-10-21 DEFAULT_VERSION_CLASSFILE_MAJOR=69 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" DEFAULT_VERSION_CLASSFILE_MINOR=0 DEFAULT_VERSION_DOCS_API_SINCE=11 DEFAULT_ACCEPTABLE_BOOT_VERSIONS="24 25" DEFAULT_JDK_SOURCE_TARGET_VERSION=25 -DEFAULT_PROMOTED_VERSION_PRE=ea +DEFAULT_PROMOTED_VERSION_PRE= diff -Nru openjdk-25-25~32ea/make/jdk/src/classes/build/tools/cldrconverter/Bundle.java openjdk-25-25.0.1+8/make/jdk/src/classes/build/tools/cldrconverter/Bundle.java --- openjdk-25-25~32ea/make/jdk/src/classes/build/tools/cldrconverter/Bundle.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/make/jdk/src/classes/build/tools/cldrconverter/Bundle.java 2025-09-25 16:16:56.000000000 +0000 @@ -542,10 +542,10 @@ if (pattern != null) { // Perform date-time format pattern conversion which is // applicable to both SimpleDateFormat and j.t.f.DateTimeFormatter. - String transPattern = translateDateFormatLetters(calendarType, pattern, this::convertDateTimePatternLetter); + String transPattern = translateDateFormatLetters(calendarType, key, pattern, this::convertDateTimePatternLetter); dateTimePatterns.add(i, transPattern); // Additionally, perform SDF specific date-time format pattern conversion - sdfPatterns.add(i, translateDateFormatLetters(calendarType, transPattern, this::convertSDFLetter)); + sdfPatterns.add(i, translateDateFormatLetters(calendarType, key, transPattern, this::convertSDFLetter)); } else { dateTimePatterns.add(i, null); sdfPatterns.add(i, null); @@ -568,7 +568,7 @@ } } - private String translateDateFormatLetters(CalendarType calendarType, String cldrFormat, ConvertDateTimeLetters converter) { + private String translateDateFormatLetters(CalendarType calendarType, String patternKey, String cldrFormat, ConvertDateTimeLetters converter) { String pattern = cldrFormat; int length = pattern.length(); boolean inQuote = false; @@ -587,7 +587,7 @@ if (nextc == '\'') { i++; if (count != 0) { - converter.convert(calendarType, lastLetter, count, jrePattern); + converter.convert(calendarType, patternKey, lastLetter, count, jrePattern); lastLetter = 0; count = 0; } @@ -597,7 +597,7 @@ } if (!inQuote) { if (count != 0) { - converter.convert(calendarType, lastLetter, count, jrePattern); + converter.convert(calendarType, patternKey, lastLetter, count, jrePattern); lastLetter = 0; count = 0; } @@ -614,7 +614,7 @@ } if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z')) { if (count != 0) { - converter.convert(calendarType, lastLetter, count, jrePattern); + converter.convert(calendarType, patternKey, lastLetter, count, jrePattern); lastLetter = 0; count = 0; } @@ -627,7 +627,7 @@ count++; continue; } - converter.convert(calendarType, lastLetter, count, jrePattern); + converter.convert(calendarType, patternKey, lastLetter, count, jrePattern); lastLetter = c; count = 1; } @@ -637,7 +637,7 @@ } if (count != 0) { - converter.convert(calendarType, lastLetter, count, jrePattern); + converter.convert(calendarType, patternKey, lastLetter, count, jrePattern); } if (cldrFormat.contentEquals(jrePattern)) { return cldrFormat; @@ -661,7 +661,7 @@ * on the support given by the SimpleDateFormat and the j.t.f.DateTimeFormatter * for date-time formatting. */ - private void convertDateTimePatternLetter(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb) { + private void convertDateTimePatternLetter(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb) { switch (cldrLetter) { case 'u': case 'U': @@ -683,7 +683,7 @@ * Perform a conversion of CLDR date-time format pattern letter which is * specific to the SimpleDateFormat. */ - private void convertSDFLetter(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb) { + private void convertSDFLetter(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb) { switch (cldrLetter) { case 'G': if (calendarType != CalendarType.GREGORIAN) { @@ -722,6 +722,17 @@ appendN('z', count, sb); break; + case 'y': + // If the style is FULL/LONG for a Japanese Calendar, make the + // count == 4 for Gan-nen + if (calendarType == CalendarType.JAPANESE && + (patternKey.contains("full-") || + patternKey.contains("long-"))) { + count = 4; + } + appendN(cldrLetter, count, sb); + break; + case 'Z': if (count == 4 || count == 5) { sb.append("XXX"); @@ -767,6 +778,7 @@ .collect(Collectors.toMap( e -> calendarPrefix + e.getKey(), e -> translateDateFormatLetters(calendarType, + e.getKey(), (String)e.getValue(), this::convertDateTimePatternLetter) )) @@ -775,7 +787,7 @@ @FunctionalInterface private interface ConvertDateTimeLetters { - void convert(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb); + void convert(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb); } /** diff -Nru openjdk-25-25~32ea/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp openjdk-25-25.0.1+8/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp --- openjdk-25-25~32ea/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -292,7 +292,8 @@ } else { assert(is_phantom, "only remaining strength"); assert(!is_narrow, "phantom access cannot be narrow"); - __ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom)); + // AOT saved adapters need relocation for this call. + __ lea(lr, RuntimeAddress(CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_phantom))); } __ blr(lr); __ mov(rscratch1, r0); diff -Nru openjdk-25-25~32ea/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp --- openjdk-25-25~32ea/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -5345,42 +5345,6 @@ } /** - * Multiply 32 bit by 32 bit first loop. - */ -void MacroAssembler::multiply_32_x_32_loop(Register x, Register xstart, Register x_xstart, - Register y, Register y_idx, Register z, - Register carry, Register product, - Register idx, Register kdx) { - // jlong carry, x[], y[], z[]; - // for (int idx=ystart, kdx=ystart+1+xstart; idx >= 0; idx--, kdx--) { - // long product = y[idx] * x[xstart] + carry; - // z[kdx] = (int)product; - // carry = product >>> 32; - // } - // z[xstart] = (int)carry; - - Label L_first_loop, L_first_loop_exit; - blez(idx, L_first_loop_exit); - - shadd(t0, xstart, x, t0, LogBytesPerInt); - lwu(x_xstart, Address(t0, 0)); - - bind(L_first_loop); - subiw(idx, idx, 1); - shadd(t0, idx, y, t0, LogBytesPerInt); - lwu(y_idx, Address(t0, 0)); - mul(product, x_xstart, y_idx); - add(product, product, carry); - srli(carry, product, 32); - subiw(kdx, kdx, 1); - shadd(t0, kdx, z, t0, LogBytesPerInt); - sw(product, Address(t0, 0)); - bgtz(idx, L_first_loop); - - bind(L_first_loop_exit); -} - -/** * Multiply 64 bit by 64 bit first loop. */ void MacroAssembler::multiply_64_x_64_loop(Register x, Register xstart, Register x_xstart, @@ -5596,77 +5560,16 @@ const Register carry = tmp5; const Register product = xlen; const Register x_xstart = tmp0; + const Register jdx = tmp1; mv(idx, ylen); // idx = ylen; addw(kdx, xlen, ylen); // kdx = xlen+ylen; mv(carry, zr); // carry = 0; - Label L_multiply_64_x_64_loop, L_done; - + Label L_done; subiw(xstart, xlen, 1); bltz(xstart, L_done); - const Register jdx = tmp1; - - if (AvoidUnalignedAccesses) { - int base_offset = arrayOopDesc::base_offset_in_bytes(T_INT); - assert((base_offset % (UseCompactObjectHeaders ? 4 : - (UseCompressedClassPointers ? 8 : 4))) == 0, "Must be"); - - if ((base_offset % 8) == 0) { - // multiply_64_x_64_loop emits 8-byte load/store to access two elements - // at a time from int arrays x and y. When base_offset is 8 bytes, these - // accesses are naturally aligned if both xlen and ylen are even numbers. - orr(t0, xlen, ylen); - test_bit(t0, t0, 0); - beqz(t0, L_multiply_64_x_64_loop); - } - - Label L_second_loop_unaligned, L_third_loop, L_third_loop_exit; - - multiply_32_x_32_loop(x, xstart, x_xstart, y, y_idx, z, carry, product, idx, kdx); - shadd(t0, xstart, z, t0, LogBytesPerInt); - sw(carry, Address(t0, 0)); - - bind(L_second_loop_unaligned); - mv(carry, zr); - mv(jdx, ylen); - subiw(xstart, xstart, 1); - bltz(xstart, L_done); - - subi(sp, sp, 2 * wordSize); - sd(z, Address(sp, 0)); - sd(zr, Address(sp, wordSize)); - shadd(t0, xstart, z, t0, LogBytesPerInt); - addi(z, t0, 4); - shadd(t0, xstart, x, t0, LogBytesPerInt); - lwu(product, Address(t0, 0)); - - blez(jdx, L_third_loop_exit); - - bind(L_third_loop); - subiw(jdx, jdx, 1); - shadd(t0, jdx, y, t0, LogBytesPerInt); - lwu(t0, Address(t0, 0)); - mul(t1, t0, product); - add(t0, t1, carry); - shadd(tmp6, jdx, z, t1, LogBytesPerInt); - lwu(t1, Address(tmp6, 0)); - add(t0, t0, t1); - sw(t0, Address(tmp6, 0)); - srli(carry, t0, 32); - bgtz(jdx, L_third_loop); - - bind(L_third_loop_exit); - ld(z, Address(sp, 0)); - addi(sp, sp, 2 * wordSize); - shadd(t0, xstart, z, t0, LogBytesPerInt); - sw(carry, Address(t0, 0)); - - j(L_second_loop_unaligned); - } - - bind(L_multiply_64_x_64_loop); multiply_64_x_64_loop(x, xstart, x_xstart, y, y_idx, z, carry, product, idx, kdx); Label L_second_loop_aligned; diff -Nru openjdk-25-25~32ea/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp --- openjdk-25-25~32ea/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -1384,10 +1384,6 @@ void adc(Register dst, Register src1, Register src2, Register carry); void add2_with_carry(Register final_dest_hi, Register dest_hi, Register dest_lo, Register src1, Register src2, Register carry); - void multiply_32_x_32_loop(Register x, Register xstart, Register x_xstart, - Register y, Register y_idx, Register z, - Register carry, Register product, - Register idx, Register kdx); void multiply_64_x_64_loop(Register x, Register xstart, Register x_xstart, Register y, Register y_idx, Register z, Register carry, Register product, diff -Nru openjdk-25-25~32ea/src/hotspot/cpu/riscv/riscv.ad openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/riscv.ad --- openjdk-25-25~32ea/src/hotspot/cpu/riscv/riscv.ad 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/riscv.ad 2025-09-25 16:16:56.000000000 +0000 @@ -8431,6 +8431,17 @@ ins_pipe(pipe_class_empty); %} +instruct castVVMask(vRegMask dst) +%{ + match(Set dst (CastVV dst)); + + size(0); + format %{ "# castVV of $dst" %} + ins_encode(/* empty encoding */); + ins_cost(0); + ins_pipe(pipe_class_empty); +%} + // ============================================================================ // Convert Instructions diff -Nru openjdk-25-25~32ea/src/hotspot/cpu/riscv/vm_version_riscv.cpp openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/vm_version_riscv.cpp --- openjdk-25-25~32ea/src/hotspot/cpu/riscv/vm_version_riscv.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/vm_version_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -203,15 +203,15 @@ } } - // Misc Intrinsics could depend on RVV + // Misc Intrinsics that could depend on RVV. - if (UseZba || UseRVV) { + if (!AvoidUnalignedAccesses && (UseZba || UseRVV)) { if (FLAG_IS_DEFAULT(UseCRC32Intrinsics)) { FLAG_SET_DEFAULT(UseCRC32Intrinsics, true); } } else { if (!FLAG_IS_DEFAULT(UseCRC32Intrinsics)) { - warning("CRC32 intrinsic requires Zba or RVV instructions (not available on this CPU)"); + warning("CRC32 intrinsic are not available on this CPU."); } FLAG_SET_DEFAULT(UseCRC32Intrinsics, false); } @@ -325,20 +325,40 @@ FLAG_SET_DEFAULT(UseMulAddIntrinsic, true); } - if (FLAG_IS_DEFAULT(UseMultiplyToLenIntrinsic)) { - FLAG_SET_DEFAULT(UseMultiplyToLenIntrinsic, true); + if (!AvoidUnalignedAccesses) { + if (FLAG_IS_DEFAULT(UseMultiplyToLenIntrinsic)) { + FLAG_SET_DEFAULT(UseMultiplyToLenIntrinsic, true); + } + } else if (UseMultiplyToLenIntrinsic) { + warning("Intrinsics for BigInteger.multiplyToLen() not available on this CPU."); + FLAG_SET_DEFAULT(UseMultiplyToLenIntrinsic, false); } - if (FLAG_IS_DEFAULT(UseSquareToLenIntrinsic)) { - FLAG_SET_DEFAULT(UseSquareToLenIntrinsic, true); + if (!AvoidUnalignedAccesses) { + if (FLAG_IS_DEFAULT(UseSquareToLenIntrinsic)) { + FLAG_SET_DEFAULT(UseSquareToLenIntrinsic, true); + } + } else if (UseSquareToLenIntrinsic) { + warning("Intrinsics for BigInteger.squareToLen() not available on this CPU."); + FLAG_SET_DEFAULT(UseSquareToLenIntrinsic, false); } - if (FLAG_IS_DEFAULT(UseMontgomeryMultiplyIntrinsic)) { - FLAG_SET_DEFAULT(UseMontgomeryMultiplyIntrinsic, true); + if (!AvoidUnalignedAccesses) { + if (FLAG_IS_DEFAULT(UseMontgomeryMultiplyIntrinsic)) { + FLAG_SET_DEFAULT(UseMontgomeryMultiplyIntrinsic, true); + } + } else if (UseMontgomeryMultiplyIntrinsic) { + warning("Intrinsics for BigInteger.montgomeryMultiply() not available on this CPU."); + FLAG_SET_DEFAULT(UseMontgomeryMultiplyIntrinsic, false); } - if (FLAG_IS_DEFAULT(UseMontgomerySquareIntrinsic)) { - FLAG_SET_DEFAULT(UseMontgomerySquareIntrinsic, true); + if (!AvoidUnalignedAccesses) { + if (FLAG_IS_DEFAULT(UseMontgomerySquareIntrinsic)) { + FLAG_SET_DEFAULT(UseMontgomerySquareIntrinsic, true); + } + } else if (UseMontgomerySquareIntrinsic) { + warning("Intrinsics for BigInteger.montgomerySquare() not available on this CPU."); + FLAG_SET_DEFAULT(UseMontgomerySquareIntrinsic, false); } // Adler32 diff -Nru openjdk-25-25~32ea/src/hotspot/cpu/x86/stubDeclarations_x86.hpp openjdk-25-25.0.1+8/src/hotspot/cpu/x86/stubDeclarations_x86.hpp --- openjdk-25-25~32ea/src/hotspot/cpu/x86/stubDeclarations_x86.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/cpu/x86/stubDeclarations_x86.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -30,7 +30,7 @@ do_arch_blob, \ do_arch_entry, \ do_arch_entry_init) \ - do_arch_blob(initial, 20000 WINDOWS_ONLY(+1000)) \ + do_arch_blob(initial, PRODUCT_ONLY(20000) NOT_PRODUCT(21000) WINDOWS_ONLY(+1000)) \ do_stub(initial, verify_mxcsr) \ do_arch_entry(x86, initial, verify_mxcsr, verify_mxcsr_entry, \ verify_mxcsr_entry) \ diff -Nru openjdk-25-25~32ea/src/hotspot/share/classfile/stackMapTable.cpp openjdk-25-25.0.1+8/src/hotspot/share/classfile/stackMapTable.cpp --- openjdk-25-25~32ea/src/hotspot/share/classfile/stackMapTable.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/classfile/stackMapTable.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -132,8 +132,16 @@ } void StackMapTable::check_jump_target( - StackMapFrame* frame, int32_t target, TRAPS) const { + StackMapFrame* frame, int bci, int offset, TRAPS) const { ErrorContext ctx; + // Jump targets must be within the method and the method size is limited. See JVMS 4.11 + int min_offset = -1 * max_method_code_size; + if (offset < min_offset || offset > max_method_code_size) { + frame->verifier()->verify_error(ErrorContext::bad_stackmap(bci, frame), + "Illegal target of jump or branch (bci %d + offset %d)", bci, offset); + return; + } + int target = bci + offset; bool match = match_stackmap( frame, target, true, false, &ctx, CHECK_VERIFY(frame->verifier())); if (!match || (target < 0 || target >= _code_length)) { diff -Nru openjdk-25-25~32ea/src/hotspot/share/classfile/stackMapTable.hpp openjdk-25-25.0.1+8/src/hotspot/share/classfile/stackMapTable.hpp --- openjdk-25-25~32ea/src/hotspot/share/classfile/stackMapTable.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/classfile/stackMapTable.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -67,7 +67,7 @@ // Check jump instructions. Make sure there are no uninitialized // instances on backward branch. - void check_jump_target(StackMapFrame* frame, int32_t target, TRAPS) const; + void check_jump_target(StackMapFrame* frame, int bci, int offset, TRAPS) const; // The following methods are only used inside this class. diff -Nru openjdk-25-25~32ea/src/hotspot/share/classfile/verifier.cpp openjdk-25-25.0.1+8/src/hotspot/share/classfile/verifier.cpp --- openjdk-25-25~32ea/src/hotspot/share/classfile/verifier.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/classfile/verifier.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -781,7 +781,6 @@ // Merge with the next instruction { - int target; VerificationType type, type2; VerificationType atype; @@ -1606,9 +1605,8 @@ case Bytecodes::_ifle: current_frame.pop_stack( VerificationType::integer_type(), CHECK_VERIFY(this)); - target = bcs.dest(); stackmap_table.check_jump_target( - ¤t_frame, target, CHECK_VERIFY(this)); + ¤t_frame, bcs.bci(), bcs.get_offset_s2(), CHECK_VERIFY(this)); no_control_flow = false; break; case Bytecodes::_if_acmpeq : case Bytecodes::_if_acmpne : @@ -1619,19 +1617,16 @@ case Bytecodes::_ifnonnull : current_frame.pop_stack( VerificationType::reference_check(), CHECK_VERIFY(this)); - target = bcs.dest(); stackmap_table.check_jump_target - (¤t_frame, target, CHECK_VERIFY(this)); + (¤t_frame, bcs.bci(), bcs.get_offset_s2(), CHECK_VERIFY(this)); no_control_flow = false; break; case Bytecodes::_goto : - target = bcs.dest(); stackmap_table.check_jump_target( - ¤t_frame, target, CHECK_VERIFY(this)); + ¤t_frame, bcs.bci(), bcs.get_offset_s2(), CHECK_VERIFY(this)); no_control_flow = true; break; case Bytecodes::_goto_w : - target = bcs.dest_w(); stackmap_table.check_jump_target( - ¤t_frame, target, CHECK_VERIFY(this)); + ¤t_frame, bcs.bci(), bcs.get_offset_s4(), CHECK_VERIFY(this)); no_control_flow = true; break; case Bytecodes::_tableswitch : case Bytecodes::_lookupswitch : @@ -2280,15 +2275,14 @@ } } } - int target = bci + default_offset; - stackmap_table->check_jump_target(current_frame, target, CHECK_VERIFY(this)); + stackmap_table->check_jump_target(current_frame, bci, default_offset, CHECK_VERIFY(this)); for (int i = 0; i < keys; i++) { // Because check_jump_target() may safepoint, the bytecode could have // moved, which means 'aligned_bcp' is no good and needs to be recalculated. aligned_bcp = align_up(bcs->bcp() + 1, jintSize); - target = bci + (jint)Bytes::get_Java_u4(aligned_bcp+(3+i*delta)*jintSize); + int offset = (jint)Bytes::get_Java_u4(aligned_bcp+(3+i*delta)*jintSize); stackmap_table->check_jump_target( - current_frame, target, CHECK_VERIFY(this)); + current_frame, bci, offset, CHECK_VERIFY(this)); } NOT_PRODUCT(aligned_bcp = nullptr); // no longer valid at this point } @@ -2549,7 +2543,12 @@ case Bytecodes::_goto: case Bytecodes::_goto_w: { - int target = (opcode == Bytecodes::_goto ? bcs.dest() : bcs.dest_w()); + int offset = (opcode == Bytecodes::_goto ? bcs.get_offset_s2() : bcs.get_offset_s4()); + int min_offset = -1 * max_method_code_size; + // Check offset for overflow + if (offset < min_offset || offset > max_method_code_size) return false; + + int target = bci + offset; if (visited_branches->contains(bci)) { if (bci_stack->is_empty()) { if (handler_stack->is_empty()) { @@ -2607,7 +2606,10 @@ // Push the switch alternatives onto the stack. for (int i = 0; i < keys; i++) { - int target = bci + (jint)Bytes::get_Java_u4(aligned_bcp+(3+i*delta)*jintSize); + int min_offset = -1 * max_method_code_size; + int offset = (jint)Bytes::get_Java_u4(aligned_bcp+(3+i*delta)*jintSize); + if (offset < min_offset || offset > max_method_code_size) return false; + int target = bci + offset; if (target > code_length) return false; bci_stack->push(target); } diff -Nru openjdk-25-25~32ea/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp --- openjdk-25-25~32ea/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -1452,27 +1452,23 @@ } } -size_t ShenandoahHeap::trash_humongous_region_at(ShenandoahHeapRegion* start) { +size_t ShenandoahHeap::trash_humongous_region_at(ShenandoahHeapRegion* start) const { assert(start->is_humongous_start(), "reclaim regions starting with the first one"); - - oop humongous_obj = cast_to_oop(start->bottom()); - size_t size = humongous_obj->size(); - size_t required_regions = ShenandoahHeapRegion::required_regions(size * HeapWordSize); - size_t index = start->index() + required_regions - 1; - assert(!start->has_live(), "liveness must be zero"); - for(size_t i = 0; i < required_regions; i++) { - // Reclaim from tail. Otherwise, assertion fails when printing region to trace log, - // as it expects that every region belongs to a humongous region starting with a humongous start region. - ShenandoahHeapRegion* region = get_region(index --); - - assert(region->is_humongous(), "expect correct humongous start or continuation"); + // Do not try to get the size of this humongous object. STW collections will + // have already unloaded classes, so an unmarked object may have a bad klass pointer. + ShenandoahHeapRegion* region = start; + size_t index = region->index(); + do { + assert(region->is_humongous(), "Expect correct humongous start or continuation"); assert(!region->is_cset(), "Humongous region should not be in collection set"); - region->make_trash_immediate(); - } - return required_regions; + region = get_region(++index); + } while (region != nullptr && region->is_humongous_continuation()); + + // Return number of regions trashed + return index - start->index(); } class ShenandoahCheckCleanGCLABClosure : public ThreadClosure { diff -Nru openjdk-25-25~32ea/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp --- openjdk-25-25~32ea/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -828,7 +828,7 @@ static inline void atomic_clear_oop(narrowOop* addr, oop compare); static inline void atomic_clear_oop(narrowOop* addr, narrowOop compare); - size_t trash_humongous_region_at(ShenandoahHeapRegion *r); + size_t trash_humongous_region_at(ShenandoahHeapRegion *r) const; static inline void increase_object_age(oop obj, uint additional_age); diff -Nru openjdk-25-25~32ea/src/hotspot/share/gc/z/zPageAllocator.cpp openjdk-25-25.0.1+8/src/hotspot/share/gc/z/zPageAllocator.cpp --- openjdk-25-25~32ea/src/hotspot/share/gc/z/zPageAllocator.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/gc/z/zPageAllocator.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -1936,7 +1936,7 @@ } const size_t committed = allocation->committed_capacity(); - const ZVirtualMemory non_harvested_vmem = vmem.last_part(allocation->harvested()); + const ZVirtualMemory non_harvested_vmem = partial_vmem.last_part(allocation->harvested()); const ZVirtualMemory committed_vmem = non_harvested_vmem.first_part(committed); const ZVirtualMemory non_committed_vmem = non_harvested_vmem.last_part(committed); diff -Nru openjdk-25-25~32ea/src/hotspot/share/gc/z/zPhysicalMemoryManager.cpp openjdk-25-25.0.1+8/src/hotspot/share/gc/z/zPhysicalMemoryManager.cpp --- openjdk-25-25~32ea/src/hotspot/share/gc/z/zPhysicalMemoryManager.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/gc/z/zPhysicalMemoryManager.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -214,9 +214,20 @@ }); } +static size_t inject_commit_limit(const ZVirtualMemory& vmem) { + // To facilitate easier interoperability with multi partition allocations we + // divide by ZNUMA::count(). Users of ZFailLargerCommits need to be aware of + // this when writing tests. In the future we could probe the VirtualMemoryManager + // and condition this division on whether the vmem is in the multi partition + // address space. + return align_up(MIN2(ZFailLargerCommits / ZNUMA::count(), vmem.size()), ZGranuleSize); +} + size_t ZPhysicalMemoryManager::commit(const ZVirtualMemory& vmem, uint32_t numa_id) { zbacking_index* const pmem = _physical_mappings.addr(vmem.start()); - const size_t size = vmem.size(); + const size_t size = ZFailLargerCommits > 0 + ? inject_commit_limit(vmem) + : vmem.size(); size_t total_committed = 0; diff -Nru openjdk-25-25~32ea/src/hotspot/share/gc/z/z_globals.hpp openjdk-25-25.0.1+8/src/hotspot/share/gc/z/z_globals.hpp --- openjdk-25-25~32ea/src/hotspot/share/gc/z/z_globals.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/gc/z/z_globals.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -118,6 +118,11 @@ develop(bool, ZVerifyOops, false, \ "Verify accessed oops") \ \ + develop(size_t, ZFailLargerCommits, 0, \ + "Commits larger than ZFailLargerCommits will be truncated, " \ + "used to stress page allocation commit failure paths " \ + "(0: Disabled)") \ + \ develop(uint, ZFakeNUMA, 1, \ "ZFakeNUMA is used to test the internal NUMA memory support " \ "without the need for UseNUMA") \ diff -Nru openjdk-25-25~32ea/src/hotspot/share/interpreter/bytecodeStream.hpp openjdk-25-25.0.1+8/src/hotspot/share/interpreter/bytecodeStream.hpp --- openjdk-25-25~32ea/src/hotspot/share/interpreter/bytecodeStream.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/interpreter/bytecodeStream.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -100,8 +100,23 @@ void set_next_bci(int bci) { assert(0 <= bci && bci <= method()->code_size(), "illegal bci"); _next_bci = bci; } // Bytecode-specific attributes - int dest() const { return bci() + bytecode().get_offset_s2(raw_code()); } - int dest_w() const { return bci() + bytecode().get_offset_s4(raw_code()); } + int get_offset_s2() const { return bytecode().get_offset_s2(raw_code()); } + int get_offset_s4() const { return bytecode().get_offset_s4(raw_code()); } + + // These methods are not safe to use before or during verification as they may + // have large offsets and cause overflows + int dest() const { + int min_offset = -1 * max_method_code_size; + int offset = bytecode().get_offset_s2(raw_code()); + guarantee(offset >= min_offset && offset <= max_method_code_size, "must be"); + return bci() + offset; + } + int dest_w() const { + int min_offset = -1 * max_method_code_size; + int offset = bytecode().get_offset_s4(raw_code()); + guarantee(offset >= min_offset && offset <= max_method_code_size, "must be"); + return bci() + offset; + } // One-byte indices. u1 get_index_u1() const { assert_raw_index_size(1); return *(jubyte*)(bcp()+1); } diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/instrumentation/jfrClassTransformer.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/instrumentation/jfrClassTransformer.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/instrumentation/jfrClassTransformer.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/instrumentation/jfrClassTransformer.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -132,14 +132,14 @@ } // Redefining / retransforming? -const Klass* JfrClassTransformer::find_existing_klass(const InstanceKlass* ik, JavaThread* thread) { +const InstanceKlass* JfrClassTransformer::find_existing_klass(const InstanceKlass* ik, JavaThread* thread) { assert(ik != nullptr, "invariant"); assert(thread != nullptr, "invariant"); JvmtiThreadState* const state = thread->jvmti_thread_state(); return state != nullptr ? klass_being_redefined(ik, state) : nullptr; } -const Klass* JfrClassTransformer::klass_being_redefined(const InstanceKlass* ik, JvmtiThreadState* state) { +const InstanceKlass* JfrClassTransformer::klass_being_redefined(const InstanceKlass* ik, JvmtiThreadState* state) { assert(ik != nullptr, "invariant"); assert(state != nullptr, "invariant"); const GrowableArray* const redef_klasses = state->get_classes_being_redefined(); @@ -149,9 +149,10 @@ for (int i = 0; i < redef_klasses->length(); ++i) { const Klass* const existing_klass = redef_klasses->at(i); assert(existing_klass != nullptr, "invariant"); + assert(existing_klass->is_instance_klass(), "invariant"); if (ik->name() == existing_klass->name() && ik->class_loader_data() == existing_klass->class_loader_data()) { // 'ik' is a scratch klass. Return the klass being redefined. - return existing_klass; + return InstanceKlass::cast(existing_klass); } } return nullptr; diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/instrumentation/jfrClassTransformer.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/instrumentation/jfrClassTransformer.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/instrumentation/jfrClassTransformer.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/instrumentation/jfrClassTransformer.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -38,10 +38,10 @@ class JfrClassTransformer : AllStatic { private: static InstanceKlass* create_new_instance_klass(InstanceKlass* ik, ClassFileStream* stream, TRAPS); - static const Klass* klass_being_redefined(const InstanceKlass* ik, JvmtiThreadState* state); + static const InstanceKlass* klass_being_redefined(const InstanceKlass* ik, JvmtiThreadState* state); public: - static const Klass* find_existing_klass(const InstanceKlass* ik, JavaThread* thread); + static const InstanceKlass* find_existing_klass(const InstanceKlass* ik, JavaThread* thread); static InstanceKlass* create_instance_klass(InstanceKlass*& ik, ClassFileStream* stream, bool is_initial_load, JavaThread* thread); static void copy_traceid(const InstanceKlass* ik, const InstanceKlass* new_ik); static void transfer_cached_class_file_data(InstanceKlass* ik, InstanceKlass* new_ik, const ClassFileParser& parser, JavaThread* thread); diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/jfr.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/jfr.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/jfr.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/jfr.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -36,6 +36,7 @@ #include "jfr/support/jfrResolution.hpp" #include "jfr/support/jfrThreadLocal.hpp" #include "jfr/support/methodtracer/jfrMethodTracer.hpp" +#include "jfr/support/methodtracer/jfrTraceTagging.hpp" #include "oops/instanceKlass.hpp" #include "oops/instanceKlass.inline.hpp" #include "oops/klass.hpp" @@ -88,12 +89,10 @@ } } -void Jfr::on_klass_redefinition(const InstanceKlass* ik, Thread* thread) { - assert(JfrMethodTracer::in_use(), "invariant"); - JfrMethodTracer::on_klass_redefinition(ik, thread); +void Jfr::on_klass_redefinition(const InstanceKlass* ik, const InstanceKlass* scratch_klass) { + JfrTraceTagging::on_klass_redefinition(ik, scratch_klass); } - bool Jfr::is_excluded(Thread* t) { return JfrJavaSupport::is_excluded(t); } diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/jfr.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/jfr.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/jfr.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/jfr.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -61,7 +61,7 @@ static void include_thread(Thread* thread); static void exclude_thread(Thread* thread); static void on_klass_creation(InstanceKlass*& ik, ClassFileParser& parser, TRAPS); - static void on_klass_redefinition(const InstanceKlass* ik, Thread* thread); + static void on_klass_redefinition(const InstanceKlass* ik, const InstanceKlass* scratch_klass); static void on_thread_start(Thread* thread); static void on_thread_exit(Thread* thread); static void on_resolution(const CallInfo& info, TRAPS); diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroup.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroup.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroup.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroup.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,417 +0,0 @@ -/* - * Copyright (c) 2016, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#include "jfr/recorder/checkpoint/jfrCheckpointWriter.hpp" -#include "jfr/recorder/checkpoint/types/jfrThreadGroup.hpp" -#include "jfr/utilities/jfrTypes.hpp" -#include "runtime/handles.inline.hpp" -#include "runtime/jniHandles.inline.hpp" -#include "runtime/safepoint.hpp" -#include "runtime/semaphore.hpp" -#include "utilities/growableArray.hpp" - -static const int initial_array_size = 30; - -class ThreadGroupExclusiveAccess : public StackObj { - private: - static Semaphore _mutex_semaphore; - public: - ThreadGroupExclusiveAccess() { _mutex_semaphore.wait(); } - ~ThreadGroupExclusiveAccess() { _mutex_semaphore.signal(); } -}; - -Semaphore ThreadGroupExclusiveAccess::_mutex_semaphore(1); -JfrThreadGroup* JfrThreadGroup::_instance = nullptr; - -class JfrThreadGroupPointers : public ResourceObj { - private: - const Handle _thread_group_handle; - jweak _thread_group_weak_ref; - public: - JfrThreadGroupPointers(Handle thread_group_handle, jweak thread_group_weak_ref); - Handle thread_group_handle() const; - jweak thread_group_weak_ref() const; - oopDesc* thread_group_oop() const; - jweak transfer_weak_global_handle_ownership(); - void clear_weak_ref(); -}; - -JfrThreadGroupPointers::JfrThreadGroupPointers(Handle thread_group_handle, jweak thread_group_weak_ref) : - _thread_group_handle(thread_group_handle), - _thread_group_weak_ref(thread_group_weak_ref) {} - -Handle JfrThreadGroupPointers::thread_group_handle() const { - return _thread_group_handle; -} - -jweak JfrThreadGroupPointers::thread_group_weak_ref() const { - return _thread_group_weak_ref; -} - -oopDesc* JfrThreadGroupPointers::thread_group_oop() const { - assert(_thread_group_weak_ref == nullptr || - JNIHandles::resolve_non_null(_thread_group_weak_ref) == _thread_group_handle(), "invariant"); - return _thread_group_handle(); -} - -jweak JfrThreadGroupPointers::transfer_weak_global_handle_ownership() { - jweak temp = _thread_group_weak_ref; - _thread_group_weak_ref = nullptr; - return temp; -} - -void JfrThreadGroupPointers::clear_weak_ref() { - if (nullptr != _thread_group_weak_ref) { - JNIHandles::destroy_weak_global(_thread_group_weak_ref); - } -} - -class JfrThreadGroupsHelper : public ResourceObj { - private: - static const int invalid_iterator_pos = -1; - GrowableArray* _thread_group_hierarchy; - int _current_iterator_pos; - - int populate_thread_group_hierarchy(const JavaThread* jt, Thread* current); - JfrThreadGroupPointers& at(int index); - - public: - JfrThreadGroupsHelper(const JavaThread* jt, Thread* current); - ~JfrThreadGroupsHelper(); - JfrThreadGroupPointers& next(); - bool is_valid() const; - bool has_next() const; -}; - -JfrThreadGroupsHelper::JfrThreadGroupsHelper(const JavaThread* jt, Thread* current) { - _thread_group_hierarchy = new GrowableArray(10); - _current_iterator_pos = populate_thread_group_hierarchy(jt, current) - 1; -} - -JfrThreadGroupsHelper::~JfrThreadGroupsHelper() { - assert(_current_iterator_pos == invalid_iterator_pos, "invariant"); - for (int i = 0; i < _thread_group_hierarchy->length(); ++i) { - _thread_group_hierarchy->at(i)->clear_weak_ref(); - } -} - -JfrThreadGroupPointers& JfrThreadGroupsHelper::at(int index) { - assert(_thread_group_hierarchy != nullptr, "invariant"); - assert(index > invalid_iterator_pos && index < _thread_group_hierarchy->length(), "invariant"); - return *(_thread_group_hierarchy->at(index)); -} - -bool JfrThreadGroupsHelper::has_next() const { - return _current_iterator_pos > invalid_iterator_pos; -} - -bool JfrThreadGroupsHelper::is_valid() const { - return (_thread_group_hierarchy != nullptr && _thread_group_hierarchy->length() > 0); -} - -JfrThreadGroupPointers& JfrThreadGroupsHelper::next() { - assert(is_valid(), "invariant"); - return at(_current_iterator_pos--); -} - -/* - * If not at a safepoint, we create global weak references for - * all reachable threadgroups for this thread. - * If we are at a safepoint, the caller is the VMThread during - * JFR checkpointing. It can use naked oops, because nothing - * will move before the list of threadgroups is cleared and - * mutator threads restarted. The threadgroup list is cleared - * later by the VMThread as one of the final steps in JFR checkpointing - * (not here). - */ -int JfrThreadGroupsHelper::populate_thread_group_hierarchy(const JavaThread* jt, Thread* current) { - assert(jt != nullptr && jt->is_Java_thread(), "invariant"); - assert(current != nullptr, "invariant"); - assert(_thread_group_hierarchy != nullptr, "invariant"); - - oop thread_oop = jt->threadObj(); - if (thread_oop == nullptr) { - return 0; - } - // immediate thread group - Handle thread_group_handle(current, java_lang_Thread::threadGroup(thread_oop)); - if (thread_group_handle == nullptr) { - return 0; - } - - const bool use_weak_handles = !SafepointSynchronize::is_at_safepoint(); - jweak thread_group_weak_ref = use_weak_handles ? JNIHandles::make_weak_global(thread_group_handle) : nullptr; - - JfrThreadGroupPointers* thread_group_pointers = new JfrThreadGroupPointers(thread_group_handle, thread_group_weak_ref); - _thread_group_hierarchy->append(thread_group_pointers); - // immediate parent thread group - oop parent_thread_group_obj = java_lang_ThreadGroup::parent(thread_group_handle()); - Handle parent_thread_group_handle(current, parent_thread_group_obj); - - // and check parents parents... - while (parent_thread_group_handle != nullptr) { - const jweak parent_group_weak_ref = use_weak_handles ? JNIHandles::make_weak_global(parent_thread_group_handle) : nullptr; - thread_group_pointers = new JfrThreadGroupPointers(parent_thread_group_handle, parent_group_weak_ref); - _thread_group_hierarchy->append(thread_group_pointers); - parent_thread_group_obj = java_lang_ThreadGroup::parent(parent_thread_group_handle()); - parent_thread_group_handle = Handle(current, parent_thread_group_obj); - } - return _thread_group_hierarchy->length(); -} - -static traceid next_id() { - static traceid _current_threadgroup_id = 1; // 1 is reserved for thread group "VirtualThreads" - return ++_current_threadgroup_id; -} - -class JfrThreadGroup::JfrThreadGroupEntry : public JfrCHeapObj { - friend class JfrThreadGroup; - private: - traceid _thread_group_id; - traceid _parent_group_id; - char* _thread_group_name; // utf8 format - // If an entry is created during a safepoint, the - // _thread_group_oop contains a direct oop to - // the java.lang.ThreadGroup object. - // If an entry is created on javathread exit time (not at safepoint), - // _thread_group_weak_ref contains a JNI weak global handle - // indirection to the java.lang.ThreadGroup object. - // Note: we cannot use a union here since CHECK_UNHANDLED_OOPS makes oop have - // a ctor which isn't allowed in a union by the SunStudio compiler - oop _thread_group_oop; - jweak _thread_group_weak_ref; - - JfrThreadGroupEntry(const char* tgstr, JfrThreadGroupPointers& ptrs); - ~JfrThreadGroupEntry(); - - traceid thread_group_id() const { return _thread_group_id; } - void set_thread_group_id(traceid tgid) { _thread_group_id = tgid; } - - const char* thread_group_name() const { return _thread_group_name; } - void set_thread_group_name(const char* tgname); - - traceid parent_group_id() const { return _parent_group_id; } - void set_parent_group_id(traceid pgid) { _parent_group_id = pgid; } - - void set_thread_group(JfrThreadGroupPointers& ptrs); - bool is_equal(const JfrThreadGroupPointers& ptrs) const; - oop thread_group() const; -}; - -JfrThreadGroup::JfrThreadGroupEntry::JfrThreadGroupEntry(const char* tgname, JfrThreadGroupPointers& ptrs) : - _thread_group_id(0), - _parent_group_id(0), - _thread_group_name(nullptr), - _thread_group_oop(nullptr), - _thread_group_weak_ref(nullptr) { - set_thread_group_name(tgname); - set_thread_group(ptrs); -} - -JfrThreadGroup::JfrThreadGroupEntry::~JfrThreadGroupEntry() { - if (_thread_group_name != nullptr) { - JfrCHeapObj::free(_thread_group_name, strlen(_thread_group_name) + 1); - } - if (_thread_group_weak_ref != nullptr) { - JNIHandles::destroy_weak_global(_thread_group_weak_ref); - } -} - -void JfrThreadGroup::JfrThreadGroupEntry::set_thread_group_name(const char* tgname) { - assert(_thread_group_name == nullptr, "invariant"); - if (tgname != nullptr) { - size_t len = strlen(tgname); - _thread_group_name = JfrCHeapObj::new_array(len + 1); - strncpy(_thread_group_name, tgname, len + 1); - } -} - -oop JfrThreadGroup::JfrThreadGroupEntry::thread_group() const { - return _thread_group_weak_ref != nullptr ? JNIHandles::resolve(_thread_group_weak_ref) : _thread_group_oop; -} - -void JfrThreadGroup::JfrThreadGroupEntry::set_thread_group(JfrThreadGroupPointers& ptrs) { - _thread_group_weak_ref = ptrs.transfer_weak_global_handle_ownership(); - if (_thread_group_weak_ref == nullptr) { - _thread_group_oop = ptrs.thread_group_oop(); - assert(_thread_group_oop != nullptr, "invariant"); - } else { - _thread_group_oop = nullptr; - } -} - -JfrThreadGroup::JfrThreadGroup() : - _list(new (mtTracing) GrowableArray(initial_array_size, mtTracing)) {} - -JfrThreadGroup::~JfrThreadGroup() { - if (_list != nullptr) { - for (int i = 0; i < _list->length(); i++) { - JfrThreadGroupEntry* e = _list->at(i); - delete e; - } - delete _list; - } -} - -JfrThreadGroup* JfrThreadGroup::instance() { - return _instance; -} - -void JfrThreadGroup::set_instance(JfrThreadGroup* new_instance) { - _instance = new_instance; -} - -traceid JfrThreadGroup::thread_group_id(const JavaThread* jt, Thread* current) { - HandleMark hm(current); - JfrThreadGroupsHelper helper(jt, current); - return helper.is_valid() ? thread_group_id_internal(helper) : 0; -} - -traceid JfrThreadGroup::thread_group_id(JavaThread* const jt) { - return thread_group_id(jt, jt); -} - -traceid JfrThreadGroup::thread_group_id_internal(JfrThreadGroupsHelper& helper) { - ThreadGroupExclusiveAccess lock; - JfrThreadGroup* tg_instance = instance(); - if (tg_instance == nullptr) { - tg_instance = new JfrThreadGroup(); - if (tg_instance == nullptr) { - return 0; - } - set_instance(tg_instance); - } - - JfrThreadGroupEntry* tge = nullptr; - traceid parent_thread_group_id = 0; - while (helper.has_next()) { - JfrThreadGroupPointers& ptrs = helper.next(); - tge = tg_instance->find_entry(ptrs); - if (nullptr == tge) { - tge = tg_instance->new_entry(ptrs); - assert(tge != nullptr, "invariant"); - tge->set_parent_group_id(parent_thread_group_id); - } - parent_thread_group_id = tge->thread_group_id(); - } - // the last entry in the hierarchy is the immediate thread group - return tge->thread_group_id(); -} - -bool JfrThreadGroup::JfrThreadGroupEntry::is_equal(const JfrThreadGroupPointers& ptrs) const { - return ptrs.thread_group_oop() == thread_group(); -} - -JfrThreadGroup::JfrThreadGroupEntry* -JfrThreadGroup::find_entry(const JfrThreadGroupPointers& ptrs) const { - for (int index = 0; index < _list->length(); ++index) { - JfrThreadGroupEntry* curtge = _list->at(index); - if (curtge->is_equal(ptrs)) { - return curtge; - } - } - return (JfrThreadGroupEntry*) nullptr; -} - -// Assumes you already searched for the existence -// of a corresponding entry in find_entry(). -JfrThreadGroup::JfrThreadGroupEntry* -JfrThreadGroup::new_entry(JfrThreadGroupPointers& ptrs) { - JfrThreadGroupEntry* const tge = new JfrThreadGroupEntry(java_lang_ThreadGroup::name(ptrs.thread_group_oop()), ptrs); - add_entry(tge); - return tge; -} - -int JfrThreadGroup::add_entry(JfrThreadGroupEntry* tge) { - assert(tge != nullptr, "attempting to add a null entry!"); - assert(0 == tge->thread_group_id(), "id must be unassigned!"); - tge->set_thread_group_id(next_id()); - return _list->append(tge); -} - -void JfrThreadGroup::write_thread_group_entries(JfrCheckpointWriter& writer) const { - assert(_list != nullptr && !_list->is_empty(), "should not need be here!"); - const int number_of_tg_entries = _list->length(); - writer.write_count(number_of_tg_entries + 1); // + VirtualThread group - writer.write_key(1); // 1 is reserved for VirtualThread group - writer.write(0); // parent - const oop vgroup = java_lang_Thread_Constants::get_VTHREAD_GROUP(); - assert(vgroup != (oop)nullptr, "invariant"); - const char* const vgroup_name = java_lang_ThreadGroup::name(vgroup); - assert(vgroup_name != nullptr, "invariant"); - writer.write(vgroup_name); - for (int index = 0; index < number_of_tg_entries; ++index) { - const JfrThreadGroupEntry* const curtge = _list->at(index); - writer.write_key(curtge->thread_group_id()); - writer.write(curtge->parent_group_id()); - writer.write(curtge->thread_group_name()); - } -} - -void JfrThreadGroup::write_selective_thread_group(JfrCheckpointWriter* writer, traceid thread_group_id) const { - assert(writer != nullptr, "invariant"); - assert(_list != nullptr && !_list->is_empty(), "should not need be here!"); - assert(thread_group_id != 1, "should not need be here!"); - const int number_of_tg_entries = _list->length(); - - // save context - const JfrCheckpointContext ctx = writer->context(); - writer->write_type(TYPE_THREADGROUP); - const jlong count_offset = writer->reserve(sizeof(u4)); // Don't know how many yet - int number_of_entries_written = 0; - for (int index = number_of_tg_entries - 1; index >= 0; --index) { - const JfrThreadGroupEntry* const curtge = _list->at(index); - if (thread_group_id == curtge->thread_group_id()) { - writer->write_key(curtge->thread_group_id()); - writer->write(curtge->parent_group_id()); - writer->write(curtge->thread_group_name()); - ++number_of_entries_written; - thread_group_id = curtge->parent_group_id(); - } - } - if (number_of_entries_written == 0) { - // nothing to write, restore context - writer->set_context(ctx); - return; - } - assert(number_of_entries_written > 0, "invariant"); - writer->write_count(number_of_entries_written, count_offset); -} - -// Write out JfrThreadGroup instance and then delete it -void JfrThreadGroup::serialize(JfrCheckpointWriter& writer) { - ThreadGroupExclusiveAccess lock; - JfrThreadGroup* tg_instance = instance(); - assert(tg_instance != nullptr, "invariant"); - tg_instance->write_thread_group_entries(writer); -} - -// for writing a particular thread group -void JfrThreadGroup::serialize(JfrCheckpointWriter* writer, traceid thread_group_id) { - assert(writer != nullptr, "invariant"); - ThreadGroupExclusiveAccess lock; - JfrThreadGroup* const tg_instance = instance(); - assert(tg_instance != nullptr, "invariant"); - tg_instance->write_selective_thread_group(writer, thread_group_id); -} diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroup.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroup.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroup.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroup.hpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2016, 2019, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#ifndef SHARE_JFR_RECORDER_CHECKPOINT_TYPES_JFRTHREADGROUP_HPP -#define SHARE_JFR_RECORDER_CHECKPOINT_TYPES_JFRTHREADGROUP_HPP - -#include "jfr/utilities/jfrAllocation.hpp" -#include "jfr/utilities/jfrTypes.hpp" -#include "jni.h" - -class JfrCheckpointWriter; -template -class GrowableArray; -class JfrThreadGroupsHelper; -class JfrThreadGroupPointers; - -class JfrThreadGroup : public JfrCHeapObj { - friend class JfrCheckpointThreadClosure; - private: - static JfrThreadGroup* _instance; - class JfrThreadGroupEntry; - GrowableArray* _list; - - JfrThreadGroup(); - JfrThreadGroupEntry* find_entry(const JfrThreadGroupPointers& ptrs) const; - JfrThreadGroupEntry* new_entry(JfrThreadGroupPointers& ptrs); - int add_entry(JfrThreadGroupEntry* const tge); - - void write_thread_group_entries(JfrCheckpointWriter& writer) const; - void write_selective_thread_group(JfrCheckpointWriter* writer, traceid thread_group_id) const; - - static traceid thread_group_id_internal(JfrThreadGroupsHelper& helper); - static JfrThreadGroup* instance(); - static void set_instance(JfrThreadGroup* new_instance); - - public: - ~JfrThreadGroup(); - static void serialize(JfrCheckpointWriter& w); - static void serialize(JfrCheckpointWriter* w, traceid thread_group_id); - static traceid thread_group_id(JavaThread* thread); - static traceid thread_group_id(const JavaThread* thread, Thread* current); -}; - -#endif // SHARE_JFR_RECORDER_CHECKPOINT_TYPES_JFRTHREADGROUP_HPP diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroupManager.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroupManager.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroupManager.cpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroupManager.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -0,0 +1,331 @@ +/* + * Copyright (c) 2016, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#include "jfr/jni/jfrJavaSupport.hpp" +#include "jfr/recorder/checkpoint/jfrCheckpointWriter.hpp" +#include "jfr/recorder/checkpoint/types/jfrThreadGroupManager.hpp" +#include "jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp" +#include "jfr/utilities/jfrAllocation.hpp" +#include "jfr/utilities/jfrLinkedList.inline.hpp" +#include "memory/resourceArea.hpp" +#include "runtime/handles.inline.hpp" +#include "runtime/jniHandles.inline.hpp" +#include "runtime/safepoint.hpp" +#include "runtime/semaphore.hpp" +#include "runtime/thread.inline.hpp" +#include "utilities/growableArray.hpp" + +class ThreadGroupExclusiveAccess : public StackObj { + private: + static Semaphore _mutex_semaphore; + public: + ThreadGroupExclusiveAccess() { _mutex_semaphore.wait(); } + ~ThreadGroupExclusiveAccess() { _mutex_semaphore.signal(); } +}; + +Semaphore ThreadGroupExclusiveAccess::_mutex_semaphore(1); + +static traceid next_id() { + static traceid _tgid = 1; // 1 is reserved for thread group "VirtualThreads" + return ++_tgid; +} + +class JfrThreadGroup : public JfrCHeapObj { + template + friend class JfrLinkedList; + private: + mutable const JfrThreadGroup* _next; + const JfrThreadGroup* _parent; + traceid _tgid; + char* _tg_name; // utf8 format + jweak _tg_handle; + mutable u2 _generation; + + public: + JfrThreadGroup(Handle tg, const JfrThreadGroup* parent) : + _next(nullptr), _parent(parent), _tgid(next_id()), _tg_name(nullptr), + _tg_handle(JNIHandles::make_weak_global(tg)), _generation(0) { + const char* name = java_lang_ThreadGroup::name(tg()); + if (name != nullptr) { + const size_t len = strlen(name); + _tg_name = JfrCHeapObj::new_array(len + 1); + strncpy(_tg_name, name, len + 1); + } + } + + ~JfrThreadGroup() { + JNIHandles::destroy_weak_global(_tg_handle); + if (_tg_name != nullptr) { + JfrCHeapObj::free(_tg_name, strlen(_tg_name) + 1); + } + } + + const JfrThreadGroup* next() const { return _next; } + + traceid id() const { return _tgid; } + + const char* name() const { + return _tg_name; + } + + const JfrThreadGroup* parent() const { return _parent; } + + traceid parent_id() const { + return _parent != nullptr ? _parent->id() : 0; + } + + bool is_dead() const { + return JNIHandles::resolve(_tg_handle) == nullptr; + } + + bool operator==(oop tg) const { + assert(tg != nullptr, "invariant"); + return tg == JNIHandles::resolve(_tg_handle); + } + + bool should_write() const { + return !JfrTraceIdEpoch::is_current_epoch_generation(_generation); + } + + void set_written() const { + assert(should_write(), "invariant"); + _generation = JfrTraceIdEpoch::epoch_generation(); + } +}; + +typedef JfrLinkedList JfrThreadGroupList; + +static JfrThreadGroupList* _list = nullptr; + +static JfrThreadGroupList& list() { + assert(_list != nullptr, "invariant"); + return *_list; +} + +bool JfrThreadGroupManager::create() { + assert(_list == nullptr, "invariant"); + _list = new JfrThreadGroupList(); + return _list != nullptr; +} + +void JfrThreadGroupManager::destroy() { + delete _list; + _list = nullptr; +} + +static int populate(GrowableArray* hierarchy, const JavaThread* jt, Thread* current) { + assert(hierarchy != nullptr, "invariant"); + assert(jt != nullptr, "invariant"); + assert(current == Thread::current(), "invariant"); + + oop thread_oop = jt->threadObj(); + if (thread_oop == nullptr) { + return 0; + } + // Immediate thread group. + const Handle tg_handle(current, java_lang_Thread::threadGroup(thread_oop)); + if (tg_handle.is_null()) { + return 0; + } + hierarchy->append(tg_handle); + + // Thread group parent and then its parents... + Handle parent_tg_handle(current, java_lang_ThreadGroup::parent(tg_handle())); + + while (parent_tg_handle != nullptr) { + hierarchy->append(parent_tg_handle); + parent_tg_handle = Handle(current, java_lang_ThreadGroup::parent(parent_tg_handle())); + } + + return hierarchy->length(); +} + +class JfrThreadGroupLookup : public ResourceObj { + static const int invalid_iterator = -1; + private: + GrowableArray* _hierarchy; + mutable int _iterator; + + public: + JfrThreadGroupLookup(const JavaThread* jt, Thread* current) : + _hierarchy(new GrowableArray(16)), + _iterator(populate(_hierarchy, jt, current) - 1) {} + + bool has_next() const { + return _iterator > invalid_iterator; + } + + const Handle& next() const { + assert(has_next(), "invariant"); + return _hierarchy->at(_iterator--); + } +}; + +static const JfrThreadGroup* find_or_add(const Handle& tg_oop, const JfrThreadGroup* parent) { + assert(parent == nullptr || list().in_list(parent), "invariant"); + const JfrThreadGroup* tg = list().head(); + const JfrThreadGroup* result = nullptr; + while (tg != nullptr) { + if (*tg == tg_oop()) { + assert(tg->parent() == parent, "invariant"); + result = tg; + tg = nullptr; + continue; + } + tg = tg->next(); + } + if (result == nullptr) { + result = new JfrThreadGroup(tg_oop, parent); + list().add(result); + } + return result; +} + +static traceid find_tgid(const JfrThreadGroupLookup& lookup) { + const JfrThreadGroup* tg = nullptr; + const JfrThreadGroup* ptg = nullptr; + while (lookup.has_next()) { + tg = find_or_add(lookup.next(), ptg); + ptg = tg; + } + return tg != nullptr ? tg->id() : 0; +} + +static traceid find(const JfrThreadGroupLookup& lookup) { + ThreadGroupExclusiveAccess lock; + return find_tgid(lookup); +} + +traceid JfrThreadGroupManager::thread_group_id(JavaThread* jt) { + DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_vm(jt);) + ResourceMark rm(jt); + HandleMark hm(jt); + const JfrThreadGroupLookup lookup(jt, jt); + return find(lookup); +} + +traceid JfrThreadGroupManager::thread_group_id(const JavaThread* jt, Thread* current) { + assert(jt != nullptr, "invariant"); + assert(current != nullptr, "invariant"); + assert(!current->is_Java_thread() || JavaThread::cast(current)->thread_state() == _thread_in_vm, "invariant"); + ResourceMark rm(current); + HandleMark hm(current); + const JfrThreadGroupLookup lookup(jt, current); + return find(lookup); +} + +static void write_virtual_thread_group(JfrCheckpointWriter& writer) { + writer.write_key(1); // 1 is reserved for VirtualThread group + writer.write(0); // parent + const oop vgroup = java_lang_Thread_Constants::get_VTHREAD_GROUP(); + assert(vgroup != (oop)nullptr, "invariant"); + const char* const vgroup_name = java_lang_ThreadGroup::name(vgroup); + assert(vgroup_name != nullptr, "invariant"); + writer.write(vgroup_name); +} + +static int write_thread_group(JfrCheckpointWriter& writer, const JfrThreadGroup* tg, bool to_blob = false) { + assert(tg != nullptr, "invariant"); + if (tg->should_write() || to_blob) { + writer.write_key(tg->id()); + writer.write(tg->parent_id()); + writer.write(tg->name()); + if (!to_blob) { + tg->set_written(); + } + return 1; + } + return 0; +} + +// For writing all live thread groups while removing and deleting dead thread groups. +void JfrThreadGroupManager::serialize(JfrCheckpointWriter& writer) { + DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_vm(JavaThread::current());) + + const uint64_t count_offset = writer.reserve(sizeof(u4)); // Don't know how many yet + + // First write the pre-defined ThreadGroup for virtual threads. + write_virtual_thread_group(writer); + int number_of_groups_written = 1; + + const JfrThreadGroup* next = nullptr; + const JfrThreadGroup* prev = nullptr; + + { + ThreadGroupExclusiveAccess lock; + const JfrThreadGroup* tg = list().head(); + while (tg != nullptr) { + next = tg->next(); + if (tg->is_dead()) { + prev = list().excise(prev, tg); + assert(!list().in_list(tg), "invariant"); + delete tg; + tg = next; + continue; + } + number_of_groups_written += write_thread_group(writer, tg); + prev = tg; + tg = next; + } + } + + assert(number_of_groups_written > 0, "invariant"); + writer.write_count(number_of_groups_written, count_offset); +} + +// For writing a specific thread group and its ancestry. +void JfrThreadGroupManager::serialize(JfrCheckpointWriter& writer, traceid tgid, bool to_blob) { + DEBUG_ONLY(JfrJavaSupport::check_java_thread_in_vm(JavaThread::current());) + // save context + const JfrCheckpointContext ctx = writer.context(); + + writer.write_type(TYPE_THREADGROUP); + const uint64_t count_offset = writer.reserve(sizeof(u4)); // Don't know how many yet + + int number_of_groups_written = 0; + + { + ThreadGroupExclusiveAccess lock; + const JfrThreadGroup* tg = list().head(); + while (tg != nullptr) { + if (tgid == tg->id()) { + while (tg != nullptr) { + number_of_groups_written += write_thread_group(writer, tg, to_blob); + tg = tg->parent(); + } + break; + } + tg = tg->next(); + } + } + + if (number_of_groups_written == 0) { + // nothing to write, restore context + writer.set_context(ctx); + return; + } + + assert(number_of_groups_written > 0, "invariant"); + writer.write_count(number_of_groups_written, count_offset); +} diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroupManager.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroupManager.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroupManager.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrThreadGroupManager.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2016, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +#ifndef SHARE_JFR_RECORDER_CHECKPOINT_TYPES_JFRTHREADGROUPMANAGER_HPP +#define SHARE_JFR_RECORDER_CHECKPOINT_TYPES_JFRTHREADGROUPMANAGER_HPP + +#include "jfr/utilities/jfrTypes.hpp" +#include "memory/allStatic.hpp" + +class JfrCheckpointWriter; + +class JfrThreadGroupManager : public AllStatic { + friend class JfrRecorder; + + private: + static bool create(); + static void destroy(); + + public: + static void serialize(JfrCheckpointWriter& w); + static void serialize(JfrCheckpointWriter& w, traceid tgid, bool is_blob); + + static traceid thread_group_id(JavaThread* thread); + static traceid thread_group_id(const JavaThread* thread, Thread* current); +}; + +#endif // SHARE_JFR_RECORDER_CHECKPOINT_TYPES_JFRTHREADGROUPMANAGER_HPP diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -32,7 +32,7 @@ #include "gc/shared/gcWhen.hpp" #include "jfr/leakprofiler/leakProfiler.hpp" #include "jfr/recorder/checkpoint/jfrCheckpointWriter.hpp" -#include "jfr/recorder/checkpoint/types/jfrThreadGroup.hpp" +#include "jfr/recorder/checkpoint/types/jfrThreadGroupManager.hpp" #include "jfr/recorder/checkpoint/types/jfrThreadState.hpp" #include "jfr/recorder/checkpoint/types/jfrType.hpp" #include "jfr/recorder/jfrRecorder.hpp" @@ -106,7 +106,7 @@ } else { _writer.write(name); _writer.write(tid); - _writer.write(JfrThreadGroup::thread_group_id(JavaThread::cast(t), _curthread)); + _writer.write(JfrThreadGroupManager::thread_group_id(JavaThread::cast(t), _curthread)); } _writer.write(false); // isVirtual } @@ -115,7 +115,10 @@ JfrCheckpointThreadClosure tc(writer); JfrJavaThreadIterator javathreads; while (javathreads.has_next()) { - tc.do_thread(javathreads.next()); + JavaThread* const jt = javathreads.next(); + if (jt->jfr_thread_local()->should_write()) { + tc.do_thread(jt); + } } JfrNonJavaThreadIterator nonjavathreads; while (nonjavathreads.has_next()) { @@ -124,7 +127,7 @@ } void JfrThreadGroupConstant::serialize(JfrCheckpointWriter& writer) { - JfrThreadGroup::serialize(writer); + JfrThreadGroupManager::serialize(writer); } static const char* flag_value_origin_to_string(JVMFlagOrigin origin) { @@ -303,11 +306,11 @@ writer.write(JfrThreadId::jfr_id(_thread, _tid)); // java thread group - VirtualThread threadgroup reserved id 1 const traceid thread_group_id = is_vthread ? 1 : - JfrThreadGroup::thread_group_id(JavaThread::cast(_thread), Thread::current()); + JfrThreadGroupManager::thread_group_id(JavaThread::cast(_thread), Thread::current()); writer.write(thread_group_id); writer.write(is_vthread); // isVirtual - if (!is_vthread) { - JfrThreadGroup::serialize(&writer, thread_group_id); + if (thread_group_id > 1) { + JfrThreadGroupManager::serialize(writer, thread_group_id, _to_blob); } // VirtualThread threadgroup already serialized invariant. } diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrType.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -109,11 +109,12 @@ oop _vthread; const char* _name; int _length; + const bool _to_blob; void write_name(JfrCheckpointWriter& writer); void write_os_name(JfrCheckpointWriter& writer, bool is_vthread); public: - JfrThreadConstant(Thread* t, traceid tid, oop vthread = nullptr) : - _thread(t), _tid(tid), _vthread(vthread), _name(nullptr), _length(-1) {} + JfrThreadConstant(Thread* t, traceid tid, bool to_blob, oop vthread = nullptr) : + _thread(t), _tid(tid), _vthread(vthread), _name(nullptr), _length(-1), _to_blob(to_blob) {} void serialize(JfrCheckpointWriter& writer); }; diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeManager.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeManager.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeManager.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeManager.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -109,7 +109,7 @@ // TYPE_THREAD and count is written unconditionally for blobs, also for vthreads. writer.write_type(TYPE_THREAD); writer.write_count(1); - JfrThreadConstant type_thread(jt, tid, vthread); + JfrThreadConstant type_thread(jt, tid, true, vthread); type_thread.serialize(writer); return writer.move(); } @@ -128,7 +128,7 @@ writer.write_type(TYPE_THREAD); writer.write_count(1); } - JfrThreadConstant type_thread(t, tid, vthread); + JfrThreadConstant type_thread(t, tid, false, vthread); type_thread.serialize(writer); } diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSet.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -533,8 +533,9 @@ static void do_unloading_klass(Klass* klass) { assert(klass != nullptr, "invariant"); assert(_subsystem_callback != nullptr, "invariant"); - if (klass->is_instance_klass() && InstanceKlass::cast(klass)->is_scratch_class()) { - return; + if (!used(klass) && klass->is_instance_klass() && InstanceKlass::cast(klass)->is_scratch_class()) { + SET_TRANSIENT(klass); + assert(used(klass), "invariant"); } if (JfrKlassUnloading::on_unload(klass)) { if (JfrTraceId::has_sticky_bit(klass)) { diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSetUtils.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSetUtils.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSetUtils.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/jfrTypeSetUtils.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -152,7 +152,7 @@ if (!klass->is_instance_klass()) { return false; } - return _current_epoch ? METHOD_USED_THIS_EPOCH(klass) : METHOD_USED_PREVIOUS_EPOCH(klass); + return _current_epoch ? USED_THIS_EPOCH(klass) : USED_PREVIOUS_EPOCH(klass); } }; diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -30,6 +30,7 @@ #include "memory/allStatic.hpp" class ClassLoaderData; +class InstanceKlass; class Klass; class Method; class ModuleEntry; @@ -86,7 +87,6 @@ // through load barrier static traceid load(const Klass* klass); - static traceid load_previous_epoch(const Klass* klass); static traceid load(jclass jc, bool raw = false); static traceid load(const Method* method); static traceid load(const Klass* klass, const Method* method); @@ -146,10 +146,8 @@ static void set_sticky_bit(const Method* method); static void clear_sticky_bit(const Klass* k); static void clear_sticky_bit(const Method* method); - static bool has_timing_bit(const Klass* k); - static void set_timing_bit(const Klass* k); - static void clear_timing_bit(const Klass* k); - + static bool has_timing_bit(const InstanceKlass* scratch_klass); + static void set_timing_bit(const InstanceKlass* scratch_klass); }; #endif // SHARE_JFR_RECORDER_CHECKPOINT_TYPES_TRACEID_JFRTRACEID_HPP diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -32,6 +32,7 @@ #include "jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp" #include "jfr/recorder/checkpoint/types/traceid/jfrTraceIdMacros.hpp" #include "jfr/support/jfrKlassExtension.hpp" +#include "oops/instanceKlass.hpp" #include "oops/klass.hpp" #include "runtime/javaThread.inline.hpp" #include "runtime/mutexLocker.hpp" @@ -81,10 +82,6 @@ return JfrTraceIdLoadBarrier::load_leakp_previous_epoch(klass, method); } -inline traceid JfrTraceId::load_previous_epoch(const Klass* klass) { - return JfrTraceIdLoadBarrier::load_previous_epoch(klass); -} - template inline traceid raw_load(const T* t) { assert(t != nullptr, "invariant"); @@ -198,6 +195,7 @@ assert(method != nullptr, "invariant"); assert_locked_or_safepoint(ClassLoaderDataGraph_lock); assert(!has_sticky_bit(method), "invariant"); + assert(!method->is_old(), "invariant"); SET_METHOD_STICKY_BIT(method); assert(has_sticky_bit(method), "invariant"); } @@ -205,30 +203,22 @@ inline void JfrTraceId::clear_sticky_bit(const Method* method) { assert(method != nullptr, "invarriant"); assert_locked_or_safepoint(ClassLoaderDataGraph_lock); + assert(!method->is_old(), "invariant"); assert(JfrTraceId::has_sticky_bit(method), "invariant"); CLEAR_STICKY_BIT_METHOD(method); assert(!JfrTraceId::has_sticky_bit(method), "invariant"); } -inline bool JfrTraceId::has_timing_bit(const Klass* k) { - assert(k != nullptr, "invariant"); - return HAS_TIMING_BIT(k); +inline bool JfrTraceId::has_timing_bit(const InstanceKlass* scratch_klass) { + assert(scratch_klass != nullptr, "invariant"); + return HAS_TIMING_BIT(scratch_klass); } -inline void JfrTraceId::set_timing_bit(const Klass* k) { - assert(k != nullptr, "invariant"); - assert_locked_or_safepoint(ClassLoaderDataGraph_lock); - assert(!has_timing_bit(k), "invariant"); - SET_TIMING_BIT(k); - assert(has_timing_bit(k), "invariant"); -} - -inline void JfrTraceId::clear_timing_bit(const Klass* k) { - assert(k != nullptr, "invarriant"); - assert_locked_or_safepoint(ClassLoaderDataGraph_lock); - assert(JfrTraceId::has_timing_bit(k), "invariant"); - CLEAR_TIMING_BIT(k); - assert(!JfrTraceId::has_timing_bit(k), "invariant"); +inline void JfrTraceId::set_timing_bit(const InstanceKlass* scratch_klass) { + assert(scratch_klass != nullptr, "invariant"); + assert(!has_timing_bit(scratch_klass), "invariant"); + SET_TIMING_BIT(scratch_klass); + assert(has_timing_bit(scratch_klass), "invariant"); } #endif // SHARE_JFR_RECORDER_CHECKPOINT_TYPES_TRACEID_JFRTRACEID_INLINE_HPP diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdBits.inline.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 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 @@ -78,7 +78,7 @@ template <> inline uint8_t* traceid_meta_byte(const Method* ptr) { assert(ptr != nullptr, "invariant"); - return ptr->trace_meta_addr(); + return ptr->trace_flags_meta_addr(); } inline uint8_t traceid_and(uint8_t bits, uint8_t current) { diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdLoadBarrier.inline.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdLoadBarrier.inline.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdLoadBarrier.inline.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdLoadBarrier.inline.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -86,6 +86,27 @@ return TRACE_ID(klass); } +inline const Method* latest_version(const Klass* klass, const Method* method) { + assert(klass != nullptr, "invariant"); + assert(method != nullptr, "invariant"); + assert(klass == method->method_holder(), "invariant"); + assert(method->is_old(), "invariant"); + const InstanceKlass* const ik = InstanceKlass::cast(klass); + assert(ik->has_been_redefined(), "invariant"); + const Method* const latest_version = ik->method_with_orig_idnum(method->orig_method_idnum()); + if (latest_version == nullptr) { + assert(AllowRedefinitionToAddDeleteMethods, "invariant"); + // method has been removed. Return old version. + return method; + } + assert(latest_version != nullptr, "invariant"); + assert(latest_version != method, "invariant"); + assert(!latest_version->is_old(), "invariant"); + assert(latest_version->orig_method_idnum() == method->orig_method_idnum(), "invariant"); + assert(latest_version->name() == method->name() && latest_version->signature() == method->signature(), "invariant"); + return latest_version; +} + inline traceid JfrTraceIdLoadBarrier::load(const Method* method) { return load(method->method_holder(), method); } @@ -93,6 +114,9 @@ inline traceid JfrTraceIdLoadBarrier::load(const Klass* klass, const Method* method) { assert(klass != nullptr, "invariant"); assert(method != nullptr, "invariant"); + if (method->is_old()) { + method = latest_version(klass, method); + } if (should_tag(method)) { SET_METHOD_AND_CLASS_USED_THIS_EPOCH(klass); SET_METHOD_FLAG_USED_THIS_EPOCH(method); @@ -111,6 +135,9 @@ inline traceid JfrTraceIdLoadBarrier::load_no_enqueue(const Klass* klass, const Method* method) { assert(klass != nullptr, "invariant"); assert(method != nullptr, "invariant"); + if (method->is_old()) { + method = latest_version(klass, method); + } SET_METHOD_AND_CLASS_USED_THIS_EPOCH(klass); SET_METHOD_FLAG_USED_THIS_EPOCH(method); assert(METHOD_AND_CLASS_USED_THIS_EPOCH(klass), "invariant"); @@ -123,11 +150,12 @@ if (cld->has_class_mirror_holder()) { return 0; } + const traceid id = set_used_and_get(cld); const Klass* const class_loader_klass = cld->class_loader_klass(); if (class_loader_klass != nullptr) { load(class_loader_klass); } - return set_used_and_get(cld); + return id; } inline traceid JfrTraceIdLoadBarrier::load(const ModuleEntry* module) { @@ -158,6 +186,7 @@ inline traceid JfrTraceIdLoadBarrier::load_leakp(const Klass* klass, const Method* method) { assert(klass != nullptr, "invariant"); assert(method != nullptr, "invariant"); + assert(!method->is_old(), "invariant"); assert(klass == method->method_holder(), "invariant"); assert(METHOD_AND_CLASS_USED_THIS_EPOCH(klass), "invariant"); if (should_tag(method)) { @@ -175,6 +204,7 @@ inline traceid JfrTraceIdLoadBarrier::load_leakp_previous_epoch(const Klass* klass, const Method* method) { assert(klass != nullptr, "invariant"); assert(method != nullptr, "invariant"); + assert(!method->is_old(), "invariant"); assert(klass == method->method_holder(), "invariant"); assert(METHOD_AND_CLASS_USED_PREVIOUS_EPOCH(klass), "invariant"); if (METHOD_FLAG_NOT_USED_PREVIOUS_EPOCH(method)) { diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/jfrRecorder.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/jfrRecorder.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/jfrRecorder.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/jfrRecorder.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -33,6 +33,7 @@ #include "jfr/periodic/sampling/jfrThreadSampler.hpp" #include "jfr/recorder/jfrRecorder.hpp" #include "jfr/recorder/checkpoint/jfrCheckpointManager.hpp" +#include "jfr/recorder/checkpoint/types/jfrThreadGroupManager.hpp" #include "jfr/recorder/repository/jfrRepository.hpp" #include "jfr/recorder/service/jfrEventThrottler.hpp" #include "jfr/recorder/service/jfrOptionSet.hpp" @@ -311,6 +312,9 @@ if (!create_event_throttler()) { return false; } + if (!create_thread_group_manager()) { + return false; + } return true; } @@ -405,6 +409,10 @@ return JfrEventThrottler::create(); } +bool JfrRecorder::create_thread_group_manager() { + return JfrThreadGroupManager::create(); +} + void JfrRecorder::destroy_components() { JfrJvmtiAgent::destroy(); if (_post_box != nullptr) { @@ -444,6 +452,7 @@ _cpu_time_thread_sampling = nullptr; } JfrEventThrottler::destroy(); + JfrThreadGroupManager::destroy(); } bool JfrRecorder::create_recorder_thread() { diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/jfrRecorder.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/jfrRecorder.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/jfrRecorder.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/jfrRecorder.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -53,6 +53,7 @@ static bool create_stacktrace_repository(); static bool create_storage(); static bool create_stringpool(); + static bool create_thread_group_manager(); static bool create_thread_sampler(); static bool create_cpu_time_thread_sampling(); static bool create_event_throttler(); diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -645,7 +645,7 @@ size_t JfrRecorderService::flush() { size_t total_elements = flush_metadata(_chunkwriter); - total_elements = flush_storage(_storage, _chunkwriter); + total_elements += flush_storage(_storage, _chunkwriter); if (_string_pool.is_modified()) { total_elements += flush_stringpool(_string_pool, _chunkwriter); } diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/stacktrace/jfrStackTraceRepository.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/stacktrace/jfrStackTraceRepository.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/recorder/stacktrace/jfrStackTraceRepository.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/stacktrace/jfrStackTraceRepository.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -29,6 +29,7 @@ #include "jfr/recorder/stacktrace/jfrStackTraceRepository.hpp" #include "jfr/support/jfrThreadLocal.hpp" #include "runtime/mutexLocker.hpp" +#include "runtime/safepoint.hpp" /* * There are two separate repository instances. @@ -186,6 +187,7 @@ } traceid JfrStackTraceRepository::add_trace(const JfrStackTrace& stacktrace) { + assert(!SafepointSynchronize::is_at_safepoint(), "invariant"); MutexLocker lock(JfrStacktrace_lock, Mutex::_no_safepoint_check_flag); assert(stacktrace.number_of_frames() > 0, "invariant"); const size_t index = stacktrace._hash % TABLE_SIZE; diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/support/jfrDeprecationManager.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/jfrDeprecationManager.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/support/jfrDeprecationManager.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/jfrDeprecationManager.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -390,15 +390,16 @@ _resolved_list.iterate(scw); } -// First, we consolidate all stack trace blobs into a single TYPE_STACKTRACE checkpoint -// and serialize it to the chunk. Then, all events are serialized, and unique type set blobs -// written into the JfrCheckpoint system to be serialized to the chunk upon return. +// First, all events are serialized, and unique type set blobs are written into the +// JfrCheckpoint system to be serialized to the chunk upon return. +// Then, we consolidate all stack trace blobs into a single TYPE_STACKTRACE checkpoint +// and serialize it directly to the chunk. void JfrDeprecationManager::write_edges(JfrChunkWriter& cw, Thread* thread, bool on_error /* false */) { if (_resolved_list.is_nonempty() && JfrEventSetting::is_enabled(JfrDeprecatedInvocationEvent)) { + write_events(cw, thread, on_error); if (has_stacktrace()) { write_stacktraces(cw); } - write_events(cw, thread, on_error); } } diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/support/jfrKlassExtension.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/jfrKlassExtension.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/support/jfrKlassExtension.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/jfrKlassExtension.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -40,8 +40,6 @@ #define EVENT_STICKY_BIT 8192 #define IS_EVENT_KLASS(ptr) (((ptr)->trace_id() & (JDK_JFR_EVENT_KLASS | JDK_JFR_EVENT_SUBKLASS)) != 0) #define IS_EVENT_OR_HOST_KLASS(ptr) (((ptr)->trace_id() & (JDK_JFR_EVENT_KLASS | JDK_JFR_EVENT_SUBKLASS | EVENT_HOST_KLASS)) != 0) -#define KLASS_HAS_STICKY_BIT(ptr) (((ptr)->trace_id() & STICKY_BIT) != 0) -#define ON_KLASS_REDEFINITION(k, t) if (KLASS_HAS_STICKY_BIT(k)) Jfr::on_klass_redefinition(k, t) #define ON_KLASS_CREATION(k, p, t) Jfr::on_klass_creation(k, p, t) #endif // SHARE_JFR_SUPPORT_JFRKLASSEXTENSION_HPP diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/support/jfrThreadLocal.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/jfrThreadLocal.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/support/jfrThreadLocal.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/jfrThreadLocal.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -29,6 +29,7 @@ #include "jfr/periodic/sampling/jfrCPUTimeThreadSampler.hpp" #include "jfr/recorder/checkpoint/jfrCheckpointManager.hpp" #include "jfr/recorder/checkpoint/types/traceid/jfrOopTraceId.inline.hpp" +#include "jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp" #include "jfr/recorder/jfrRecorder.hpp" #include "jfr/recorder/service/jfrOptionSet.hpp" #include "jfr/recorder/stacktrace/jfrStackTraceRepository.hpp" @@ -75,6 +76,7 @@ _wallclock_time(os::javaTimeNanos()), _non_reentrant_nesting(0), _vthread_epoch(0), + _generation(0), _vthread_excluded(false), _jvm_thread_excluded(false), _enqueued_requests(false), @@ -136,17 +138,33 @@ } void JfrThreadLocal::on_start(Thread* t) { - assign_thread_id(t, t->jfr_thread_local()); + JfrThreadLocal* const tl = t->jfr_thread_local(); + assert(tl != nullptr, "invariant"); + assign_thread_id(t, tl); if (JfrRecorder::is_recording()) { - JfrCheckpointManager::write_checkpoint(t); - if (t->is_Java_thread()) { - JavaThread *const jt = JavaThread::cast(t); + if (!t->is_Java_thread()) { + JfrCheckpointManager::write_checkpoint(t); + return; + } + JavaThread* const jt = JavaThread::cast(t); + if (jt->thread_state() == _thread_new) { JfrCPUTimeThreadSampling::on_javathread_create(jt); + } else { + assert(jt->thread_state() == _thread_in_vm, "invariant"); + if (tl->should_write()) { + JfrCheckpointManager::write_checkpoint(t); + } send_java_thread_start_event(jt); + if (tl->has_cached_stack_trace()) { + tl->clear_cached_stack_trace(); + } + return; } } - if (t->jfr_thread_local()->has_cached_stack_trace()) { - t->jfr_thread_local()->clear_cached_stack_trace(); + if (t->is_Java_thread() && JavaThread::cast(t)->thread_state() == _thread_in_vm) { + if (tl->has_cached_stack_trace()) { + tl->clear_cached_stack_trace(); + } } } @@ -229,13 +247,18 @@ JfrThreadLocal * const tl = t->jfr_thread_local(); assert(!tl->is_dead(), "invariant"); if (JfrRecorder::is_recording()) { - JfrCheckpointManager::write_checkpoint(t); - } - if (t->is_Java_thread()) { - JavaThread* const jt = JavaThread::cast(t); - send_java_thread_end_event(jt, JfrThreadLocal::jvm_thread_id(jt)); - JfrCPUTimeThreadSampling::on_javathread_terminate(jt); - JfrThreadCPULoadEvent::send_event_for_thread(jt); + if (!t->is_Java_thread()) { + JfrCheckpointManager::write_checkpoint(t); + } else { + JavaThread* const jt = JavaThread::cast(t); + assert(jt->thread_state() == _thread_in_vm, "invariant"); + if (tl->should_write()) { + JfrCheckpointManager::write_checkpoint(t); + } + send_java_thread_end_event(jt, JfrThreadLocal::jvm_thread_id(jt)); + JfrCPUTimeThreadSampling::on_javathread_terminate(jt); + JfrThreadCPULoadEvent::send_event_for_thread(jt); + } } release(tl, Thread::current()); // because it could be that Thread::current() != t } @@ -425,6 +448,15 @@ return Atomic::load(&jt->jfr_thread_local()->_vthread_epoch); } +bool JfrThreadLocal::should_write() const { + const u2 current_generation = JfrTraceIdEpoch::epoch_generation(); + if (Atomic::load(&_generation) != current_generation) { + Atomic::store(&_generation, current_generation); + return true; + } + return false; +} + traceid JfrThreadLocal::thread_id(const Thread* t) { assert(t != nullptr, "invariant"); if (is_impersonating(t)) { diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/support/jfrThreadLocal.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/jfrThreadLocal.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/support/jfrThreadLocal.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/jfrThreadLocal.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -75,6 +75,7 @@ jlong _wallclock_time; int32_t _non_reentrant_nesting; u2 _vthread_epoch; + mutable u2 _generation; bool _vthread_excluded; bool _jvm_thread_excluded; volatile bool _enqueued_requests; @@ -348,6 +349,9 @@ return _sampling_critical_section; } + // Serialization state. + bool should_write() const; + static int32_t make_non_reentrant(Thread* thread); static void make_reentrant(Thread* thread, int32_t previous_nesting); diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/jfrTraceIdExtension.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 2012, 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 @@ -95,11 +95,13 @@ uint8_t* trace_flags_addr() const { \ return _trace_flags.flags_addr(); \ } \ - uint8_t* trace_meta_addr() const { \ + uint8_t* trace_flags_meta_addr() const { \ return _trace_flags.meta_addr(); \ } \ - void copy_trace_flags(uint16_t rhs_flags) const { \ - _trace_flags.set_flags(_trace_flags.flags() | rhs_flags); \ + void copy_trace_flags(const Method* rhm) const { \ + assert(rhm != nullptr, "invariant"); \ + set_trace_flags(rhm->trace_flags()); \ + assert(trace_flags()==rhm->trace_flags(), ""); \ } #endif // SHARE_JFR_SUPPORT_JFRTRACEIDEXTENSION_HPP diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/support/methodtracer/jfrInstrumentedClass.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/methodtracer/jfrInstrumentedClass.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/support/methodtracer/jfrInstrumentedClass.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/methodtracer/jfrInstrumentedClass.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -36,16 +36,16 @@ class JfrInstrumentedClass { private: traceid _trace_id; - const InstanceKlass* _instance_klass; + const InstanceKlass* _ik; bool _unloaded; public: - JfrInstrumentedClass(traceid trace_id = 0, const InstanceKlass* instance_klass = nullptr, bool unloaded = false) : - _trace_id(trace_id), _instance_klass(instance_klass), _unloaded(unloaded) { + JfrInstrumentedClass(traceid trace_id = 0, const InstanceKlass* ik = nullptr, bool unloaded = false) : + _trace_id(trace_id), _ik(ik), _unloaded(unloaded) { } const InstanceKlass* instance_klass() const { - return _instance_klass; + return _ik; } traceid trace_id() const { diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/support/methodtracer/jfrMethodProcessor.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/methodtracer/jfrMethodProcessor.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/support/methodtracer/jfrMethodProcessor.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/methodtracer/jfrMethodProcessor.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -67,6 +67,8 @@ const uint32_t idx = _methods->at(i).methods_array_index(); Method* const method = ik_methods->at(idx); assert(method != nullptr, "invariant"); + assert(method->name() == _methods->at(i).name(), "invariant"); + assert(method->signature() == _methods->at(i).signature(), "invariant"); _methods->at(i).set_method(method); // This is to keep the method from being unloaded during redefine / retransform. // Equivalent functionality to that provided by the methodHandle. Unfortunately, diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/support/methodtracer/jfrMethodTracer.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/methodtracer/jfrMethodTracer.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/support/methodtracer/jfrMethodTracer.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/methodtracer/jfrMethodTracer.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -128,11 +128,11 @@ } } -static void handle_no_bytecode_result(const Klass* klass) { - assert(klass != nullptr, "invariant"); - if (JfrTraceId::has_sticky_bit(klass)) { +static void handle_no_bytecode_result(const InstanceKlass* ik) { + assert(ik != nullptr, "invariant"); + if (JfrTraceId::has_sticky_bit(ik)) { MutexLocker lock(ClassLoaderDataGraph_lock); - JfrTraceTagging::clear_sticky_bit(InstanceKlass::cast(klass)); + JfrTraceTagging::clear_sticky(ik); } } @@ -143,11 +143,11 @@ ResourceMark rm(THREAD); // 1. Is the ik the initial load, i.e.the first InstanceKlass, or a scratch klass, denoting a redefine / retransform? - const Klass* const existing_klass = JfrClassTransformer::find_existing_klass(ik, THREAD); - const bool is_retransform = existing_klass != nullptr; + const InstanceKlass* const existing_ik = JfrClassTransformer::find_existing_klass(ik, THREAD); + const bool is_retransform = existing_ik != nullptr; // 2. Test the ik and its methods against the currently installed filter object. - JfrMethodProcessor mp(is_retransform ? InstanceKlass::cast(existing_klass) : ik, THREAD); + JfrMethodProcessor mp(is_retransform ? existing_ik : ik, THREAD); if (!mp.has_methods()) { return; } @@ -159,7 +159,7 @@ // If no bytecode is returned, either an error occurred during transformation, but more // likely the matched instructions were negative, i.e. instructions to remove existing instrumentation // and so Java added no new instrumentation. By not returning a bytecode result, the klass is restored to its original, non-instrumented, version. - handle_no_bytecode_result(is_retransform ? InstanceKlass::cast(existing_klass) : ik); + handle_no_bytecode_result(is_retransform ? existing_ik : ik); return; } // 4. Now create a new InstanceKlass representation from the modified bytecode. @@ -173,13 +173,12 @@ // Keep the original cached class file data from the existing class. JfrClassTransformer::transfer_cached_class_file_data(ik, new_ik, parser, THREAD); JfrClassTransformer::rewrite_klass_pointer(ik, new_ik, parser, THREAD); // The ik is modified to point to new_ik here. - const InstanceKlass* const existing_ik = InstanceKlass::cast(existing_klass); mp.update_methods(existing_ik); existing_ik->module()->add_read(jdk_jfr_module()); // By setting the sticky bit on the existng klass, we receive a callback into on_klass_redefinition (see below) // when our new methods are installed into the existing klass as part of retransformation / redefinition. // Only when we know our new methods have been installed can we add the klass to the instrumented list (done as part of callback). - JfrTraceTagging::install_sticky_bit_for_retransform_klass(existing_ik, mp.methods(), mp.has_timing()); + JfrTraceTagging::tag_sticky_for_retransform_klass(existing_ik, ik, mp.methods(), mp.has_timing()); return; } // Initial class load. @@ -203,28 +202,22 @@ } } -void JfrMethodTracer::add_timing_entry(const InstanceKlass* ik, traceid klass_id) { - assert(ik != nullptr, "invariant"); +void JfrMethodTracer::add_timing_entry(traceid klass_id) { assert(_timing_entries != nullptr, "invariant"); - if (JfrTraceId::has_timing_bit(ik)) { - JfrTraceId::clear_timing_bit(ik); - _timing_entries->append(klass_id); - } + _timing_entries->append(klass_id); } // At this point we have installed our new retransformed methods into the original klass, which is ik. -// jvmtiRedefineClassses::redefine_single_class() has finished so we are still at a safepoint. -// If the original klass is not already in the list, add it and also dynamically tag all -// artifacts that have the sticky bit set. If the klass has an associated TimedClass, -// also add the klass to the list of _timing_entries for publication. -void JfrMethodTracer::on_klass_redefinition(const InstanceKlass* ik, Thread* thread) { +// jvmtiRedefineClassses::redefine_single_class() is about to finish so we are still at a safepoint. +// If the original klass is not already in the list, add it. If the klass has an associated TimedClass, +// add also the klass_id to the list of _timing_entries for publication. +void JfrMethodTracer::on_klass_redefinition(const InstanceKlass* ik, bool has_timing) { assert(ik != nullptr, "invariant"); assert(!ik->is_scratch_class(), "invarint"); assert(ik->has_been_redefined(), "invariant"); assert(JfrTraceId::has_sticky_bit(ik), "invariant"); assert(in_use(), "invariant"); assert(SafepointSynchronize::is_at_safepoint(), "invariant"); - assert_locked_or_safepoint(ClassLoaderDataGraph_lock); const traceid klass_id = JfrTraceId::load_raw(ik); const JfrInstrumentedClass jic(klass_id, ik, false); @@ -235,8 +228,9 @@ assert(!JfrTraceIdEpoch::has_method_tracer_changed_tag_state(), "invariant"); JfrTraceIdEpoch::set_method_tracer_tag_state(); } - add_timing_entry(ik, klass_id); - JfrTraceTagging::set_dynamic_tag_for_sticky_bit(ik); + if (has_timing) { + add_timing_entry(klass_id); + } log_add(ik); } } @@ -258,8 +252,7 @@ ik->module()->add_read(jdk_jfr_module()); MutexLocker lock(ClassLoaderDataGraph_lock); assert(!in_instrumented_list(ik, instrumented_classes()), "invariant"); - JfrTraceTagging::set_dynamic_tag(ik, methods); - JfrTraceTagging::set_sticky_bit(ik, methods); + JfrTraceTagging::tag_sticky(ik, methods); const JfrInstrumentedClass jik(JfrTraceId::load_raw(ik), ik, false); const int idx = instrumented_classes()->append(jik); if (idx == 0) { diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/support/methodtracer/jfrMethodTracer.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/methodtracer/jfrMethodTracer.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/support/methodtracer/jfrMethodTracer.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/methodtracer/jfrMethodTracer.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -51,7 +51,7 @@ static GrowableArray* _timing_entries; // Guarded by ClassLoaderDataGraph_lock static ModuleEntry* jdk_jfr_module(); - static void add_timing_entry(const InstanceKlass* ik, traceid klass_id); + static void add_timing_entry(traceid klass_id); static void retransform(JNIEnv* env, const JfrFilterClassClosure& classes, TRAPS); static void add_instrumented_class(InstanceKlass* ik, GrowableArray* methods); @@ -61,7 +61,7 @@ static void add_to_unloaded_set(const Klass* k); static void trim_instrumented_classes(bool trim); static GrowableArray* instrumented_classes(); - static void on_klass_redefinition(const InstanceKlass* ik, Thread* thread); + static void on_klass_redefinition(const InstanceKlass* ik, bool has_timing); static void on_klass_creation(InstanceKlass*& ik, ClassFileParser& parser, TRAPS); static jlongArray set_filters(JNIEnv* env, jobjectArray classes, diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/support/methodtracer/jfrTraceTagging.cpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/methodtracer/jfrTraceTagging.cpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/support/methodtracer/jfrTraceTagging.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/methodtracer/jfrTraceTagging.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -25,9 +25,11 @@ #include "jfr/recorder/checkpoint/types/traceid/jfrTraceId.inline.hpp" #include "jfr/recorder/checkpoint/types/traceid/jfrTraceIdEpoch.hpp" #include "jfr/support/methodtracer/jfrInstrumentedClass.hpp" +#include "jfr/support/methodtracer/jfrMethodTracer.hpp" #include "jfr/support/methodtracer/jfrTraceTagging.hpp" #include "oops/instanceKlass.hpp" #include "oops/method.hpp" +#include "runtime/safepoint.hpp" #include "utilities/growableArray.hpp" void JfrTraceTagging::tag_dynamic(const InstanceKlass* ik) { @@ -38,100 +40,39 @@ JfrTraceId::load_no_enqueue(method); } -void JfrTraceTagging::tag_dynamic(const InstanceKlass* ik, const GrowableArray* methods) { - assert(ik != nullptr, "invariant"); - assert(methods != nullptr, "invariant"); - - for (int i = 0; i < methods->length(); ++i) { - const Method* const method = methods->at(i).method(); - assert(method != nullptr, "invariant"); - if (!method->is_old()) { - tag_dynamic(method); - continue; - } - // A redefinition / retransformation interleaved. - // Find and tag the latest version of the method. - tag_dynamic(ik->method_with_orig_idnum(method->orig_method_idnum())); - } -} - -void JfrTraceTagging::set_dynamic_tag(const InstanceKlass* ik, const GrowableArray* methods) { - assert(ik != nullptr, "invariant"); - assert(!ik->is_scratch_class(), "invariant"); - - tag_dynamic(ik, methods); - tag_dynamic(ik); -} - -void JfrTraceTagging::set_dynamic_tag_for_sticky_bit(const InstanceKlass* ik) { - assert(ik != nullptr, "invariant"); - assert(!ik->is_scratch_class(), "invariant"); - assert(JfrTraceId::has_sticky_bit(ik), "invariant"); - - const int length = ik->methods()->length(); - for (int i = 0; i < length; ++i) { - const Method* const m = ik->methods()->at(i); - if (JfrTraceId::has_sticky_bit(m)) { - tag_dynamic(m); - } - } - tag_dynamic(ik); -} - void JfrTraceTagging::tag_sticky(const InstanceKlass* ik) { JfrTraceId::set_sticky_bit(ik); } +void JfrTraceTagging::tag_sticky_enqueue(const InstanceKlass* ik) { + tag_sticky(ik); + JfrTraceIdLoadBarrier::enqueue(ik); +} + void JfrTraceTagging::tag_sticky(const Method* method) { JfrTraceId::set_sticky_bit(method); } -void JfrTraceTagging::tag_sticky(const InstanceKlass* ik, const GrowableArray* methods) { - assert(ik != nullptr, "invariant"); +void JfrTraceTagging::tag_sticky(const GrowableArray* methods) { assert(methods != nullptr, "invariant"); - + assert_locked_or_safepoint(ClassLoaderDataGraph_lock); for (int i = 0; i < methods->length(); ++i) { const Method* const method = methods->at(i).method(); assert(method != nullptr, "invariant"); - if (!method->is_old()) { - tag_sticky(method); - continue; - } - // A redefinition / retransformation interleaved. - // Find and tag the latest version of the method. - tag_sticky(ik->method_with_orig_idnum(method->orig_method_idnum())); + tag_sticky(method); } } -void JfrTraceTagging::tag_timing(const InstanceKlass* ik) { - JfrTraceId::set_timing_bit(ik); -} - -void JfrTraceTagging::install_sticky_bit_for_retransform_klass(const InstanceKlass* ik, const GrowableArray* methods, bool timing) { - assert(ik != nullptr, "invariant"); - assert(!ik->is_scratch_class(), "invariant"); - - MutexLocker lock(ClassLoaderDataGraph_lock); - if (JfrTraceId::has_sticky_bit(ik)) { - clear_sticky_bit(ik); - } - tag_sticky(ik, methods); - tag_sticky(ik); - if (timing) { - tag_timing(ik); - } -} - -void JfrTraceTagging::set_sticky_bit(const InstanceKlass* ik, const GrowableArray* methods) { +void JfrTraceTagging::tag_sticky(const InstanceKlass* ik, const GrowableArray* methods) { assert(ik != nullptr, "invariant"); assert(!ik->is_scratch_class(), "invariant"); + assert(methods != nullptr, "invariant"); assert_locked_or_safepoint(ClassLoaderDataGraph_lock); - - tag_sticky(ik, methods); - tag_sticky(ik); + tag_sticky(methods); + tag_sticky_enqueue(ik); } -void JfrTraceTagging::clear_sticky_bit(const InstanceKlass* ik, bool dynamic_tag /* true */) { +void JfrTraceTagging::clear_sticky(const InstanceKlass* ik, bool dynamic_tag /* true */) { assert(ik != nullptr, "invariant"); assert(!ik->is_scratch_class(), "invariant"); assert(JfrTraceId::has_sticky_bit(ik), "invariant"); @@ -153,8 +94,78 @@ tag_dynamic(ik); } JfrTraceId::clear_sticky_bit(ik); - if (JfrTraceId::has_timing_bit(ik)) { - JfrTraceId::clear_timing_bit(ik); +} + +void JfrTraceTagging::tag_sticky_for_retransform_klass(const InstanceKlass* existing_klass, const InstanceKlass* scratch_klass, const GrowableArray* methods, bool timing) { + assert(existing_klass != nullptr, "invariant"); + assert(scratch_klass != nullptr, "invariant"); + // The scratch class has not yet received its official status. + // assert(scratch_klass->is_scratch_class(), "invariant"); + if (timing) { + // Can be done outside lock because it is a scratch klass. + // Visibility guaranteed by upcoming safepoint. + JfrTraceId::set_timing_bit(scratch_klass); + } + MutexLocker lock(ClassLoaderDataGraph_lock); + if (JfrTraceId::has_sticky_bit(existing_klass)) { + clear_sticky(existing_klass); + } + tag_sticky(methods); + tag_sticky(existing_klass); +} + +void JfrTraceTagging::on_klass_redefinition(const InstanceKlass* ik, const InstanceKlass* scratch_klass) { + assert(ik != nullptr, "invariant"); + assert(ik->has_been_redefined(), "invariant"); + assert(scratch_klass != nullptr, "invariant"); + assert(scratch_klass->is_scratch_class(), "invariant"); + assert(SafepointSynchronize::is_at_safepoint(), "invariant"); + + const bool klass_has_sticky_bit = JfrTraceId::has_sticky_bit(ik); + if (klass_has_sticky_bit) { + JfrTraceIdLoadBarrier::enqueue(ik); + } + + const Array* new_methods = ik->methods(); + assert(new_methods != nullptr, "invariant"); + + const int len = new_methods->length(); // Can be shorter, equal to, or longer than old methods length. + + for (int i = 0; i < len; ++i) { + const Method* const nm = new_methods->at(i); + assert(nm != nullptr, "invariant"); + const Method* const om = scratch_klass->method_with_orig_idnum(nm->orig_method_idnum()); + if (om == nullptr) { + assert(AllowRedefinitionToAddDeleteMethods, "invariant"); + // nm is a newly added Method. + continue; + } + assert(nm != om, "invariant"); + assert(om->is_old(), "invariant"); + assert(nm->orig_method_idnum() == om->orig_method_idnum(), "invariant"); + assert(nm->name() == om->name() && nm->signature() == om->signature(), "invariant"); + + if (nm->trace_flags() == om->trace_flags()) { + continue; + } + + const bool is_blessed = IS_METHOD_BLESSED(nm); + + // Copy the old method trace flags under a safepoint. + nm->copy_trace_flags(om); + + assert(nm->trace_flags() == om->trace_flags(), "invariant"); + + if (is_blessed) { + BLESS_METHOD(nm); + assert(IS_METHOD_BLESSED(nm), "invariant"); + } + } + + // A retransformed/redefined klass carrying the sticky bit + // needs additional processing by the JfrMethodTracer subsystem. + if (klass_has_sticky_bit) { + assert(JfrMethodTracer::in_use(), "invariant"); + JfrMethodTracer::on_klass_redefinition(ik, JfrTraceId::has_timing_bit(scratch_klass)); } - assert(!JfrTraceId::has_timing_bit(ik), "invariant"); } diff -Nru openjdk-25-25~32ea/src/hotspot/share/jfr/support/methodtracer/jfrTraceTagging.hpp openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/methodtracer/jfrTraceTagging.hpp --- openjdk-25-25~32ea/src/hotspot/share/jfr/support/methodtracer/jfrTraceTagging.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/jfr/support/methodtracer/jfrTraceTagging.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -39,18 +39,16 @@ class JfrTraceTagging : AllStatic { private: static void tag_dynamic(const InstanceKlass* ik); - static void tag_dynamic(const InstanceKlass* ik, const GrowableArray* methods); static void tag_dynamic(const Method* method); static void tag_sticky(const InstanceKlass* ik); static void tag_sticky(const Method* method); - static void tag_sticky(const InstanceKlass* ik, const GrowableArray* methods); - static void tag_timing(const InstanceKlass* ik); + static void tag_sticky(const GrowableArray* methods); + static void tag_sticky_enqueue(const InstanceKlass* ik); public: - static void set_dynamic_tag(const InstanceKlass* ik, const GrowableArray* methods); - static void set_dynamic_tag_for_sticky_bit(const InstanceKlass* ik); - static void install_sticky_bit_for_retransform_klass(const InstanceKlass* existing_klass, const GrowableArray* methods, bool timing); - static void set_sticky_bit(const InstanceKlass* ik, const GrowableArray* methods); - static void clear_sticky_bit(const InstanceKlass* ik, bool dynamic_tag = true); + static void clear_sticky(const InstanceKlass* ik, bool dynamic_tag = true); + static void tag_sticky(const InstanceKlass* ik, const GrowableArray* methods); + static void tag_sticky_for_retransform_klass(const InstanceKlass* existing_klass, const InstanceKlass* scratch_klass, const GrowableArray* methods, bool timing); + static void on_klass_redefinition(const InstanceKlass* ik, const InstanceKlass* scratch_klass); }; #endif /* SHARE_JFR_SUPPORT_METHODTRACER_JFRTRACETAGGING_HPP */ diff -Nru openjdk-25-25~32ea/src/hotspot/share/opto/library_call.cpp openjdk-25-25.0.1+8/src/hotspot/share/opto/library_call.cpp --- openjdk-25-25~32ea/src/hotspot/share/opto/library_call.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/opto/library_call.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -1575,9 +1575,14 @@ Node* src_start = array_element_address(value, offset, T_CHAR); Node* dst_start = basic_plus_adr(newcopy, arrayOopDesc::base_offset_in_bytes(T_BYTE)); - // Check if src array address is aligned to HeapWordSize (dst is always aligned) - const TypeInt* toffset = gvn().type(offset)->is_int(); - bool aligned = toffset->is_con() && ((toffset->get_con() * type2aelembytes(T_CHAR)) % HeapWordSize == 0); + // Check if dst array address is aligned to HeapWordSize + bool aligned = (arrayOopDesc::base_offset_in_bytes(T_BYTE) % HeapWordSize == 0); + // If true, then check if src array address is aligned to HeapWordSize + if (aligned) { + const TypeInt* toffset = gvn().type(offset)->is_int(); + aligned = toffset->is_con() && ((arrayOopDesc::base_offset_in_bytes(T_CHAR) + + toffset->get_con() * type2aelembytes(T_CHAR)) % HeapWordSize == 0); + } // Figure out which arraycopy runtime method to call (disjoint, uninitialized). const char* copyfunc_name = "arraycopy"; @@ -1658,8 +1663,8 @@ // Check if array addresses are aligned to HeapWordSize const TypeInt* tsrc = gvn().type(src_begin)->is_int(); const TypeInt* tdst = gvn().type(dst_begin)->is_int(); - bool aligned = tsrc->is_con() && ((tsrc->get_con() * type2aelembytes(T_BYTE)) % HeapWordSize == 0) && - tdst->is_con() && ((tdst->get_con() * type2aelembytes(T_CHAR)) % HeapWordSize == 0); + bool aligned = tsrc->is_con() && ((arrayOopDesc::base_offset_in_bytes(T_BYTE) + tsrc->get_con() * type2aelembytes(T_BYTE)) % HeapWordSize == 0) && + tdst->is_con() && ((arrayOopDesc::base_offset_in_bytes(T_CHAR) + tdst->get_con() * type2aelembytes(T_CHAR)) % HeapWordSize == 0); // Figure out which arraycopy runtime method to call (disjoint, uninitialized). const char* copyfunc_name = "arraycopy"; diff -Nru openjdk-25-25~32ea/src/hotspot/share/opto/stringopts.cpp openjdk-25-25.0.1+8/src/hotspot/share/opto/stringopts.cpp --- openjdk-25-25~32ea/src/hotspot/share/opto/stringopts.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/opto/stringopts.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -1473,9 +1473,14 @@ Node* src_ptr = __ array_element_address(src_array, __ intcon(0), T_BYTE); Node* dst_ptr = __ array_element_address(dst_array, start, T_BYTE); - // Check if destination address is aligned to HeapWordSize - const TypeInt* tdst = __ gvn().type(start)->is_int(); - bool aligned = tdst->is_con() && ((tdst->get_con() * type2aelembytes(T_BYTE)) % HeapWordSize == 0); + // Check if src array address is aligned to HeapWordSize + bool aligned = (arrayOopDesc::base_offset_in_bytes(T_BYTE) % HeapWordSize == 0); + // If true, then check if dst array address is aligned to HeapWordSize + if (aligned) { + const TypeInt* tdst = __ gvn().type(start)->is_int(); + aligned = tdst->is_con() && ((arrayOopDesc::base_offset_in_bytes(T_BYTE) + + tdst->get_con() * type2aelembytes(T_BYTE)) % HeapWordSize == 0); + } // Figure out which arraycopy runtime method to call (disjoint, uninitialized). const char* copyfunc_name = "arraycopy"; address copyfunc_addr = StubRoutines::select_arraycopy_function(elembt, aligned, true, copyfunc_name, true); diff -Nru openjdk-25-25~32ea/src/hotspot/share/opto/subnode.cpp openjdk-25-25.0.1+8/src/hotspot/share/opto/subnode.cpp --- openjdk-25-25~32ea/src/hotspot/share/opto/subnode.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/opto/subnode.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -2074,9 +2074,15 @@ return bottom_type(); } -Node* InvolutionNode::Identity(PhaseGVN* phase) { - // Op ( Op x ) => x - if (in(1)->Opcode() == Opcode()) { +Node* ReverseINode::Identity(PhaseGVN* phase) { + if (in(1)->Opcode() == Op_ReverseI) { + return in(1)->in(1); + } + return this; +} + +Node* ReverseLNode::Identity(PhaseGVN* phase) { + if (in(1)->Opcode() == Op_ReverseL) { return in(1)->in(1); } return this; diff -Nru openjdk-25-25~32ea/src/hotspot/share/opto/subnode.hpp openjdk-25-25.0.1+8/src/hotspot/share/opto/subnode.hpp --- openjdk-25-25~32ea/src/hotspot/share/opto/subnode.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/opto/subnode.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -439,18 +439,11 @@ virtual uint ideal_reg() const { return Op_RegI; } }; -//------------------------------InvolutionNode---------------------------------- -// Represents a self-inverse operation, i.e., op(op(x)) = x for any x -class InvolutionNode : public Node { -public: - InvolutionNode(Node* in) : Node(nullptr, in) {} - virtual Node* Identity(PhaseGVN* phase); -}; //------------------------------NegNode---------------------------------------- -class NegNode : public InvolutionNode { +class NegNode : public Node { public: - NegNode(Node* in1) : InvolutionNode(in1) { + NegNode(Node* in1) : Node(nullptr, in1) { init_class_id(Class_Neg); } }; @@ -562,18 +555,16 @@ }; -class ReverseBytesNode : public InvolutionNode { +class ReverseBytesNode : public Node { public: - ReverseBytesNode(Node* in) : InvolutionNode(in) {} + ReverseBytesNode(Node* in) : Node(nullptr, in) {} virtual const Type* Value(PhaseGVN* phase) const; }; //-------------------------------ReverseBytesINode-------------------------------- // reverse bytes of an integer class ReverseBytesINode : public ReverseBytesNode { public: - ReverseBytesINode(Node* in) : ReverseBytesNode(in) { - } - + ReverseBytesINode(Node* in) : ReverseBytesNode(in) {} virtual int Opcode() const; const Type* bottom_type() const { return TypeInt::INT; } virtual uint ideal_reg() const { return Op_RegI; } @@ -611,23 +602,25 @@ //-------------------------------ReverseINode-------------------------------- // reverse bits of an int -class ReverseINode : public InvolutionNode { +class ReverseINode : public Node { public: - ReverseINode(Node* in) : InvolutionNode(in) {} + ReverseINode(Node* in) : Node(nullptr,in) {} virtual int Opcode() const; const Type* bottom_type() const { return TypeInt::INT; } virtual uint ideal_reg() const { return Op_RegI; } + virtual Node* Identity(PhaseGVN* phase); virtual const Type* Value(PhaseGVN* phase) const; }; //-------------------------------ReverseLNode-------------------------------- // reverse bits of a long -class ReverseLNode : public InvolutionNode { +class ReverseLNode : public Node { public: - ReverseLNode(Node* in) : InvolutionNode(in) {} + ReverseLNode(Node* in) : Node(nullptr, in) {} virtual int Opcode() const; const Type* bottom_type() const { return TypeLong::LONG; } virtual uint ideal_reg() const { return Op_RegL; } + virtual Node* Identity(PhaseGVN* phase); virtual const Type* Value(PhaseGVN* phase) const; }; diff -Nru openjdk-25-25~32ea/src/hotspot/share/prims/jvmtiRedefineClasses.cpp openjdk-25-25.0.1+8/src/hotspot/share/prims/jvmtiRedefineClasses.cpp --- openjdk-25-25~32ea/src/hotspot/share/prims/jvmtiRedefineClasses.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/prims/jvmtiRedefineClasses.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -66,6 +66,9 @@ #include "utilities/checkedCast.hpp" #include "utilities/events.hpp" #include "utilities/macros.hpp" +#if INCLUDE_JFR +#include "jfr/jfr.hpp" +#endif Array* VM_RedefineClasses::_old_methods = nullptr; Array* VM_RedefineClasses::_new_methods = nullptr; @@ -1173,7 +1176,6 @@ } } } - JFR_ONLY(k_new_method->copy_trace_flags(k_old_method->trace_flags());) log_trace(redefine, class, normalize) ("Method matched: new: %s [%d] == old: %s [%d]", k_new_method->name_and_sig_as_C_string(), ni, k_old_method->name_and_sig_as_C_string(), oi); @@ -4393,7 +4395,7 @@ // keep track of previous versions of this class the_class->add_previous_version(scratch_class, emcp_method_count); - JFR_ONLY(ON_KLASS_REDEFINITION(the_class, current);) + JFR_ONLY(Jfr::on_klass_redefinition(the_class, scratch_class);) _timer_rsc_phase1.stop(); if (log_is_enabled(Info, redefine, class, timer)) { diff -Nru openjdk-25-25~32ea/src/hotspot/share/prims/whitebox.cpp openjdk-25-25.0.1+8/src/hotspot/share/prims/whitebox.cpp --- openjdk-25-25~32ea/src/hotspot/share/prims/whitebox.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/prims/whitebox.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -1097,6 +1097,22 @@ } #endif +bool WhiteBox::is_asan_enabled() { +#ifdef ADDRESS_SANITIZER + return true; +#else + return false; +#endif +} + +bool WhiteBox::is_ubsan_enabled() { +#ifdef UNDEFINED_BEHAVIOR_SANITIZER + return true; +#else + return false; +#endif +} + bool WhiteBox::compile_method(Method* method, int comp_level, int bci, JavaThread* THREAD) { // Screen for unavailable/bad comp level or null method AbstractCompiler* comp = CompileBroker::compiler(comp_level); @@ -1908,6 +1924,14 @@ return (jboolean) obj_oop->mark().has_monitor(); WB_END +WB_ENTRY(jboolean, WB_IsAsanEnabled(JNIEnv* env)) + return (jboolean) WhiteBox::is_asan_enabled(); +WB_END + +WB_ENTRY(jboolean, WB_IsUbsanEnabled(JNIEnv* env)) + return (jboolean) WhiteBox::is_ubsan_enabled(); +WB_END + WB_ENTRY(jlong, WB_getInUseMonitorCount(JNIEnv* env, jobject wb)) return (jlong) WhiteBox::get_in_use_monitor_count(); WB_END @@ -2908,6 +2932,8 @@ (void*)&WB_AddModuleExportsToAll }, {CC"deflateIdleMonitors", CC"()Z", (void*)&WB_DeflateIdleMonitors }, {CC"isMonitorInflated0", CC"(Ljava/lang/Object;)Z", (void*)&WB_IsMonitorInflated }, + {CC"isAsanEnabled", CC"()Z", (void*)&WB_IsAsanEnabled }, + {CC"isUbsanEnabled", CC"()Z", (void*)&WB_IsUbsanEnabled }, {CC"getInUseMonitorCount", CC"()J", (void*)&WB_getInUseMonitorCount }, {CC"getLockStackCapacity", CC"()I", (void*)&WB_getLockStackCapacity }, {CC"supportsRecursiveLightweightLocking", CC"()Z", (void*)&WB_supportsRecursiveLightweightLocking }, diff -Nru openjdk-25-25~32ea/src/hotspot/share/prims/whitebox.hpp openjdk-25-25.0.1+8/src/hotspot/share/prims/whitebox.hpp --- openjdk-25-25~32ea/src/hotspot/share/prims/whitebox.hpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/prims/whitebox.hpp 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 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 @@ -72,6 +72,9 @@ #ifdef LINUX static bool validate_cgroup(bool cgroups_v2_enabled, const char* controllers_file, const char* proc_self_cgroup, const char* proc_self_mountinfo, u1* cg_flags); #endif + // provide info about enabling of Address Sanitizer / Undefined Behavior Sanitizer + static bool is_asan_enabled(); + static bool is_ubsan_enabled(); }; #endif // SHARE_PRIMS_WHITEBOX_HPP diff -Nru openjdk-25-25~32ea/src/hotspot/share/runtime/javaThread.cpp openjdk-25-25.0.1+8/src/hotspot/share/runtime/javaThread.cpp --- openjdk-25-25~32ea/src/hotspot/share/runtime/javaThread.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/runtime/javaThread.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -737,6 +737,8 @@ assert(JavaThread::current() == this, "sanity check"); assert(!Thread::current()->owns_locks(), "sanity check"); + JFR_ONLY(Jfr::on_thread_start(this);) + DTRACE_THREAD_PROBE(start, this); // This operation might block. We call that after all safepoint checks for a new thread has diff -Nru openjdk-25-25~32ea/src/hotspot/share/runtime/safepointMechanism.cpp openjdk-25-25.0.1+8/src/hotspot/share/runtime/safepointMechanism.cpp --- openjdk-25-25~32ea/src/hotspot/share/runtime/safepointMechanism.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/runtime/safepointMechanism.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -142,7 +142,6 @@ do { JavaThreadState state = thread->thread_state(); guarantee(state == _thread_in_vm, "Illegal threadstate encountered: %d", state); - JFR_ONLY(Jfr::check_and_process_sample_request(thread);) if (global_poll()) { // Any load in ::block() must not pass the global poll load. // Otherwise we might load an old safepoint counter (for example). @@ -161,6 +160,7 @@ need_rechecking = thread->handshake_state()->has_operation() && thread->handshake_state()->process_by_self(allow_suspend, check_async_exception); } while (need_rechecking); + JFR_ONLY(Jfr::check_and_process_sample_request(thread);) update_poll_values(thread); assert(sp_before == thread->last_Java_sp(), "Anchor has changed"); } diff -Nru openjdk-25-25~32ea/src/hotspot/share/runtime/stubRoutines.cpp openjdk-25-25.0.1+8/src/hotspot/share/runtime/stubRoutines.cpp --- openjdk-25-25~32ea/src/hotspot/share/runtime/stubRoutines.cpp 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/hotspot/share/runtime/stubRoutines.cpp 2025-09-25 16:16:56.000000000 +0000 @@ -231,7 +231,9 @@ StubGenerator_generate(&buffer, blob_id); // When new stubs added we need to make sure there is some space left // to catch situation when we should increase size again. - assert(code_size == 0 || buffer.insts_remaining() > 200, "increase %s", assert_msg); + assert(code_size == 0 || buffer.insts_remaining() > 200, + "increase %s, code_size: %d, used: %d, free: %d", + assert_msg, code_size, buffer.total_content_size(), buffer.insts_remaining()); LogTarget(Info, stubs) lt; if (lt.is_enabled()) { @@ -240,6 +242,7 @@ buffer_name, p2i(stubs_code->content_begin()), p2i(stubs_code->content_end()), buffer.total_content_size(), buffer.insts_remaining()); } + return stubs_code; } diff -Nru openjdk-25-25~32ea/src/java.base/share/classes/java/io/File.java openjdk-25-25.0.1+8/src/java.base/share/classes/java/io/File.java --- openjdk-25-25~32ea/src/java.base/share/classes/java/io/File.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/classes/java/io/File.java 2025-09-25 16:16:56.000000000 +0000 @@ -1134,15 +1134,9 @@ if (ss == null) return null; int n = ss.length; File[] fs = new File[n]; - if (path.isEmpty()) { - for (int i = 0; i < n; i++) { - fs[i] = new File(ss[i]); - } - } else { - for (int i = 0; i < n; i++) { - fs[i] = new File(ss[i], this); - } - } + boolean isEmpty = path.isEmpty(); + for (int i = 0; i < n; i++) + fs[i] = isEmpty ? new File(ss[i]) : new File(ss[i], this); return fs; } @@ -1175,9 +1169,10 @@ String[] ss = normalizedList(); if (ss == null) return null; ArrayList files = new ArrayList<>(); + boolean isEmpty = path.isEmpty(); for (String s : ss) if ((filter == null) || filter.accept(this, s)) - files.add(new File(s, this)); + files.add(isEmpty ? new File(s) : new File(s, this)); return files.toArray(new File[files.size()]); } @@ -1208,8 +1203,9 @@ String[] ss = normalizedList(); if (ss == null) return null; ArrayList files = new ArrayList<>(); + boolean isEmpty = path.isEmpty(); for (String s : ss) { - File f = new File(s, this); + File f = isEmpty ? new File(s) : new File(s, this); if ((filter == null) || filter.accept(f)) files.add(f); } diff -Nru openjdk-25-25~32ea/src/java.base/share/classes/java/lang/AbstractStringBuilder.java openjdk-25-25.0.1+8/src/java.base/share/classes/java/lang/AbstractStringBuilder.java --- openjdk-25-25~32ea/src/java.base/share/classes/java/lang/AbstractStringBuilder.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/classes/java/lang/AbstractStringBuilder.java 2025-09-25 16:16:56.000000000 +0000 @@ -1448,8 +1448,8 @@ shift(currValue, coder, count, dstOffset, len); count += len; // Coder of CharSequence may be a mismatch, requiring the value array to be inflated - byte[] newValue = (s instanceof String str) - ? putStringAt(currValue, coder, count, dstOffset, str, start, end) + byte[] newValue = (s instanceof String str && str.length() == len) + ? putStringAt(currValue, coder, count, dstOffset, str) : putCharsAt(currValue, coder, count, dstOffset, s, start, end); if (currValue != newValue) { this.coder = UTF16; @@ -1928,10 +1928,10 @@ * @param index the index to insert the string * @param str the string */ - private static byte[] putStringAt(byte[] value, byte coder, int count, int index, String str, int off, int end) { + private static byte[] putStringAt(byte[] value, byte coder, int count, int index, String str) { byte[] newValue = inflateIfNeededFor(value, count, coder, str.coder()); coder = (newValue == value) ? coder : UTF16; - str.getBytes(newValue, off, index, coder, end - off); + str.getBytes(newValue, 0, index, coder, str.length()); return newValue; } diff -Nru openjdk-25-25~32ea/src/java.base/share/classes/java/lang/foreign/MemoryLayout.java openjdk-25-25.0.1+8/src/java.base/share/classes/java/lang/foreign/MemoryLayout.java --- openjdk-25-25~32ea/src/java.base/share/classes/java/lang/foreign/MemoryLayout.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/classes/java/lang/foreign/MemoryLayout.java 2025-09-25 16:16:56.000000000 +0000 @@ -276,10 +276,10 @@ * if {@code A >= S}. An aligned var handle is guaranteed to support the following * access modes: *
    - *
  • read write access modes for all {@code T}. On 32-bit platforms, access modes - * {@code get} and {@code set} for {@code long}, {@code double} and {@code MemorySegment} - * are supported but might lead to word tearing, as described in Section {@jls 17.7}. - * of The Java Language Specification. + *
  • read write access modes for all {@code T}. Access modes {@code get} and + * {@code set} for {@code long}, {@code double} and {@code MemorySegment} + * are supported but have no atomicity guarantee, as described in Section + * {@jls 17.7} of The Java Language Specification. *
  • atomic update access modes for {@code int}, {@code long}, * {@code float}, {@code double} and {@link MemorySegment}. * (Future major platform releases of the JDK may support additional diff -Nru openjdk-25-25~32ea/src/java.base/share/classes/java/lang/invoke/MethodHandles.java openjdk-25-25.0.1+8/src/java.base/share/classes/java/lang/invoke/MethodHandles.java --- openjdk-25-25~32ea/src/java.base/share/classes/java/lang/invoke/MethodHandles.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/classes/java/lang/invoke/MethodHandles.java 2025-09-25 16:16:56.000000000 +0000 @@ -4305,9 +4305,10 @@ * If access is aligned then following access modes are supported and are * guaranteed to support atomic access: *
      - *
    • read write access modes for all {@code T}, with the exception of - * access modes {@code get} and {@code set} for {@code long} and - * {@code double} on 32-bit platforms. + *
    • read write access modes for all {@code T}. Access modes {@code get} + * and {@code set} for {@code long} and {@code double} are supported but + * have no atomicity guarantee, as described in Section {@jls 17.7} of + * The Java Language Specification. *
    • atomic update access modes for {@code int}, {@code long}, * {@code float} or {@code double}. * (Future major platform releases of the JDK may support additional diff -Nru openjdk-25-25~32ea/src/java.base/share/classes/java/text/DecimalFormat.java openjdk-25-25.0.1+8/src/java.base/share/classes/java/text/DecimalFormat.java --- openjdk-25-25~32ea/src/java.base/share/classes/java/text/DecimalFormat.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/classes/java/text/DecimalFormat.java 2025-09-25 16:16:56.000000000 +0000 @@ -114,12 +114,6 @@ * pattern} or using one of the appropriate {@code DecimalFormat} setter methods, * for example, {@link #setMinimumFractionDigits(int)}. These limits have no impact * on parsing behavior. - * @implSpec - * When formatting a {@code Number} other than {@code BigInteger} and - * {@code BigDecimal}, {@code 309} is used as the upper limit for integer digits, - * and {@code 340} as the upper limit for fraction digits. This occurs, even if - * one of the {@code DecimalFormat} getter methods, for example, {@link #getMinimumFractionDigits()} - * returns a numerically greater value. * *

      Special Values

      *
        @@ -417,6 +411,13 @@ *
      • Exponential patterns may not contain grouping separators. *
      * + * @implSpec + * When formatting a {@code Number} other than {@code BigInteger} and + * {@code BigDecimal}, {@code 309} is used as the upper limit for integer digits, + * and {@code 340} as the upper limit for fraction digits. This occurs, even if + * one of the {@code DecimalFormat} getter methods, for example, {@link #getMinimumFractionDigits()} + * returns a numerically greater value. + * * @spec https://www.unicode.org/reports/tr35 * Unicode Locale Data Markup Language (LDML) * @see Java Tutorial diff -Nru openjdk-25-25~32ea/src/java.base/share/classes/java/time/LocalDate.java openjdk-25-25.0.1+8/src/java.base/share/classes/java/time/LocalDate.java --- openjdk-25-25~32ea/src/java.base/share/classes/java/time/LocalDate.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/classes/java/time/LocalDate.java 2025-09-25 16:16:56.000000000 +0000 @@ -182,11 +182,11 @@ /** * @serial The month-of-year. */ - private final byte month; + private final short month; /** * @serial The day-of-month. */ - private final byte day; + private final short day; //----------------------------------------------------------------------- /** @@ -490,8 +490,8 @@ */ private LocalDate(int year, int month, int dayOfMonth) { this.year = year; - this.month = (byte) month; - this.day = (byte) dayOfMonth; + this.month = (short) month; + this.day = (short) dayOfMonth; } //----------------------------------------------------------------------- diff -Nru openjdk-25-25~32ea/src/java.base/share/classes/java/time/MonthDay.java openjdk-25-25.0.1+8/src/java.base/share/classes/java/time/MonthDay.java --- openjdk-25-25~32ea/src/java.base/share/classes/java/time/MonthDay.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/classes/java/time/MonthDay.java 2025-09-25 16:16:56.000000000 +0000 @@ -146,11 +146,11 @@ /** * @serial The month-of-year, not null. */ - private final byte month; + private final int month; /** * @serial The day-of-month. */ - private final byte day; + private final int day; //----------------------------------------------------------------------- /** @@ -319,8 +319,8 @@ * @param dayOfMonth the day-of-month to represent, validated from 1 to 29-31 */ private MonthDay(int month, int dayOfMonth) { - this.month = (byte) month; - this.day = (byte) dayOfMonth; + this.month = month; + this.day = dayOfMonth; } //----------------------------------------------------------------------- diff -Nru openjdk-25-25~32ea/src/java.base/share/classes/java/time/YearMonth.java openjdk-25-25.0.1+8/src/java.base/share/classes/java/time/YearMonth.java --- openjdk-25-25~32ea/src/java.base/share/classes/java/time/YearMonth.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/classes/java/time/YearMonth.java 2025-09-25 16:16:56.000000000 +0000 @@ -153,7 +153,7 @@ /** * @serial The month-of-year, not null. */ - private final byte month; + private final int month; //----------------------------------------------------------------------- /** @@ -306,7 +306,7 @@ */ private YearMonth(int year, int month) { this.year = year; - this.month = (byte) month; + this.month = month; } /** diff -Nru openjdk-25-25~32ea/src/java.base/share/classes/java/time/chrono/HijrahDate.java openjdk-25-25.0.1+8/src/java.base/share/classes/java/time/chrono/HijrahDate.java --- openjdk-25-25~32ea/src/java.base/share/classes/java/time/chrono/HijrahDate.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/classes/java/time/chrono/HijrahDate.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2019, 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 @@ -137,11 +137,11 @@ /** * The month-of-year. */ - private final transient byte monthOfYear; + private final transient int monthOfYear; /** * The day-of-month. */ - private final transient byte dayOfMonth; + private final transient int dayOfMonth; //------------------------------------------------------------------------- /** @@ -273,8 +273,8 @@ this.chrono = chrono; this.prolepticYear = prolepticYear; - this.monthOfYear = (byte) monthOfYear; - this.dayOfMonth = (byte) dayOfMonth; + this.monthOfYear = monthOfYear; + this.dayOfMonth = dayOfMonth; } /** @@ -287,8 +287,8 @@ this.chrono = chrono; this.prolepticYear = dateInfo[0]; - this.monthOfYear = (byte) dateInfo[1]; - this.dayOfMonth = (byte) dateInfo[2]; + this.monthOfYear = dateInfo[1]; + this.dayOfMonth = dateInfo[2]; } //----------------------------------------------------------------------- diff -Nru openjdk-25-25~32ea/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java openjdk-25-25.0.1+8/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java --- openjdk-25-25~32ea/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java 2025-09-25 16:16:56.000000000 +0000 @@ -292,9 +292,7 @@ /** * Creates a new SubmissionPublisher using the {@link - * ForkJoinPool#commonPool()} for async delivery to subscribers - * (unless it does not support a parallelism level of at least two, - * in which case, a new Thread is created to run each task), with + * ForkJoinPool#commonPool()} for async delivery to subscribers, with * maximum buffer capacity of {@link Flow#defaultBufferSize}, and no * handler for Subscriber exceptions in method {@link * Flow.Subscriber#onNext(Object) onNext}. diff -Nru openjdk-25-25~32ea/src/java.base/share/classes/sun/security/util/DerValue.java openjdk-25-25.0.1+8/src/java.base/share/classes/sun/security/util/DerValue.java --- openjdk-25-25~32ea/src/java.base/share/classes/sun/security/util/DerValue.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/classes/sun/security/util/DerValue.java 2025-09-25 16:16:56.000000000 +0000 @@ -860,6 +860,22 @@ } /** + * Checks that the BMPString does not contain any surrogate characters, + * which are outside the Basic Multilingual Plane. + * + * @throws IOException if illegal characters are detected + */ + public void validateBMPString() throws IOException { + String bmpString = getBMPString(); + for (int i = 0; i < bmpString.length(); i++) { + if (Character.isSurrogate(bmpString.charAt(i))) { + throw new IOException( + "Illegal character in BMPString, index: " + i); + } + } + } + + /** * Reads the ASN.1 NULL value */ public void getNull() throws IOException { diff -Nru openjdk-25-25~32ea/src/java.base/share/classes/sun/security/validator/EntrustTLSPolicy.java openjdk-25-25.0.1+8/src/java.base/share/classes/sun/security/validator/EntrustTLSPolicy.java --- openjdk-25-25~32ea/src/java.base/share/classes/sun/security/validator/EntrustTLSPolicy.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/classes/sun/security/validator/EntrustTLSPolicy.java 2025-09-25 16:16:56.000000000 +0000 @@ -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 @@ -71,19 +71,7 @@ // OU=(c) 1999 Entrust.net Limited, // OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), // O=Entrust.net - "6DC47172E01CBCB0BF62580D895FE2B8AC9AD4F873801E0C10B9C837D21EB177", - // cacerts alias: affirmtrustcommercialca - // DN: CN=AffirmTrust Commercial, O=AffirmTrust, C=US - "0376AB1D54C5F9803CE4B2E201A0EE7EEF7B57B636E8A93C9B8D4860C96F5FA7", - // cacerts alias: affirmtrustnetworkingca - // DN: CN=AffirmTrust Networking, O=AffirmTrust, C=US - "0A81EC5A929777F145904AF38D5D509F66B5E2C58FCDB531058B0E17F3F0B41B", - // cacerts alias: affirmtrustpremiumca - // DN: CN=AffirmTrust Premium, O=AffirmTrust, C=US - "70A73F7F376B60074248904534B11482D5BF0E698ECC498DF52577EBF2E93B9A", - // cacerts alias: affirmtrustpremiumeccca - // DN: CN=AffirmTrust Premium ECC, O=AffirmTrust, C=US - "BD71FDF6DA97E4CF62D1647ADD2581B07D79ADF8397EB4ECBA9C5E8488821423" + "6DC47172E01CBCB0BF62580D895FE2B8AC9AD4F873801E0C10B9C837D21EB177" ); // Any TLS Server certificate that is anchored by one of the Entrust diff -Nru openjdk-25-25~32ea/src/java.base/share/classes/sun/security/x509/AVA.java openjdk-25-25.0.1+8/src/java.base/share/classes/sun/security/x509/AVA.java --- openjdk-25-25~32ea/src/java.base/share/classes/sun/security/x509/AVA.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/classes/sun/security/x509/AVA.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 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 @@ -28,10 +28,13 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.Reader; +import java.nio.charset.Charset; import java.text.Normalizer; import java.util.*; +import static java.nio.charset.StandardCharsets.ISO_8859_1; import static java.nio.charset.StandardCharsets.UTF_8; +import static java.nio.charset.StandardCharsets.UTF_16BE; import sun.security.util.*; import sun.security.pkcs.PKCS9Attribute; @@ -589,6 +592,10 @@ throw new IOException("AVA, extra bytes = " + derval.data.available()); } + + if (value.tag == DerValue.tag_BMPString) { + value.validateBMPString(); + } } AVA(DerInputStream in) throws IOException { @@ -713,7 +720,8 @@ * NOTE: this implementation only emits DirectoryStrings of the * types returned by isDerString(). */ - String valStr = new String(value.getDataBytes(), UTF_8); + String valStr = + new String(value.getDataBytes(), getCharset(value, false)); /* * 2.4 (cont): If the UTF-8 string does not have any of the @@ -832,7 +840,8 @@ * NOTE: this implementation only emits DirectoryStrings of the * types returned by isDerString(). */ - String valStr = new String(value.getDataBytes(), UTF_8); + String valStr = + new String(value.getDataBytes(), getCharset(value, true)); /* * 2.4 (cont): If the UTF-8 string does not have any of the @@ -927,6 +936,39 @@ } } + /* + * Returns the charset that should be used to decode each DN string type. + * + * This method ensures that multi-byte (UTF8String and BMPString) types + * are decoded using the correct charset and the String forms represent + * the correct characters. For 8-bit ASCII-based types (PrintableString + * and IA5String), we return ISO_8859_1 rather than ASCII, so that the + * complete range of characters can be represented, as many certificates + * do not comply with the Internationalized Domain Name ACE format. + * + * NOTE: this method only supports DirectoryStrings of the types returned + * by isDerString(). + */ + private static Charset getCharset(DerValue value, boolean canonical) { + if (canonical) { + return switch (value.tag) { + case DerValue.tag_PrintableString -> ISO_8859_1; + case DerValue.tag_UTF8String -> UTF_8; + default -> throw new Error("unexpected tag: " + value.tag); + }; + } + + return switch (value.tag) { + case DerValue.tag_PrintableString, + DerValue.tag_T61String, + DerValue.tag_IA5String, + DerValue.tag_GeneralString -> ISO_8859_1; + case DerValue.tag_BMPString -> UTF_16BE; + case DerValue.tag_UTF8String -> UTF_8; + default -> throw new Error("unexpected tag: " + value.tag); + }; + } + boolean hasRFC2253Keyword() { return AVAKeyword.hasKeyword(oid, RFC2253); } diff -Nru openjdk-25-25~32ea/src/java.base/share/data/cacerts/affirmtrustcommercialca openjdk-25-25.0.1+8/src/java.base/share/data/cacerts/affirmtrustcommercialca --- openjdk-25-25~32ea/src/java.base/share/data/cacerts/affirmtrustcommercialca 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/data/cacerts/affirmtrustcommercialca 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -Owner: CN=AffirmTrust Commercial, O=AffirmTrust, C=US -Issuer: CN=AffirmTrust Commercial, O=AffirmTrust, C=US -Serial number: 7777062726a9b17c -Valid from: Fri Jan 29 14:06:06 GMT 2010 until: Tue Dec 31 14:06:06 GMT 2030 -Signature algorithm name: SHA256withRSA -Subject Public Key Algorithm: 2048-bit RSA key -Version: 3 ------BEGIN CERTIFICATE----- -MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UE -BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz -dCBDb21tZXJjaWFsMB4XDTEwMDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDEL -MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp -cm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC -AQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6EqdbDuKP -Hx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yr -ba0F8PrVC8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPAL -MeIrJmqbTFeurCA+ukV6BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1 -yHp52UKqK39c/s4mT6NmgTWvRLpUHhwwMmWd5jyTXlBOeuM61G7MGvv50jeuJCqr -VwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNVHQ4EFgQUnZPGU4teyq8/ -nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ -KoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYG -XUPGhi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNj -vbz4YYCanrHOQnDiqX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivt -Z8SOyUOyXGsViQK8YvxO8rUzqrJv0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9g -N53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0khsUlHRUe072o0EclNmsxZt9YC -nlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8= ------END CERTIFICATE----- diff -Nru openjdk-25-25~32ea/src/java.base/share/data/cacerts/affirmtrustnetworkingca openjdk-25-25.0.1+8/src/java.base/share/data/cacerts/affirmtrustnetworkingca --- openjdk-25-25~32ea/src/java.base/share/data/cacerts/affirmtrustnetworkingca 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/data/cacerts/affirmtrustnetworkingca 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -Owner: CN=AffirmTrust Networking, O=AffirmTrust, C=US -Issuer: CN=AffirmTrust Networking, O=AffirmTrust, C=US -Serial number: 7c4f04391cd4992d -Valid from: Fri Jan 29 14:08:24 GMT 2010 until: Tue Dec 31 14:08:24 GMT 2030 -Signature algorithm name: SHA1withRSA -Subject Public Key Algorithm: 2048-bit RSA key -Version: 3 ------BEGIN CERTIFICATE----- -MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UE -BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVz -dCBOZXR3b3JraW5nMB4XDTEwMDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDEL -MAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZp -cm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC -AQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SEHi3y -YJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbua -kCNrmreIdIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRL -QESxG9fhwoXA3hA/Pe24/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp -6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gbh+0t+nvujArjqWaJGctB+d1ENmHP4ndG -yH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNVHQ4EFgQUBx/S55zawm6i -QLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJ -KoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfO -tDIuUFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzu -QY0x2+c06lkh1QF612S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZ -Lgo/bNjR9eUJtGxUAArgFU2HdW23WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4u -olu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9/ZFvgrG+CJPbFEfxojfHRZ48 -x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s= ------END CERTIFICATE----- diff -Nru openjdk-25-25~32ea/src/java.base/share/data/cacerts/affirmtrustpremiumca openjdk-25-25.0.1+8/src/java.base/share/data/cacerts/affirmtrustpremiumca --- openjdk-25-25~32ea/src/java.base/share/data/cacerts/affirmtrustpremiumca 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/data/cacerts/affirmtrustpremiumca 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -Owner: CN=AffirmTrust Premium, O=AffirmTrust, C=US -Issuer: CN=AffirmTrust Premium, O=AffirmTrust, C=US -Serial number: 6d8c1446b1a60aee -Valid from: Fri Jan 29 14:10:36 GMT 2010 until: Mon Dec 31 14:10:36 GMT 2040 -Signature algorithm name: SHA384withRSA -Subject Public Key Algorithm: 4096-bit RSA key -Version: 3 ------BEGIN CERTIFICATE----- -MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UE -BhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVz -dCBQcmVtaXVtMB4XDTEwMDEyOTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkG -A1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1U -cnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAxBLf -qV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtnBKAQ -JG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ -+jjeRFcV5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrS -s8PhaJyJ+HoAVt70VZVs+7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5 -HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmdGPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d7 -70O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5Rp9EixAqnOEhss/n/fauG -V+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NIS+LI+H+S -qHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S -5u046uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4Ia -C1nEWTJ3s7xgaVY5/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TX -OwF0lkLgAOIua+rF7nKsu7/+6qqo+Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYE -FJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/ -BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByvMiPIs0laUZx2 -KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg -Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B -8OWycvpEgjNC6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQ -MKSOyARiqcTtNd56l+0OOF6SL5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc -0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK+4w1IX2COPKpVJEZNZOUbWo6xbLQ -u4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmVBtWVyuEklut89pMF -u+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFgIxpH -YoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8 -GKa1qF60g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaO -RtGdFNrHF+QFlozEJLUbzxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6e -KeC2uAloGRwYQw== ------END CERTIFICATE----- diff -Nru openjdk-25-25~32ea/src/java.base/share/data/cacerts/affirmtrustpremiumeccca openjdk-25-25.0.1+8/src/java.base/share/data/cacerts/affirmtrustpremiumeccca --- openjdk-25-25~32ea/src/java.base/share/data/cacerts/affirmtrustpremiumeccca 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/data/cacerts/affirmtrustpremiumeccca 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -Owner: CN=AffirmTrust Premium ECC, O=AffirmTrust, C=US -Issuer: CN=AffirmTrust Premium ECC, O=AffirmTrust, C=US -Serial number: 7497258ac73f7a54 -Valid from: Fri Jan 29 14:20:24 GMT 2010 until: Mon Dec 31 14:20:24 GMT 2040 -Signature algorithm name: SHA384withECDSA -Subject Public Key Algorithm: 384-bit EC (secp384r1) key -Version: 3 ------BEGIN CERTIFICATE----- -MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMC -VVMxFDASBgNVBAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQ -cmVtaXVtIEVDQzAeFw0xMDAxMjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJ -BgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1UcnVzdDEgMB4GA1UEAwwXQWZmaXJt -VHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQNMF4bFZ0D -0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQN8O9 -ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0G -A1UdDgQWBBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4G -A1UdDwEB/wQEAwIBBjAKBggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/Vs -aobgxCd05DhT1wV/GzTjxi+zygk8N53X57hG8f2h4nECMEJZh0PUUd+60wkyWs6I -flc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKMeQ== ------END CERTIFICATE----- diff -Nru openjdk-25-25~32ea/src/java.base/share/data/currency/CurrencyData.properties openjdk-25-25.0.1+8/src/java.base/share/data/currency/CurrencyData.properties --- openjdk-25-25~32ea/src/java.base/share/data/currency/CurrencyData.properties 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/data/currency/CurrencyData.properties 2025-09-25 16:16:56.000000000 +0000 @@ -32,7 +32,7 @@ # Version of the currency code information in this class. # It is a serial number that accompanies with each amendment. -dataVersion=179 +dataVersion=180 # List of all valid ISO 4217 currency codes. # To ensure compatibility, do not remove codes. @@ -147,7 +147,7 @@ # BRUNEI DARUSSALAM BN=BND # BULGARIA -BG=BGN +BG=BGN;2025-12-31-22-00-00;EUR # BURKINA FASO BF=XOF # BURUNDI @@ -193,7 +193,7 @@ # CUBA CU=CUP # Curaçao -CW=ANG;2025-04-01-04-00-00;XCG +CW=XCG # CYPRUS CY=EUR # CZECHIA @@ -510,7 +510,7 @@ # SVALBARD AND JAN MAYEN SJ=NOK # Sint Maarten (Dutch part) -SX=ANG;2025-04-01-04-00-00;XCG +SX=XCG # ESWATINI SZ=SZL # SWEDEN diff -Nru openjdk-25-25~32ea/src/java.base/share/man/java.md openjdk-25-25.0.1+8/src/java.base/share/man/java.md --- openjdk-25-25~32ea/src/java.base/share/man/java.md 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/man/java.md 2025-09-25 16:16:56.000000000 +0000 @@ -2817,9 +2817,8 @@ `-XX:+UseNUMA` : Enables performance optimization of an application on a machine with nonuniform memory architecture (NUMA) by increasing the application's use - of lower latency memory. By default, this option is disabled and no - optimization for NUMA is made. The option is available only when the - parallel garbage collector is used (`-XX:+UseParallelGC`). + of lower latency memory. The default value for this option depends on the + garbage collector. `-XX:+UseParallelGC` : Enables the use of the parallel scavenge garbage collector (also known as diff -Nru openjdk-25-25~32ea/src/java.base/share/native/libverify/check_code.c openjdk-25-25.0.1+8/src/java.base/share/native/libverify/check_code.c --- openjdk-25-25~32ea/src/java.base/share/native/libverify/check_code.c 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.base/share/native/libverify/check_code.c 2025-09-25 16:16:56.000000000 +0000 @@ -395,7 +395,8 @@ static void initialize_exception_table(context_type *); static int instruction_length(unsigned char *iptr, unsigned char *end); -static jboolean isLegalTarget(context_type *, int offset); +static jboolean isLegalOffset(context_type *, int bci, int offset); +static jboolean isLegalTarget(context_type *, int target); static void verify_constant_pool_type(context_type *, int, unsigned); static void initialize_dataflow(context_type *); @@ -1154,9 +1155,9 @@ case JVM_OPC_goto: { /* Set the ->operand to be the instruction number of the target. */ int jump = (((signed char)(code[offset+1])) << 8) + code[offset+2]; - int target = offset + jump; - if (!isLegalTarget(context, target)) + if (!isLegalOffset(context, offset, jump)) CCerror(context, "Illegal target of jump or branch"); + int target = offset + jump; this_idata->operand.i = code_data[target]; break; } @@ -1170,9 +1171,9 @@ int jump = (((signed char)(code[offset+1])) << 24) + (code[offset+2] << 16) + (code[offset+3] << 8) + (code[offset + 4]); - int target = offset + jump; - if (!isLegalTarget(context, target)) + if (!isLegalOffset(context, offset, jump)) CCerror(context, "Illegal target of jump or branch"); + int target = offset + jump; this_idata->operand.i = code_data[target]; break; } @@ -1211,13 +1212,16 @@ } } saved_operand = NEW(int, keys + 2); - if (!isLegalTarget(context, offset + _ck_ntohl(lpc[0]))) + int jump = _ck_ntohl(lpc[0]); + if (!isLegalOffset(context, offset, jump)) CCerror(context, "Illegal default target in switch"); - saved_operand[keys + 1] = code_data[offset + _ck_ntohl(lpc[0])]; + int target = offset + jump; + saved_operand[keys + 1] = code_data[target]; for (k = keys, lptr = &lpc[3]; --k >= 0; lptr += delta) { - int target = offset + _ck_ntohl(lptr[0]); - if (!isLegalTarget(context, target)) + jump = _ck_ntohl(lptr[0]); + if (!isLegalOffset(context, offset, jump)) CCerror(context, "Illegal branch in tableswitch"); + target = offset + jump; saved_operand[k + 1] = code_data[target]; } saved_operand[0] = keys + 1; /* number of successors */ @@ -1746,11 +1750,24 @@ /* Given the target of a branch, make sure that it's a legal target. */ static jboolean -isLegalTarget(context_type *context, int offset) +isLegalTarget(context_type *context, int target) +{ + int code_length = context->code_length; + int *code_data = context->code_data; + return (target >= 0 && target < code_length && code_data[target] >= 0); +} + +/* Given a bci and offset, make sure the offset is valid and the target is legal */ +static jboolean +isLegalOffset(context_type *context, int bci, int offset) { int code_length = context->code_length; int *code_data = context->code_data; - return (offset >= 0 && offset < code_length && code_data[offset] >= 0); + int max_offset = 65535; // JVMS 4.11 + int min_offset = -65535; + if (offset < min_offset || offset > max_offset) return JNI_FALSE; + int target = bci + offset; + return (target >= 0 && target < code_length && code_data[target] >= 0); } diff -Nru openjdk-25-25~32ea/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java openjdk-25-25.0.1+8/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java --- openjdk-25-25~32ea/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 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,10 +26,13 @@ package com.sun.java.swing; import java.applet.Applet; +import java.awt.Color; import java.awt.Component; import java.awt.Container; import java.awt.Graphics; import java.awt.Graphics2D; +import java.awt.Insets; +import java.awt.Rectangle; import java.awt.Stroke; import java.awt.Window; import java.awt.geom.AffineTransform; @@ -37,11 +40,16 @@ import java.util.Map; import java.util.WeakHashMap; +import javax.swing.ButtonModel; +import javax.swing.Icon; import javax.swing.JComponent; +import javax.swing.JMenu; import javax.swing.RepaintManager; import sun.awt.AppContext; import sun.awt.SunToolkit; +import sun.swing.MenuItemLayoutHelper; +import sun.swing.SwingUtilities2; import static sun.java2d.pipe.Region.clipRound; @@ -64,6 +72,10 @@ private static final Object DELEGATE_REPAINT_MANAGER_KEY = new StringBuilder("DelegateRepaintManagerKey"); + private static Color disabledForeground; + private static Color acceleratorSelectionForeground; + private static Color acceleratorForeground; + /** * Registers delegate RepaintManager for {@code JComponent}. */ @@ -143,6 +155,128 @@ return delegate; } + public static void applyInsets(Rectangle rect, Insets insets) { + if (insets != null) { + rect.x += insets.left; + rect.y += insets.top; + rect.width -= (insets.right + rect.x); + rect.height -= (insets.bottom + rect.y); + } + } + + public static void paintCheckIcon(Graphics g, MenuItemLayoutHelper lh, + MenuItemLayoutHelper.LayoutResult lr, + Color holdc, Color foreground) { + if (lh.getCheckIcon() != null) { + ButtonModel model = lh.getMenuItem().getModel(); + if (model.isArmed() || (lh.getMenuItem() instanceof JMenu + && model.isSelected())) { + g.setColor(foreground); + } else { + g.setColor(holdc); + } + if (lh.useCheckAndArrow()) { + lh.getCheckIcon().paintIcon(lh.getMenuItem(), g, + lr.getCheckRect().x, lr.getCheckRect().y); + } + g.setColor(holdc); + } + } + + public static void paintIcon(Graphics g, MenuItemLayoutHelper lh, + MenuItemLayoutHelper.LayoutResult lr, Color holdc) { + if (lh.getIcon() != null) { + Icon icon; + ButtonModel model = lh.getMenuItem().getModel(); + if (!model.isEnabled()) { + icon = lh.getMenuItem().getDisabledIcon(); + } else if (model.isPressed() && model.isArmed()) { + icon = lh.getMenuItem().getPressedIcon(); + if (icon == null) { + // Use default icon + icon = lh.getMenuItem().getIcon(); + } + } else { + icon = lh.getMenuItem().getIcon(); + } + + if (icon != null) { + icon.paintIcon(lh.getMenuItem(), g, lr.getIconRect().x, + lr.getIconRect().y); + g.setColor(holdc); + } + } + } + + + public static void paintAccText(Graphics g, MenuItemLayoutHelper lh, + MenuItemLayoutHelper.LayoutResult lr) { + if (!lh.getAccText().isEmpty()) { + ButtonModel model = lh.getMenuItem().getModel(); + g.setFont(lh.getAccFontMetrics().getFont()); + if (!model.isEnabled()) { + + // paint the accText disabled + if (disabledForeground != null) { + g.setColor(disabledForeground); + SwingUtilities2.drawString(lh.getMenuItem(), g, + lh.getAccText(), lr.getAccRect().x, + lr.getAccRect().y + lh.getAccFontMetrics().getAscent()); + } else { + g.setColor(lh.getMenuItem().getBackground().brighter()); + SwingUtilities2.drawString(lh.getMenuItem(), g, + lh.getAccText(), lr.getAccRect().x, + lr.getAccRect().y + lh.getAccFontMetrics().getAscent()); + g.setColor(lh.getMenuItem().getBackground().darker()); + SwingUtilities2.drawString(lh.getMenuItem(), g, + lh.getAccText(), lr.getAccRect().x - 1, + lr.getAccRect().y + lh.getFontMetrics().getAscent() - 1); + } + } else { + + // paint the accText normally + if (model.isArmed() + || (lh.getMenuItem() instanceof JMenu + && model.isSelected())) { + g.setColor(acceleratorSelectionForeground); + } else { + g.setColor(acceleratorForeground); + } + SwingUtilities2.drawString(lh.getMenuItem(), g, lh.getAccText(), + lr.getAccRect().x, lr.getAccRect().y + + lh.getAccFontMetrics().getAscent()); + } + } + } + + public static void setDisabledForeground(Color disabledFg) { + disabledForeground = disabledFg; + } + + public static void setAcceleratorSelectionForeground(Color acceleratorSelectionFg) { + acceleratorSelectionForeground = acceleratorSelectionFg; + } + + public static void setAcceleratorForeground(Color acceleratorFg) { + acceleratorForeground = acceleratorFg; + } + + public static void paintArrowIcon(Graphics g, MenuItemLayoutHelper lh, + MenuItemLayoutHelper.LayoutResult lr, + Color foreground) { + if (lh.getArrowIcon() != null) { + ButtonModel model = lh.getMenuItem().getModel(); + if (model.isArmed() || (lh.getMenuItem() instanceof JMenu + && model.isSelected())) { + g.setColor(foreground); + } + if (lh.useCheckAndArrow()) { + lh.getArrowIcon().paintIcon(lh.getMenuItem(), g, + lr.getArrowRect().x, lr.getArrowRect().y); + } + } + } + /** * A task which paints an unscaled border after {@code Graphics} * transforms are removed. It's used with the diff -Nru openjdk-25-25~32ea/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java openjdk-25-25.0.1+8/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java --- openjdk-25-25~32ea/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -25,17 +25,52 @@ package javax.swing.plaf.basic; -import java.awt.*; -import java.awt.event.*; +import java.awt.Color; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.Insets; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.event.ActionEvent; +import java.awt.event.InputEvent; +import java.awt.event.MouseEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; -import javax.swing.*; -import javax.swing.event.*; -import javax.swing.plaf.*; +import javax.swing.ButtonModel; +import javax.swing.Icon; +import javax.swing.InputMap; +import javax.swing.JCheckBoxMenuItem; +import javax.swing.JComponent; +import javax.swing.JMenu; +import javax.swing.JMenuItem; +import javax.swing.JRadioButtonMenuItem; +import javax.swing.KeyStroke; +import javax.swing.LookAndFeel; +import javax.swing.MenuElement; +import javax.swing.MenuSelectionManager; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; +import javax.swing.event.MenuDragMouseEvent; +import javax.swing.event.MenuDragMouseListener; +import javax.swing.event.MenuKeyListener; + +import javax.swing.event.MouseInputListener; +import javax.swing.plaf.ComponentInputMapUIResource; +import javax.swing.plaf.ComponentUI; +import javax.swing.plaf.MenuItemUI; +import javax.swing.plaf.UIResource; import javax.swing.text.View; -import sun.swing.*; +import com.sun.java.swing.SwingUtilities3; +import sun.swing.MenuItemCheckIconFactory; +import sun.swing.MenuItemLayoutHelper; +import sun.swing.SwingUtilities2; +import sun.swing.UIAction; + /** * BasicMenuItem implementation @@ -670,84 +705,22 @@ private void paintIcon(Graphics g, MenuItemLayoutHelper lh, MenuItemLayoutHelper.LayoutResult lr, Color holdc) { - if (lh.getIcon() != null) { - Icon icon; - ButtonModel model = lh.getMenuItem().getModel(); - if (!model.isEnabled()) { - icon = lh.getMenuItem().getDisabledIcon(); - } else if (model.isPressed() && model.isArmed()) { - icon = lh.getMenuItem().getPressedIcon(); - if (icon == null) { - // Use default icon - icon = lh.getMenuItem().getIcon(); - } - } else { - icon = lh.getMenuItem().getIcon(); - } - - if (icon != null) { - icon.paintIcon(lh.getMenuItem(), g, lr.getIconRect().x, - lr.getIconRect().y); - g.setColor(holdc); - } - } + SwingUtilities3.paintIcon(g, lh, lr, holdc); } private void paintCheckIcon(Graphics g, MenuItemLayoutHelper lh, MenuItemLayoutHelper.LayoutResult lr, Color holdc, Color foreground) { - if (lh.getCheckIcon() != null) { - ButtonModel model = lh.getMenuItem().getModel(); - if (model.isArmed() || (lh.getMenuItem() instanceof JMenu - && model.isSelected())) { - g.setColor(foreground); - } else { - g.setColor(holdc); - } - if (lh.useCheckAndArrow()) { - lh.getCheckIcon().paintIcon(lh.getMenuItem(), g, - lr.getCheckRect().x, lr.getCheckRect().y); - } - g.setColor(holdc); - } + SwingUtilities3.paintCheckIcon(g, lh, lr, holdc, foreground); } private void paintAccText(Graphics g, MenuItemLayoutHelper lh, MenuItemLayoutHelper.LayoutResult lr) { - if (!lh.getAccText().isEmpty()) { - ButtonModel model = lh.getMenuItem().getModel(); - g.setFont(lh.getAccFontMetrics().getFont()); - if (!model.isEnabled()) { - // *** paint the accText disabled - if (disabledForeground != null) { - g.setColor(disabledForeground); - SwingUtilities2.drawString(lh.getMenuItem(), g, - lh.getAccText(), lr.getAccRect().x, - lr.getAccRect().y + lh.getAccFontMetrics().getAscent()); - } else { - g.setColor(lh.getMenuItem().getBackground().brighter()); - SwingUtilities2.drawString(lh.getMenuItem(), g, - lh.getAccText(), lr.getAccRect().x, - lr.getAccRect().y + lh.getAccFontMetrics().getAscent()); - g.setColor(lh.getMenuItem().getBackground().darker()); - SwingUtilities2.drawString(lh.getMenuItem(), g, - lh.getAccText(), lr.getAccRect().x - 1, - lr.getAccRect().y + lh.getFontMetrics().getAscent() - 1); - } - } else { - // *** paint the accText normally - if (model.isArmed() - || (lh.getMenuItem() instanceof JMenu - && model.isSelected())) { - g.setColor(acceleratorSelectionForeground); - } else { - g.setColor(acceleratorForeground); - } - SwingUtilities2.drawString(lh.getMenuItem(), g, lh.getAccText(), - lr.getAccRect().x, lr.getAccRect().y + - lh.getAccFontMetrics().getAscent()); - } - } + SwingUtilities3.setDisabledForeground(disabledForeground); + SwingUtilities3.setAcceleratorSelectionForeground( + acceleratorSelectionForeground); + SwingUtilities3.setAcceleratorForeground(acceleratorForeground); + SwingUtilities3.paintAccText(g, lh, lr); } private void paintText(Graphics g, MenuItemLayoutHelper lh, @@ -766,26 +739,11 @@ private void paintArrowIcon(Graphics g, MenuItemLayoutHelper lh, MenuItemLayoutHelper.LayoutResult lr, Color foreground) { - if (lh.getArrowIcon() != null) { - ButtonModel model = lh.getMenuItem().getModel(); - if (model.isArmed() || (lh.getMenuItem() instanceof JMenu - && model.isSelected())) { - g.setColor(foreground); - } - if (lh.useCheckAndArrow()) { - lh.getArrowIcon().paintIcon(lh.getMenuItem(), g, - lr.getArrowRect().x, lr.getArrowRect().y); - } - } + SwingUtilities3.paintArrowIcon(g, lh, lr, foreground); } private void applyInsets(Rectangle rect, Insets insets) { - if(insets != null) { - rect.x += insets.left; - rect.y += insets.top; - rect.width -= (insets.right + rect.x); - rect.height -= (insets.bottom + rect.y); - } + SwingUtilities3.applyInsets(rect, insets); } /** diff -Nru openjdk-25-25~32ea/src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c openjdk-25-25.0.1+8/src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c --- openjdk-25-25~32ea/src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.desktop/unix/native/libawt_xawt/awt/screencast_pipewire.c 2025-09-25 16:16:56.000000000 +0000 @@ -33,6 +33,7 @@ #ifndef _AIX #include "screencast_pipewire.h" +#include "java_awt_event_KeyEvent.h" struct pw_buffer *(*fp_pw_stream_dequeue_buffer)(struct pw_stream *stream); const char * (*fp_pw_stream_state_as_string)(enum pw_stream_state state); @@ -1016,6 +1017,7 @@ const gchar *token = jtoken ? (*env)->GetStringUTFChars(env, jtoken, NULL) : NULL; + JNU_CHECK_EXCEPTION_RETURN(env, RESULT_ERROR); isGtkMainThread = gtk->g_main_context_is_owner(gtk->g_main_context_default()); DEBUG_SCREENCAST( @@ -1121,7 +1123,7 @@ const gchar *token = jtoken ? (*env)->GetStringUTFChars(env, jtoken, NULL) : NULL; - + JNU_CHECK_EXCEPTION_RETURN(env, RESULT_ERROR); DEBUG_SCREENCAST("moving mouse to\n\t%d %d\n\twith token |%s|\n", jx, jy, token); @@ -1151,6 +1153,7 @@ const gchar *token = jtoken ? (*env)->GetStringUTFChars(env, jtoken, NULL) : NULL; + JNU_CHECK_EXCEPTION_RETURN(env, RESULT_ERROR); gboolean result = initPortal(token, NULL, 0); DEBUG_SCREENCAST("init result %b, mouse pressing %d\n", result, buttons) @@ -1178,6 +1181,7 @@ const gchar *token = jtoken ? (*env)->GetStringUTFChars(env, jtoken, NULL) : NULL; + JNU_CHECK_EXCEPTION_RETURN(env, RESULT_ERROR); gboolean result = initPortal(token, NULL, 0); DEBUG_SCREENCAST("init result %b, mouse wheel %d\n", result, jWheelAmt) @@ -1194,6 +1198,24 @@ return result ? RESULT_OK : pw.pwFd; } +static int getNumpadKey(jint jkey) { + switch (jkey) { + case java_awt_event_KeyEvent_VK_NUMPAD0: return XK_KP_Insert; + case java_awt_event_KeyEvent_VK_NUMPAD1: return XK_KP_End; + case java_awt_event_KeyEvent_VK_NUMPAD2: return XK_KP_Down; + case java_awt_event_KeyEvent_VK_NUMPAD3: return XK_KP_Page_Down; + case java_awt_event_KeyEvent_VK_NUMPAD4: return XK_KP_Left; + case java_awt_event_KeyEvent_VK_NUMPAD5: return XK_KP_Begin; + case java_awt_event_KeyEvent_VK_NUMPAD6: return XK_KP_Right; + case java_awt_event_KeyEvent_VK_NUMPAD7: return XK_KP_Home; + case java_awt_event_KeyEvent_VK_NUMPAD8: return XK_KP_Up; + case java_awt_event_KeyEvent_VK_NUMPAD9: return XK_KP_Prior; + case java_awt_event_KeyEvent_VK_DECIMAL: + case java_awt_event_KeyEvent_VK_SEPARATOR: return XK_KP_Delete; + default: return 0; + } +} + /* * Class: sun_awt_screencast_ScreencastHelper * Method: remoteDesktopKeyImpl @@ -1202,17 +1224,21 @@ JNIEXPORT jint JNICALL Java_sun_awt_screencast_ScreencastHelper_remoteDesktopKeyImpl (JNIEnv *env, jclass cls, jboolean isPress, jint jkey, jstring jtoken) { - AWT_LOCK(); - int key = awt_getX11KeySym(jkey); - AWT_UNLOCK(); + int key = getNumpadKey(jkey); + if (!key) { + AWT_LOCK(); + key = awt_getX11KeySym(jkey); + AWT_UNLOCK(); + } - if (key == NoSymbol) { + if (key == NoSymbol || (*env)->ExceptionCheck(env)) { return RESULT_ERROR; } const gchar *token = jtoken ? (*env)->GetStringUTFChars(env, jtoken, NULL) : NULL; + JNU_CHECK_EXCEPTION_RETURN(env, RESULT_ERROR); gboolean result = initPortal(token, NULL, 0); DEBUG_SCREENCAST("init result %b, key %d -> %d isPress %b\n", result, jkey, key, isPress) diff -Nru openjdk-25-25~32ea/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxMenuItemUI.java openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxMenuItemUI.java --- openjdk-25-25~32ea/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxMenuItemUI.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxMenuItemUI.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -30,6 +30,7 @@ import java.awt.Rectangle; import javax.swing.ButtonModel; +import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.JMenuItem; import javax.swing.plaf.ComponentUI; @@ -73,6 +74,24 @@ } super.paintBackground(g, menuItem, bgColor); } + + /** + * Paint MenuItem. + */ + protected void paintMenuItem(Graphics g, JComponent c, + Icon checkIcon, Icon arrowIcon, + Color background, Color foreground, + int defaultTextIconGap) { + if (WindowsMenuItemUI.isVistaPainting()) { + WindowsMenuItemUI.paintMenuItem(accessor, g, c, checkIcon, + arrowIcon, background, foreground, defaultTextIconGap, + menuItem, getPropertyPrefix()); + return; + } + super.paintMenuItem(g, c, checkIcon, arrowIcon, background, + foreground, defaultTextIconGap); + } + /** * Method which renders the text of the current menu item. * diff -Nru openjdk-25-25~32ea/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java --- openjdk-25-25~32ea/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2023, 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 @@ -880,6 +880,7 @@ } assert menuItem == null || c == menuItem; Icon icon = getIcon(); + if (type == JCheckBoxMenuItem.class || type == JRadioButtonMenuItem.class) { AbstractButton b = (AbstractButton) c; @@ -903,19 +904,18 @@ } XPStyle xp = XPStyle.getXP(); if (xp != null) { - Skin skin; - skin = xp.getSkin(c, backgroundPart); - skin.paintSkin(g, x, y, - getIconWidth(), getIconHeight(), backgroundState); - if (icon == null) { - skin = xp.getSkin(c, part); + Skin skin = xp.getSkin(c, part); + if (icon == null || icon.getIconHeight() <= 16) { skin.paintSkin(g, x + OFFSET, y + OFFSET, state); + } else { + skin.paintSkin(g, x + OFFSET, y + icon.getIconHeight() / 2, state); } } } } if (icon != null) { - icon.paintIcon(c, g, x + OFFSET, y + OFFSET); + icon.paintIcon(c, g, x + VistaMenuItemCheckIconFactory.getIconWidth(), + y + OFFSET); } } private static WindowsMenuItemUIAccessor getAccessor( diff -Nru openjdk-25-25~32ea/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java --- openjdk-25-25~32ea/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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,13 +26,20 @@ package com.sun.java.swing.plaf.windows; import java.awt.Color; +import java.awt.Font; import java.awt.FontMetrics; import java.awt.Graphics; +import java.awt.Insets; import java.awt.Rectangle; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; +import java.util.Enumeration; +import javax.swing.AbstractButton; +import javax.swing.ButtonGroup; import javax.swing.ButtonModel; +import javax.swing.DefaultButtonModel; +import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.JMenu; import javax.swing.JMenuItem; @@ -41,6 +48,7 @@ import javax.swing.plaf.UIResource; import javax.swing.plaf.basic.BasicMenuItemUI; +import com.sun.java.swing.SwingUtilities3; import com.sun.java.swing.plaf.windows.TMSchema.Part; import com.sun.java.swing.plaf.windows.TMSchema.State; import com.sun.java.swing.plaf.windows.XPStyle.Skin; @@ -59,6 +67,9 @@ * The instance of {@code PropertyChangeListener}. */ private PropertyChangeListener changeListener; + private static Color disabledForeground; + private static Color acceleratorSelectionForeground; + private static Color acceleratorForeground; final WindowsMenuItemUIAccessor accessor = new WindowsMenuItemUIAccessor() { @@ -123,6 +134,27 @@ menuItem.addPropertyChangeListener(changeListener); } + protected void installDefaults() { + super.installDefaults(); + String prefix = getPropertyPrefix(); + + if (acceleratorSelectionForeground == null || + acceleratorSelectionForeground instanceof UIResource) { + acceleratorSelectionForeground = + UIManager.getColor(prefix + ".acceleratorSelectionForeground"); + } + if (acceleratorForeground == null || + acceleratorForeground instanceof UIResource) { + acceleratorForeground = + UIManager.getColor(prefix + ".acceleratorForeground"); + } + if (disabledForeground == null || + disabledForeground instanceof UIResource) { + disabledForeground = + UIManager.getColor(prefix + ".disabledForeground"); + } + } + /** * {@inheritDoc} */ @@ -135,6 +167,114 @@ changeListener = null; } + private static void applyInsets(Rectangle rect, Insets insets) { + SwingUtilities3.applyInsets(rect, insets); + } + + private static void paintCheckIcon(Graphics g, MenuItemLayoutHelper lh, + MenuItemLayoutHelper.LayoutResult lr, + Color holdc, Color foreground) { + SwingUtilities3.paintCheckIcon(g, lh, lr, holdc, foreground); + } + + private static void paintIcon(Graphics g, MenuItemLayoutHelper lh, + MenuItemLayoutHelper.LayoutResult lr, Color holdc) { + SwingUtilities3.paintIcon(g, lh, lr, holdc); + } + + private static void paintAccText(Graphics g, MenuItemLayoutHelper lh, + MenuItemLayoutHelper.LayoutResult lr) { + SwingUtilities3.setDisabledForeground(disabledForeground); + SwingUtilities3.setAcceleratorSelectionForeground( + acceleratorSelectionForeground); + SwingUtilities3.setAcceleratorForeground(acceleratorForeground); + SwingUtilities3.paintAccText(g, lh, lr); + } + + private static void paintArrowIcon(Graphics g, MenuItemLayoutHelper lh, + MenuItemLayoutHelper.LayoutResult lr, + Color foreground) { + SwingUtilities3.paintArrowIcon(g, lh, lr, foreground); + } + + protected void paintMenuItem(Graphics g, JComponent c, + Icon checkIcon, Icon arrowIcon, + Color background, Color foreground, + int defaultTextIconGap) { + if (WindowsMenuItemUI.isVistaPainting()) { + WindowsMenuItemUI.paintMenuItem(accessor, g, c, checkIcon, + arrowIcon, background, foreground, + defaultTextIconGap, menuItem, + getPropertyPrefix()); + return; + } + super.paintMenuItem(g, c, checkIcon, arrowIcon, background, + foreground, defaultTextIconGap); + } + + static void paintMenuItem(WindowsMenuItemUIAccessor accessor, Graphics g, + JComponent c, Icon checkIcon, Icon arrowIcon, + Color background, Color foreground, + int defaultTextIconGap, JMenuItem menuItem, String prefix) { + // Save original graphics font and color + Font holdf = g.getFont(); + Color holdc = g.getColor(); + + JMenuItem mi = (JMenuItem) c; + g.setFont(mi.getFont()); + + Rectangle viewRect = new Rectangle(0, 0, mi.getWidth(), mi.getHeight()); + applyInsets(viewRect, mi.getInsets()); + + String acceleratorDelimiter = + UIManager.getString("MenuItem.acceleratorDelimiter"); + if (acceleratorDelimiter == null) { acceleratorDelimiter = "+"; } + Font acceleratorFont = UIManager.getFont("MenuItem.acceleratorFont"); + if (acceleratorFont == null) { + acceleratorFont = UIManager.getFont("MenuItem.font"); + } + + MenuItemLayoutHelper lh = new MenuItemLayoutHelper(mi, checkIcon, + arrowIcon, viewRect, defaultTextIconGap, acceleratorDelimiter, + mi.getComponentOrientation().isLeftToRight(), mi.getFont(), + acceleratorFont, MenuItemLayoutHelper.useCheckAndArrow(menuItem), + prefix); + MenuItemLayoutHelper.LayoutResult lr = lh.layoutMenuItem(); + + paintBackground(accessor, g, mi, background); + paintCheckIcon(g, lh, lr, holdc, foreground); + paintIcon(g, lh, lr, holdc); + + if (lh.getCheckIcon() != null && lh.useCheckAndArrow()) { + Rectangle rect = lr.getTextRect(); + + rect.x += lh.getAfterCheckIconGap(); + + lr.setTextRect(rect); + } + if (!lh.getText().isEmpty()) { + if (lh.getHtmlView() != null) { + // Text is HTML + lh.getHtmlView().paint(g, lr.getTextRect()); + } else { + // Text isn't HTML + paintText(accessor, g, lh.getMenuItem(), + lr.getTextRect(), lh.getText()); + } + } + if (lh.getCheckIcon() != null && lh.useCheckAndArrow()) { + Rectangle rect = lr.getAccRect(); + rect.x += lh.getAfterCheckIconGap(); + lr.setAccRect(rect); + } + paintAccText(g, lh, lr); + paintArrowIcon(g, lh, lr, foreground); + + // Restore original graphics font and color + g.setColor(holdc); + g.setFont(holdf); + } + /** * Method which renders the text of the current menu item. * diff -Nru openjdk-25-25~32ea/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuUI.java openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuUI.java --- openjdk-25-25~32ea/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuUI.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuUI.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -131,6 +131,25 @@ } /** + * Paint MenuItem. + */ + protected void paintMenuItem(Graphics g, JComponent c, + Icon checkIcon, Icon arrowIcon, + Color background, Color foreground, + int defaultTextIconGap) { + if (WindowsMenuItemUI.isVistaPainting()) { + WindowsMenuItemUI.paintMenuItem(accessor, g, c, checkIcon, arrowIcon, + background, foreground, + defaultTextIconGap, menuItem, + getPropertyPrefix()); + return; + } + super.paintMenuItem(g, c, checkIcon, arrowIcon, background, + foreground, defaultTextIconGap); + } + + + /** * Draws the background of the menu. * @since 1.4 */ diff -Nru openjdk-25-25~32ea/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsRadioButtonMenuItemUI.java openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsRadioButtonMenuItemUI.java --- openjdk-25-25~32ea/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsRadioButtonMenuItemUI.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsRadioButtonMenuItemUI.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 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 @@ -30,6 +30,7 @@ import java.awt.Rectangle; import javax.swing.ButtonModel; +import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.JMenuItem; import javax.swing.plaf.ComponentUI; @@ -75,6 +76,23 @@ } /** + * Paint MenuItem. + */ + protected void paintMenuItem(Graphics g, JComponent c, + Icon checkIcon, Icon arrowIcon, + Color background, Color foreground, + int defaultTextIconGap) { + if (WindowsMenuItemUI.isVistaPainting()) { + WindowsMenuItemUI.paintMenuItem(accessor, g, c, checkIcon, + arrowIcon, background, foreground, defaultTextIconGap, + menuItem, getPropertyPrefix()); + return; + } + super.paintMenuItem(g, c, checkIcon, arrowIcon, background, + foreground, defaultTextIconGap); + } + + /** * Method which renders the text of the current menu item. * * @param g Graphics context diff -Nru openjdk-25-25~32ea/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties openjdk-25-25.0.1+8/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties --- openjdk-25-25~32ea/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties 2025-09-25 16:16:56.000000000 +0000 @@ -328,4 +328,4 @@ CatalogException=JAXP00090001: CatalogResolver ist mit dem Katalog "{0}" aktiviert, eine CatalogException wird jedoch zurückgegeben. # Implementation Property DTD - JDK_DTD_DENY = JAXP00010008: DOCTYPE ist nicht zulässig, wenn die DTD-Eigenschaft auf Ablehnen gesetzt wurde. Weitere Informationen: Eigenschaft jdk.xml.dtd.support in java.xml/module-summary. + JDK_DTD_DENY = JAXP00010008: DOCTYPE ist nicht zulässig, wenn die DTD-Eigenschaft auf "Ablehnen" gesetzt wurde. Weitere Informationen: Eigenschaft jdk.xml.dtd.support in java.xml/module-summary. diff -Nru openjdk-25-25~32ea/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java openjdk-25-25.0.1+8/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java --- openjdk-25-25~32ea/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java 2025-09-25 16:16:56.000000000 +0000 @@ -41,7 +41,7 @@ /** * @author Rajiv Mordani * @author Edwin Goei - * @LastModified: May 2025 + * @LastModified: June 2025 */ public class DocumentBuilderFactoryImpl extends DocumentBuilderFactory { /** These are DocumentBuilderFactory attributes not DOM attributes */ @@ -59,11 +59,24 @@ XMLSecurityManager fSecurityManager; XMLSecurityPropertyManager fSecurityPropertyMgr; + /** + * Creates a new {@code DocumentBuilderFactory} instance. + */ public DocumentBuilderFactoryImpl() { + this(null, null); + } + + /** + * Creates a new {@code DocumentBuilderFactory} instance with a {@code XMLSecurityManager} + * and {@code XMLSecurityPropertyManager}. + * @param xsm the {@code XMLSecurityManager} + * @param xspm the {@code XMLSecurityPropertyManager} + */ + public DocumentBuilderFactoryImpl(XMLSecurityManager xsm, XMLSecurityPropertyManager xspm) { JdkXmlConfig config = JdkXmlConfig.getInstance(false); // security (property) managers updated with current system properties - fSecurityManager = config.getXMLSecurityManager(true); - fSecurityPropertyMgr = config.getXMLSecurityPropertyManager(true); + fSecurityManager = (xsm == null) ? config.getXMLSecurityManager(true) : xsm; + fSecurityPropertyMgr = (xspm == null) ? config.getXMLSecurityPropertyManager(true) : xspm; } /** diff -Nru openjdk-25-25~32ea/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java openjdk-25-25.0.1+8/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java --- openjdk-25-25~32ea/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java 2025-09-25 16:16:56.000000000 +0000 @@ -35,7 +35,7 @@ * * @author Ramesh Mandava * - * @LastModified: May 2025 + * @LastModified: June 2025 */ public class XPathFactoryImpl extends XPathFactory { @@ -72,6 +72,7 @@ * The XML security manager */ private XMLSecurityManager _xmlSecMgr; + private XMLSecurityPropertyManager _xmlSecPropMgr; /** * javax.xml.xpath.XPathFactory implementation. @@ -80,6 +81,7 @@ JdkXmlConfig config = JdkXmlConfig.getInstance(false); _xmlSecMgr = config.getXMLSecurityManager(true); _featureManager = config.getXMLFeatures(true); + _xmlSecPropMgr = config.getXMLSecurityPropertyManager(true); } /** @@ -129,7 +131,7 @@ */ public javax.xml.xpath.XPath newXPath() { return new XPathImpl(xPathVariableResolver, xPathFunctionResolver, - !_isNotSecureProcessing, _featureManager, _xmlSecMgr); + !_isNotSecureProcessing, _featureManager, _xmlSecMgr, _xmlSecPropMgr); } /** @@ -183,6 +185,7 @@ if (value && _featureManager != null) { _featureManager.setFeature(JdkXmlFeatures.XmlFeature.ENABLE_EXTENSION_FUNCTION, JdkProperty.State.FSP, false); + _xmlSecMgr.setSecureProcessing(value); } // all done processing feature @@ -338,8 +341,7 @@ throw new NullPointerException(fmsg); } - if (_xmlSecMgr != null && - _xmlSecMgr.setLimit(name, JdkProperty.State.APIPROPERTY, value)) { + if (JdkXmlUtils.setProperty(_xmlSecMgr, _xmlSecPropMgr, name, value)) { return; } diff -Nru openjdk-25-25~32ea/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java openjdk-25-25.0.1+8/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java --- openjdk-25-25~32ea/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java 2025-09-25 16:16:56.000000000 +0000 @@ -36,6 +36,7 @@ import jdk.xml.internal.JdkXmlConfig; import jdk.xml.internal.JdkXmlFeatures; import jdk.xml.internal.XMLSecurityManager; +import jdk.xml.internal.XMLSecurityPropertyManager; import org.w3c.dom.Document; import org.xml.sax.InputSource; @@ -50,7 +51,7 @@ * New methods: evaluateExpression * Refactored to share code with XPathExpressionImpl. * - * @LastModified: May 2025 + * @LastModified: June 2025 */ public class XPathImpl extends XPathImplUtil implements javax.xml.xpath.XPath { @@ -62,12 +63,13 @@ XPathImpl(XPathVariableResolver vr, XPathFunctionResolver fr) { this(vr, fr, false, JdkXmlConfig.getInstance(false).getXMLFeatures(false), - JdkXmlConfig.getInstance(false).getXMLSecurityManager(false)); + JdkXmlConfig.getInstance(false).getXMLSecurityManager(false), + JdkXmlConfig.getInstance(false).getXMLSecurityPropertyManager(false)); } XPathImpl(XPathVariableResolver vr, XPathFunctionResolver fr, boolean featureSecureProcessing, JdkXmlFeatures featureManager, - XMLSecurityManager xmlSecMgr) { + XMLSecurityManager xmlSecMgr, XMLSecurityPropertyManager xmlSecPropMgr) { this.origVariableResolver = this.variableResolver = vr; this.origFunctionResolver = this.functionResolver = fr; this.featureSecureProcessing = featureSecureProcessing; @@ -75,6 +77,7 @@ overrideDefaultParser = featureManager.getFeature( JdkXmlFeatures.XmlFeature.JDK_OVERRIDE_PARSER); this.xmlSecMgr = xmlSecMgr; + this.xmlSecPropMgr = xmlSecPropMgr; } diff -Nru openjdk-25-25~32ea/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImplUtil.java openjdk-25-25.0.1+8/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImplUtil.java --- openjdk-25-25~32ea/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImplUtil.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/jaxp/XPathImplUtil.java 2025-09-25 16:16:56.000000000 +0000 @@ -31,6 +31,7 @@ import com.sun.org.apache.xpath.internal.objects.XObject; import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; import java.io.IOException; +import javax.xml.XMLConstants; import javax.xml.namespace.QName; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -44,6 +45,7 @@ import jdk.xml.internal.JdkXmlFeatures; import jdk.xml.internal.JdkXmlUtils; import jdk.xml.internal.XMLSecurityManager; +import jdk.xml.internal.XMLSecurityPropertyManager; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.traversal.NodeIterator; @@ -54,7 +56,7 @@ * This class contains several utility methods used by XPathImpl and * XPathExpressionImpl * - * @LastModified: Apr 2025 + * @LastModified: June 2025 */ class XPathImplUtil { XPathFunctionResolver functionResolver; @@ -67,6 +69,7 @@ boolean featureSecureProcessing = false; JdkXmlFeatures featureManager; XMLSecurityManager xmlSecMgr; + XMLSecurityPropertyManager xmlSecPropMgr; /** * Evaluate an XPath context using the internal XPath engine @@ -128,7 +131,12 @@ // // so we really have to create a fresh DocumentBuilder every time we need one // - KK - DocumentBuilderFactory dbf = JdkXmlUtils.getDOMFactory(overrideDefaultParser); + DocumentBuilderFactory dbf = JdkXmlUtils.getDOMFactory( + overrideDefaultParser, xmlSecMgr, xmlSecPropMgr); + if (xmlSecMgr != null && xmlSecMgr.isSecureProcessingSet()) { + dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, + xmlSecMgr.isSecureProcessing()); + } return dbf.newDocumentBuilder().parse(source); } catch (ParserConfigurationException | SAXException | IOException e) { throw new XPathExpressionException (e); diff -Nru openjdk-25-25~32ea/src/java.xml/share/classes/jdk/xml/internal/JdkXmlUtils.java openjdk-25-25.0.1+8/src/java.xml/share/classes/jdk/xml/internal/JdkXmlUtils.java --- openjdk-25-25~32ea/src/java.xml/share/classes/jdk/xml/internal/JdkXmlUtils.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.xml/share/classes/jdk/xml/internal/JdkXmlUtils.java 2025-09-25 16:16:56.000000000 +0000 @@ -445,6 +445,20 @@ * @return a DocumentBuilderFactory instance. */ public static DocumentBuilderFactory getDOMFactory(boolean overrideDefaultParser) { + return getDOMFactory(overrideDefaultParser, null, null); + } + + /** + * {@return a DocumentBuilderFactory instance} + * + * @param overrideDefaultParser a flag indicating whether the system-default + * implementation may be overridden. If the system property of the + * DOM factory ID is set, override is always allowed. + * @param xsm XMLSecurityManager + * @param xspm XMLSecurityPropertyManager + */ + public static DocumentBuilderFactory getDOMFactory(boolean overrideDefaultParser, + XMLSecurityManager xsm, XMLSecurityPropertyManager xspm) { boolean override = overrideDefaultParser; String spDOMFactory = SecuritySupport.getJAXPSystemProperty(DOM_FACTORY_ID); @@ -453,7 +467,7 @@ } DocumentBuilderFactory dbf = !override - ? new DocumentBuilderFactoryImpl() + ? new DocumentBuilderFactoryImpl(xsm, xspm) : DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); // false is the default setting. This step here is for compatibility diff -Nru openjdk-25-25~32ea/src/java.xml/share/classes/jdk/xml/internal/XMLSecurityManager.java openjdk-25-25.0.1+8/src/java.xml/share/classes/jdk/xml/internal/XMLSecurityManager.java --- openjdk-25-25~32ea/src/java.xml/share/classes/jdk/xml/internal/XMLSecurityManager.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/java.xml/share/classes/jdk/xml/internal/XMLSecurityManager.java 2025-09-25 16:16:56.000000000 +0000 @@ -245,6 +245,12 @@ boolean secureProcessing; /** + * Flag indicating the secure processing is set explicitly through factories' + * setFeature method and then the setSecureProcessing method + */ + boolean secureProcessingSet; + + /** * States that determine if properties are set explicitly */ private boolean[] isSet; @@ -340,6 +346,7 @@ * Setting FEATURE_SECURE_PROCESSING explicitly */ public void setSecureProcessing(boolean secure) { + secureProcessingSet = true; secureProcessing = secure; for (Limit limit : Limit.values()) { if (secure) { @@ -359,6 +366,15 @@ } /** + * Returns the state indicating whether the Secure Processing is set explicitly, + * via factories' setFeature and then this class' setSecureProcessing method. + * @return the state indicating whether the Secure Processing is set explicitly + */ + public boolean isSecureProcessingSet() { + return secureProcessingSet; + } + + /** * Finds a limit's new name with the given property name. * @param propertyName the property name specified * @return the limit's new name if found, null otherwise diff -Nru openjdk-25-25~32ea/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_de.properties openjdk-25-25.0.1+8/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_de.properties --- openjdk-25-25~32ea/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_de.properties 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_de.properties 2025-09-25 16:16:56.000000000 +0000 @@ -1378,14 +1378,17 @@ # 0: symbol, 1: symbol # lint: deprecation +# flags: aggregate compiler.warn.has.been.deprecated={0} in {1} ist veraltet # 0: symbol, 1: symbol # lint: removal +# flags: aggregate compiler.warn.has.been.deprecated.for.removal={0} in {1} ist veraltet und wurde zum Entfernen markiert # 0: symbol # lint: preview +# flags: aggregate compiler.warn.is.preview={0} ist eine Vorschau-API, die in einem zukünftigen Release entfernt werden kann. # 0: symbol @@ -1393,6 +1396,7 @@ # 0: symbol # lint: preview +# flags: aggregate compiler.warn.is.preview.reflective={0} ist eine reflektive Vorschau-API, die in einem zukünftigen Release entfernt werden kann. # 0: symbol, 1: symbol @@ -1401,13 +1405,16 @@ # 0: symbol # lint: deprecation +# flags: aggregate compiler.warn.has.been.deprecated.module=Modul {0} ist veraltet # 0: symbol # lint: removal +# flags: aggregate compiler.warn.has.been.deprecated.for.removal.module=Modul {0} ist veraltet und wurde zum Entfernen markiert # 0: symbol +# flags: strict compiler.warn.sun.proprietary={0} ist eine interne proprietäre API, die in einem zukünftigen Release entfernt werden kann compiler.warn.illegal.char.for.encoding=Nicht zuordenbares Zeichen für Codierung {0} @@ -1704,10 +1711,12 @@ # 0: symbol, 1: type # lint: unchecked +# flags: aggregate compiler.warn.unchecked.assign.to.var=Nicht geprüfte Zuweisung zu Variable {0} als Mitglied des Raw-Typs {1} # 0: symbol, 1: type # lint: unchecked +# flags: aggregate compiler.warn.unchecked.call.mbr.of.raw.type=Nicht geprüfter Aufruf von {0} als Mitglied des Raw-Typs {1} # lint: unchecked @@ -1715,14 +1724,17 @@ # 0: kind name, 1: name, 2: object, 3: object, 4: kind name, 5: symbol # lint: unchecked +# flags: aggregate compiler.warn.unchecked.meth.invocation.applied=Nicht geprüfter Methodenaufruf: {0} {1} in {4} {5} wird auf die angegebenen Typen angewendet\nErforderlich: {2}\nErmittelt: {3} # 0: type # lint: unchecked +# flags: aggregate compiler.warn.unchecked.generic.array.creation=Nicht geprüfte Erstellung eines generischen Arrays für varargs-Parameter des Typs {0} # 0: type # lint: unchecked +# flags: aggregate compiler.warn.unchecked.varargs.non.reifiable.type=Möglich Heap-Beschädigung aus parametrisiertem vararg-Typ {0} # 0: symbol @@ -2011,6 +2023,7 @@ # 0: message segment, 1: type, 2: type # lint: unchecked +# flags: aggregate compiler.warn.prob.found.req={0}\nErforderlich: {2}\nErmittelt: {1} # 0: type, 1: type @@ -2284,10 +2297,12 @@ # 0: message segment, 1: type, 2: type # lint: unchecked +# flags: aggregate compiler.warn.override.unchecked.ret={0}\nRückgabetyp erfordert eine nicht geprüfte Konvertierung von {1} in {2} # 0: message segment, 1: type # lint: unchecked +# flags: aggregate compiler.warn.override.unchecked.thrown={0}\nAußer Kraft gesetzte Methode löst nicht {1} aus # 0: symbol @@ -2336,9 +2351,11 @@ ######################################## # 0: message segment (feature), 1: string (found version), 2: string (expected version) +# flags: source-level compiler.err.feature.not.supported.in.source={0} wird in -source {1} nicht unterstützt\n(Verwenden Sie -source {2} oder höher, um {0} zu aktivieren) # 0: message segment (feature), 1: string (found version), 2: string (expected version) +# flags: source-level compiler.err.feature.not.supported.in.source.plural={0} werden in -source {1} nicht unterstützt\n(Verwenden Sie -source {2} oder höher, um {0} zu aktivieren) # 0: message segment (feature), 1: string (found version), 2: string (expected version) @@ -2348,9 +2365,11 @@ compiler.misc.feature.not.supported.in.source.plural={0} werden in -source {1} nicht unterstützt\n(Verwenden Sie -source {2} oder höher, um {0} zu aktivieren) # 0: message segment (feature) +# flags: source-level compiler.err.preview.feature.disabled={0} ist ein Vorschaufeature, das standardmäßig deaktiviert ist.\n(Verwenden Sie --enable-preview, um {0} zu aktivieren) # 0: message segment (feature) +# flags: source-level compiler.err.preview.feature.disabled.plural={0} sind ein Vorschaufeature, das standardmäßig deaktiviert ist.\n(Verwenden Sie --enable-preview, um {0} zu aktivieren) # 0: file object (classfile), 1: string (expected version) @@ -2358,10 +2377,12 @@ # 0: message segment (feature) # lint: preview +# flags: aggregate compiler.warn.preview.feature.use={0} ist ein Vorschaufeature, das in einem zukünftigen Release entfernt werden kann. # 0: message segment (feature) # lint: preview +# flags: aggregate compiler.warn.preview.feature.use.plural={0} sind ein Vorschaufeature, das in einem zukünftigen Release entfernt werden kann. # 0: file object (classfile), 1: string (expected version) @@ -3039,6 +3060,7 @@ # 0: kind name, 1: symbol # lint: preview +# flags: aggregate compiler.warn.declared.using.preview={0} {1} ist mit einem Vorschaufeature deklariert, das in einem zukünftigen Release entfernt werden kann. # lint: identity diff -Nru openjdk-25-25~32ea/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties openjdk-25-25.0.1+8/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties --- openjdk-25-25~32ea/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_ja.properties 2025-09-25 16:16:56.000000000 +0000 @@ -1378,14 +1378,17 @@ # 0: symbol, 1: symbol # lint: deprecation +# flags: aggregate compiler.warn.has.been.deprecated={1}の{0}は推奨されません # 0: symbol, 1: symbol # lint: removal +# flags: aggregate compiler.warn.has.been.deprecated.for.removal={1}の{0}は推奨されておらず、削除用にマークされています # 0: symbol # lint: preview +# flags: aggregate compiler.warn.is.preview={0}はプレビューAPIであり、今後のリリースで削除される可能性があります。 # 0: symbol @@ -1393,6 +1396,7 @@ # 0: symbol # lint: preview +# flags: aggregate compiler.warn.is.preview.reflective={0}はリフレクティブ・プレビューAPIであり、今後のリリースで削除される可能性があります。 # 0: symbol, 1: symbol @@ -1401,13 +1405,16 @@ # 0: symbol # lint: deprecation +# flags: aggregate compiler.warn.has.been.deprecated.module=モジュール{0}は推奨されません # 0: symbol # lint: removal +# flags: aggregate compiler.warn.has.been.deprecated.for.removal.module=モジュール{0}は推奨されておらず、削除用にマークされています # 0: symbol +# flags: strict compiler.warn.sun.proprietary={0}は内部所有のAPIであり、今後のリリースで削除される可能性があります compiler.warn.illegal.char.for.encoding=この文字は、エンコーディング{0}にマップできません @@ -1704,10 +1711,12 @@ # 0: symbol, 1: type # lint: unchecked +# flags: aggregate compiler.warn.unchecked.assign.to.var=raw型{1}のメンバーとして変数{0}への無検査代入です # 0: symbol, 1: type # lint: unchecked +# flags: aggregate compiler.warn.unchecked.call.mbr.of.raw.type=raw型{1}のメンバーとしての{0}への無検査呼出しです # lint: unchecked @@ -1715,14 +1724,17 @@ # 0: kind name, 1: name, 2: object, 3: object, 4: kind name, 5: symbol # lint: unchecked +# flags: aggregate compiler.warn.unchecked.meth.invocation.applied=無検査メソッド呼出し: {4} {5}の{0} {1}は指定された型に適用されます\n期待値: {2}\n検出値: {3} # 0: type # lint: unchecked +# flags: aggregate compiler.warn.unchecked.generic.array.creation=型{0}の可変引数パラメータに対する総称型配列の無検査作成です # 0: type # lint: unchecked +# flags: aggregate compiler.warn.unchecked.varargs.non.reifiable.type=パラメータ化された可変引数型{0}からのヒープ汚染の可能性があります # 0: symbol @@ -2011,6 +2023,7 @@ # 0: message segment, 1: type, 2: type # lint: unchecked +# flags: aggregate compiler.warn.prob.found.req={0}\n期待値: {2}\n検出値: {1} # 0: type, 1: type @@ -2284,10 +2297,12 @@ # 0: message segment, 1: type, 2: type # lint: unchecked +# flags: aggregate compiler.warn.override.unchecked.ret={0}\n戻り値の型は{1}から{2}への無検査変換が必要です # 0: message segment, 1: type # lint: unchecked +# flags: aggregate compiler.warn.override.unchecked.thrown={0}\nオーバーライドされたメソッドは{1}をスローしません # 0: symbol @@ -2336,9 +2351,11 @@ ######################################## # 0: message segment (feature), 1: string (found version), 2: string (expected version) +# flags: source-level compiler.err.feature.not.supported.in.source={0}は-source {1}でサポートされていません\n({0}を有効にするには-source {2}以上を使用してください) # 0: message segment (feature), 1: string (found version), 2: string (expected version) +# flags: source-level compiler.err.feature.not.supported.in.source.plural={0}は-source {1}でサポートされていません\n({0}を有効にするには-source {2}以上を使用してください) # 0: message segment (feature), 1: string (found version), 2: string (expected version) @@ -2348,9 +2365,11 @@ compiler.misc.feature.not.supported.in.source.plural={0}は-source {1}でサポートされていません\n({0}を有効にするには-source {2}以上を使用してください) # 0: message segment (feature) +# flags: source-level compiler.err.preview.feature.disabled={0}はプレビュー機能であり、デフォルトで無効になっています。\n({0}を有効にするには--enable-previewを使用します) # 0: message segment (feature) +# flags: source-level compiler.err.preview.feature.disabled.plural={0}はプレビュー機能であり、デフォルトで無効になっています。\n({0}を有効にするには--enable-previewを使用します) # 0: file object (classfile), 1: string (expected version) @@ -2358,10 +2377,12 @@ # 0: message segment (feature) # lint: preview +# flags: aggregate compiler.warn.preview.feature.use={0}はプレビュー機能であり、今後のリリースで削除される可能性があります。 # 0: message segment (feature) # lint: preview +# flags: aggregate compiler.warn.preview.feature.use.plural={0}はプレビュー機能であり、今後のリリースで削除される可能性があります。 # 0: file object (classfile), 1: string (expected version) @@ -3039,6 +3060,7 @@ # 0: kind name, 1: symbol # lint: preview +# flags: aggregate compiler.warn.declared.using.preview={0} {1}はプレビュー機能を使用して宣言されており、今後のリリースで削除される可能性があります。 # lint: identity diff -Nru openjdk-25-25~32ea/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties openjdk-25-25.0.1+8/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties --- openjdk-25-25~32ea/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties 2025-09-25 16:16:56.000000000 +0000 @@ -1378,14 +1378,17 @@ # 0: symbol, 1: symbol # lint: deprecation +# flags: aggregate compiler.warn.has.been.deprecated={1}中的{0}已过时 # 0: symbol, 1: symbol # lint: removal +# flags: aggregate compiler.warn.has.been.deprecated.for.removal={1} 中的 {0} 已过时, 且标记为待删除 # 0: symbol # lint: preview +# flags: aggregate compiler.warn.is.preview={0} 是预览 API,可能会在未来发行版中删除。 # 0: symbol @@ -1393,6 +1396,7 @@ # 0: symbol # lint: preview +# flags: aggregate compiler.warn.is.preview.reflective={0} 是反射预览 API,可能会在未来发行版中删除。 # 0: symbol, 1: symbol @@ -1401,13 +1405,16 @@ # 0: symbol # lint: deprecation +# flags: aggregate compiler.warn.has.been.deprecated.module=模块 {0} 已过时 # 0: symbol # lint: removal +# flags: aggregate compiler.warn.has.been.deprecated.for.removal.module=模块 {0} 已过时, 且标记为待删除 # 0: symbol +# flags: strict compiler.warn.sun.proprietary={0}是内部专用 API, 可能会在未来发行版中删除 compiler.warn.illegal.char.for.encoding=编码{0}的不可映射字符 @@ -1704,10 +1711,12 @@ # 0: symbol, 1: type # lint: unchecked +# flags: aggregate compiler.warn.unchecked.assign.to.var=对作为原始类型{1}的成员的变量{0}的分配未经过检查 # 0: symbol, 1: type # lint: unchecked +# flags: aggregate compiler.warn.unchecked.call.mbr.of.raw.type=对作为原始类型{1}的成员的{0}的调用未经过检查 # lint: unchecked @@ -1715,14 +1724,17 @@ # 0: kind name, 1: name, 2: object, 3: object, 4: kind name, 5: symbol # lint: unchecked +# flags: aggregate compiler.warn.unchecked.meth.invocation.applied=方法调用未经过检查: 将{4} {5}中的{0} {1}应用到给定的类型\n需要: {2}\n找到: {3} # 0: type # lint: unchecked +# flags: aggregate compiler.warn.unchecked.generic.array.creation=对于类型为{0}的 varargs 参数, 泛型数组创建未经过检查 # 0: type # lint: unchecked +# flags: aggregate compiler.warn.unchecked.varargs.non.reifiable.type=参数化 vararg 类型{0}的堆可能已受污染 # 0: symbol @@ -2011,6 +2023,7 @@ # 0: message segment, 1: type, 2: type # lint: unchecked +# flags: aggregate compiler.warn.prob.found.req={0}\n需要: {2}\n找到: {1} # 0: type, 1: type @@ -2284,10 +2297,12 @@ # 0: message segment, 1: type, 2: type # lint: unchecked +# flags: aggregate compiler.warn.override.unchecked.ret={0}\n返回类型需要从{1}到{2}的未经检查的转换 # 0: message segment, 1: type # lint: unchecked +# flags: aggregate compiler.warn.override.unchecked.thrown={0}\n被覆盖的方法未抛出{1} # 0: symbol @@ -2336,9 +2351,11 @@ ######################################## # 0: message segment (feature), 1: string (found version), 2: string (expected version) +# flags: source-level compiler.err.feature.not.supported.in.source=-source {1} 中不支持 {0}\n(请使用 -source {2} 或更高版本以启用 {0}) # 0: message segment (feature), 1: string (found version), 2: string (expected version) +# flags: source-level compiler.err.feature.not.supported.in.source.plural=-source {1} 中不支持 {0}\n(请使用 -source {2} 或更高版本以启用 {0}) # 0: message segment (feature), 1: string (found version), 2: string (expected version) @@ -2348,9 +2365,11 @@ compiler.misc.feature.not.supported.in.source.plural=-source {1} 中不支持 {0}\n(请使用 -source {2} 或更高版本以启用 {0}) # 0: message segment (feature) +# flags: source-level compiler.err.preview.feature.disabled={0} 是预览功能,默认情况下禁用。\n(请使用 --enable-preview 以启用 {0}) # 0: message segment (feature) +# flags: source-level compiler.err.preview.feature.disabled.plural={0} 是预览功能,默认情况下禁用。\n(请使用 --enable-preview 以启用 {0}) # 0: file object (classfile), 1: string (expected version) @@ -2358,10 +2377,12 @@ # 0: message segment (feature) # lint: preview +# flags: aggregate compiler.warn.preview.feature.use={0} 是预览功能,可能会在未来发行版中删除。 # 0: message segment (feature) # lint: preview +# flags: aggregate compiler.warn.preview.feature.use.plural={0} 是预览功能,可能会在未来发行版中删除。 # 0: file object (classfile), 1: string (expected version) @@ -3039,6 +3060,7 @@ # 0: kind name, 1: symbol # lint: preview +# flags: aggregate compiler.warn.declared.using.preview={0} {1} 是使用预览功能声明的,可能会在未来发行版中删除。 # lint: identity diff -Nru openjdk-25-25~32ea/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_de.properties openjdk-25-25.0.1+8/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_de.properties --- openjdk-25-25~32ea/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_de.properties 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_de.properties 2025-09-25 16:16:56.000000000 +0000 @@ -175,11 +175,8 @@ javac.opt.Xlint.desc.restricted=Warnt vor der Verwendung eingeschränkter Methoden. -javac.opt.Xlint.desc.synchronization=\ - Warnt vor Synchronisierungsversuchen mit Instanzen wertbasierter Klassen.\n\ -\ Dieser Schlüssel ist ein veralteter Alias für die Kategorie ''identity'', die dieselben Verwendungen und\n\ -\ Effekte hat. Benutzern wird empfohlen, die Kategorie ''identity'' für alle zukünftigen\n\ -\ und vorhandenen Verwendungen von ''synchronization'' zu verwenden. +# L10N: do not localize: identity synchronization +javac.opt.Xlint.desc.synchronization=Warnt vor Synchronisierungsversuchen mit Instanzen wertbasierter Klassen.\n Dieser Schlüssel ist ein veralteter Alias für die Kategorie "identity", die dieselben Verwendungen und\n Effekte hat. Benutzern wird empfohlen, die Kategorie "identity" für alle zukünftigen\n und vorhandenen Verwendungen von "synchronization" zu verwenden. javac.opt.Xlint.desc.identity=Warnt vor Verwendungen wertbasierter Klassen, wenn eine Identitätsklasse erwartet wird. diff -Nru openjdk-25-25~32ea/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties openjdk-25-25.0.1+8/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties --- openjdk-25-25~32ea/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties 2025-09-25 16:16:56.000000000 +0000 @@ -175,6 +175,7 @@ javac.opt.Xlint.desc.restricted=制限されたメソッドの使用について警告します。 +# L10N: do not localize: identity synchronization javac.opt.Xlint.desc.synchronization=値ベース・クラスのインスタンスでの同期の試行について警告します。\n このキーは、''identity''の非推奨のエイリアスであり、同じ使用方法と効果を\n 持ちます。ユーザーには、今後および既存の''synchronization''の使用に対して''identity''カテゴリを\n 使用することをお薦めします。 javac.opt.Xlint.desc.identity=アイデンティティ・クラスが必要な場所での値ベース・クラスの使用について警告します。 diff -Nru openjdk-25-25~32ea/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties openjdk-25-25.0.1+8/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties --- openjdk-25-25~32ea/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties 2025-09-25 16:16:56.000000000 +0000 @@ -175,6 +175,7 @@ javac.opt.Xlint.desc.restricted=有关使用受限制方法的警告。 +# L10N: do not localize: identity synchronization javac.opt.Xlint.desc.synchronization=有关尝试在基于值的类的实例上同步的警告。\n 此密钥是 ''identity'' 的已过时别名,具有相同的用法和\n 效果。建议用户在 ''synchronization'' 的所有未来和现有\n 用法中使用 ''identity'' 类别。 javac.opt.Xlint.desc.identity=有关在需要身份类的情况下使用基于值的类的警告。 diff -Nru openjdk-25-25~32ea/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/launcher_de.properties openjdk-25-25.0.1+8/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/launcher_de.properties --- openjdk-25-25~32ea/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/launcher_de.properties 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/launcher_de.properties 2025-09-25 16:16:56.000000000 +0000 @@ -100,7 +100,7 @@ launcher.err.cant.find.class=Klasse nicht gefunden: {0} # 0: string -launcher.err.cant.find.main.method=Konnte keine main(String[])- oder main()-Methode in der Klasse: {0} finden. +launcher.err.cant.find.main.method=main(String[])- oder main()-Methode nicht gefunden in Klasse: {0} # 0: string launcher.err.cant.instantiate=Abstrakte Klasse: {0} kann nicht instanziiert werden diff -Nru openjdk-25-25~32ea/src/jdk.jfr/share/classes/jdk/jfr/events/FileReadEvent.java openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/events/FileReadEvent.java --- openjdk-25-25~32ea/src/jdk.jfr/share/classes/jdk/jfr/events/FileReadEvent.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/events/FileReadEvent.java 2025-09-25 16:16:56.000000000 +0000 @@ -38,7 +38,13 @@ @Label("File Read") @Category("Java Application") @Description("Reading data from a file") -@StackFilter({"java.io.FileInputStream", "java.io.RandomAccessFile", "sun.nio.ch.FileChannelImpl"}) +@StackFilter({"java.nio.channels.FileChannel", + "java.io.DataInputStream", + "java.io.FileInputStream", + "java.io.InputStream", + "java.io.RandomAccessFile", + "sun.nio.ch.ChannelInputStream", + "sun.nio.ch.FileChannelImpl"}) @Throttle public final class FileReadEvent extends MirrorEvent { diff -Nru openjdk-25-25~32ea/src/jdk.jfr/share/classes/jdk/jfr/events/FileWriteEvent.java openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/events/FileWriteEvent.java --- openjdk-25-25~32ea/src/jdk.jfr/share/classes/jdk/jfr/events/FileWriteEvent.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/events/FileWriteEvent.java 2025-09-25 16:16:56.000000000 +0000 @@ -38,7 +38,13 @@ @Label("File Write") @Category("Java Application") @Description("Writing data to a file") -@StackFilter({"java.io.FileOutputStream", "java.io.RandomAccessFile", "sun.nio.ch.FileChannelImpl"}) +@StackFilter({"java.nio.channels.FileChannel", + "java.io.DataOutputStream", + "java.io.FileOutputStream", + "java.io.OutputStream", + "java.io.RandomAccessFile", + "sun.nio.ch.ChannelOutputStream", + "sun.nio.ch.FileChannelImpl"}) @Throttle public final class FileWriteEvent extends MirrorEvent { diff -Nru openjdk-25-25~32ea/src/jdk.jfr/share/classes/jdk/jfr/events/SocketReadEvent.java openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/events/SocketReadEvent.java --- openjdk-25-25~32ea/src/jdk.jfr/share/classes/jdk/jfr/events/SocketReadEvent.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/events/SocketReadEvent.java 2025-09-25 16:16:56.000000000 +0000 @@ -39,6 +39,10 @@ @Label("Socket Read") @Category("Java Application") @Description("Reading data from a socket") +@StackFilter({"java.io.InputStream", + "java.net.Socket$SocketInputStream", + "java.nio.channels.SocketChannel", + "sun.nio.ch.SocketInputStream"}) @Throttle public final class SocketReadEvent extends MirrorEvent { diff -Nru openjdk-25-25~32ea/src/jdk.jfr/share/classes/jdk/jfr/events/SocketWriteEvent.java openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/events/SocketWriteEvent.java --- openjdk-25-25~32ea/src/jdk.jfr/share/classes/jdk/jfr/events/SocketWriteEvent.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/events/SocketWriteEvent.java 2025-09-25 16:16:56.000000000 +0000 @@ -38,6 +38,10 @@ @Label("Socket Write") @Category("Java Application") @Description("Writing data to a socket") +@StackFilter({"java.io.OutputStream", + "java.net.Socket$SocketOutputStream", + "java.nio.channels.SocketChannel", + "sun.nio.ch.SocketOutputStream"}) @Throttle public final class SocketWriteEvent extends MirrorEvent { diff -Nru openjdk-25-25~32ea/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformEventType.java openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformEventType.java --- openjdk-25-25~32ea/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformEventType.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformEventType.java 2025-09-25 16:16:56.000000000 +0000 @@ -95,18 +95,6 @@ return false; } - private boolean isStaticCommit() { - switch (getName()) { - case Type.EVENT_NAME_PREFIX + "SocketRead" : - case Type.EVENT_NAME_PREFIX + "SocketWrite" : - case Type.EVENT_NAME_PREFIX + "FileRead" : - case Type.EVENT_NAME_PREFIX + "FileWrite" : - case Type.EVENT_NAME_PREFIX + "FileForce" : - return true; - } - return false; - } - private int determineStackTraceOffset() { if (isJDK) { // Order matters @@ -116,9 +104,14 @@ if (getModification() == Modification.TRACING) { return 5; } - if (isStaticCommit()) { - return 3; - } + return switch (getName()) { + case Type.EVENT_NAME_PREFIX + "SocketRead", + Type.EVENT_NAME_PREFIX + "SocketWrite", + Type.EVENT_NAME_PREFIX + "FileRead", + Type.EVENT_NAME_PREFIX + "FileWrite" -> 6; + case Type.EVENT_NAME_PREFIX + "FileForce" -> 5; + default -> 3; + }; } return 3; } diff -Nru openjdk-25-25~32ea/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/ConstantMap.java openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/ConstantMap.java --- openjdk-25-25~32ea/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/ConstantMap.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/ConstantMap.java 2025-09-25 16:16:56.000000000 +0000 @@ -77,7 +77,7 @@ if (id != 0) { String msg = "Missing object ID " + id + " in pool " + getName() + ". All IDs should reference an object"; Logger.log(LogTag.JFR_SYSTEM_PARSER, LogLevel.INFO, msg); - // assert false : msg; + assert false : msg; } return null; } diff -Nru openjdk-25-25~32ea/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_de.properties openjdk-25-25.0.1+8/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_de.properties --- openjdk-25-25~32ea/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_de.properties 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_de.properties 2025-09-25 16:16:56.000000000 +0000 @@ -86,7 +86,6 @@ MSG_BundlerConfigException=Bundler {0} aufgrund eines Konfigurationsproblems übersprungen: {1} \nEmpfehlung zur Behebung: {2} MSG_BundlerConfigExceptionNoAdvice=Bundler {0} aufgrund eines Konfigurationsproblems übersprungen: {1} MSG_BundlerRuntimeException=Bundler {0} nicht erfolgreich. Grund: {1} -MSG_BundlerFailed=Fehler: Bundler "{1}" ({0}) konnte kein Package generieren ERR_NoMainClass=Fehler: Hauptanwendungsklasse fehlt ERR_UnsupportedOption=Fehler: Option [{0}] ist auf dieser Plattform ungültig diff -Nru openjdk-25-25~32ea/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_ja.properties openjdk-25-25.0.1+8/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_ja.properties --- openjdk-25-25~32ea/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_ja.properties 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_ja.properties 2025-09-25 16:16:56.000000000 +0000 @@ -86,7 +86,6 @@ MSG_BundlerConfigException=構成の問題のため、バンドラ{0}がスキップされました: {1} \n次の修正を行ってください: {2} MSG_BundlerConfigExceptionNoAdvice=構成の問題のため、バンドラ{0}がスキップされました: {1} MSG_BundlerRuntimeException={1}のため、バンドラ{0}が失敗しました -MSG_BundlerFailed=エラー: バンドラ"{1}" ({0})がパッケージの生成に失敗しました ERR_NoMainClass=エラー: メイン・アプリケーション・クラスがありません ERR_UnsupportedOption=エラー: オプション[{0}]は、このプラットフォームでは無効です diff -Nru openjdk-25-25~32ea/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_zh_CN.properties openjdk-25-25.0.1+8/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_zh_CN.properties --- openjdk-25-25~32ea/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_zh_CN.properties 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/MainResources_zh_CN.properties 2025-09-25 16:16:56.000000000 +0000 @@ -86,7 +86,6 @@ MSG_BundlerConfigException=由于配置问题, 跳过了打包程序{0}: {1} \n修复建议: {2} MSG_BundlerConfigExceptionNoAdvice=由于配置问题, 跳过了打包程序{0}: {1} MSG_BundlerRuntimeException=由于{1}, 打包程序{0}失败 -MSG_BundlerFailed=错误:打包程序 "{1}" ({0}) 无法生成程序包 ERR_NoMainClass=错误:缺少主应用程序类 ERR_UnsupportedOption=错误:选项 [{0}] 在此平台上无效 diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/TEST.ROOT openjdk-25-25.0.1+8/test/hotspot/jtreg/TEST.ROOT --- openjdk-25-25~32ea/test/hotspot/jtreg/TEST.ROOT 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/TEST.ROOT 2025-09-25 16:16:56.000000000 +0000 @@ -91,6 +91,8 @@ vm.compiler1.enabled \ vm.compiler2.enabled \ vm.musl \ + vm.asan \ + vm.ubsan \ vm.flagless \ container.support \ systemd.support \ diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/applications/scimark/Scimark.java openjdk-25-25.0.1+8/test/hotspot/jtreg/applications/scimark/Scimark.java --- openjdk-25-25~32ea/test/hotspot/jtreg/applications/scimark/Scimark.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/applications/scimark/Scimark.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2017, 2024, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @key external-dep - * @library /test/lib - * @run driver Scimark - */ - -import jdk.test.lib.process.ProcessTools; -import jdk.test.lib.process.OutputAnalyzer; -import jdk.test.lib.artifacts.Artifact; -import jdk.test.lib.artifacts.ArtifactResolver; -import jdk.test.lib.artifacts.ArtifactResolverException; -import java.nio.file.Path; -import java.util.Map; - -@Artifact(organization = "gov.nist.math", name = "scimark", revision = "2.0", extension = "zip") -public class Scimark { - public static void main(String... args) throws Exception { - Map artifacts; - try { - artifacts = ArtifactResolver.resolve(Scimark.class); - } catch (ArtifactResolverException e) { - throw new Error("TESTBUG: Can not resolve artifacts for " - + Scimark.class.getName(), e); - } - - System.setProperty("test.noclasspath", "true"); - - OutputAnalyzer output = new OutputAnalyzer(ProcessTools.createTestJavaProcessBuilder( - "-cp", artifacts.get("gov.nist.math.scimark-2.0").toString(), - "jnt.scimark2.commandline", "-large") - .start()); - output.shouldHaveExitValue(0); - } -} diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/compiler/c2/irTests/InvolutionIdentityTests.java openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/irTests/InvolutionIdentityTests.java --- openjdk-25-25~32ea/test/hotspot/jtreg/compiler/c2/irTests/InvolutionIdentityTests.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/irTests/InvolutionIdentityTests.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,206 +0,0 @@ -/* - * Copyright (c) 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package compiler.c2.irTests; - -import compiler.lib.generators.Generator; -import compiler.lib.generators.Generators; -import compiler.lib.generators.RestrictableGenerator; -import compiler.lib.ir_framework.DontCompile; -import compiler.lib.ir_framework.IR; -import compiler.lib.ir_framework.IRNode; -import compiler.lib.ir_framework.Run; -import compiler.lib.ir_framework.Test; -import compiler.lib.ir_framework.TestFramework; -import jdk.test.lib.Asserts; - -/* - * @test - * @bug 8350988 - * @summary Test that Identity simplifications of Involution nodes are being performed as expected. - * @library /test/lib / - * @run driver compiler.c2.irTests.InvolutionIdentityTests - */ -public class InvolutionIdentityTests { - - public static final RestrictableGenerator GEN_CHAR = Generators.G.safeRestrict(Generators.G.ints(), Character.MIN_VALUE, Character.MAX_VALUE); - public static final RestrictableGenerator GEN_SHORT = Generators.G.safeRestrict(Generators.G.ints(), Short.MIN_VALUE, Short.MAX_VALUE); - public static final RestrictableGenerator GEN_LONG = Generators.G.longs(); - public static final RestrictableGenerator GEN_INT = Generators.G.ints(); - public static final Generator GEN_FLOAT = Generators.G.floats(); - public static final Generator GEN_DOUBLE = Generators.G.doubles(); - - public static void main(String[] args) { - TestFramework.run(); - } - - @Run(test = { - "testI1", "testI2", - "testL1", "testL2", - "testS1", - "testUS1", - "testF1", - "testD1" - }) - public void runMethod() { - int ai = GEN_INT.next(); - - int mini = Integer.MIN_VALUE; - int maxi = Integer.MAX_VALUE; - - assertResultI(0); - assertResultI(ai); - assertResultI(mini); - assertResultI(maxi); - - long al = GEN_LONG.next(); - - long minl = Long.MIN_VALUE; - long maxl = Long.MAX_VALUE; - - assertResultL(0); - assertResultL(al); - assertResultL(minl); - assertResultL(maxl); - - short as = GEN_SHORT.next().shortValue(); - - short mins = Short.MIN_VALUE; - short maxs = Short.MAX_VALUE; - - assertResultS((short) 0); - assertResultS(as); - assertResultS(mins); - assertResultS(maxs); - - char ac = (char) GEN_CHAR.next().intValue(); - - char minc = Character.MIN_VALUE; - char maxc = Character.MAX_VALUE; - - assertResultUS((char) 0); - assertResultUS(ac); - assertResultUS(minc); - assertResultUS(maxc); - - float af = GEN_FLOAT.next(); - float inf = Float.POSITIVE_INFINITY; - float nanf = Float.NaN; - - assertResultF(0f); - assertResultF(-0f); - assertResultF(af); - assertResultF(inf); - assertResultF(nanf); - - double ad = GEN_DOUBLE.next(); - double ind = Double.POSITIVE_INFINITY; - double nand = Double.NaN; - - assertResultD(0d); - assertResultD(-0d); - assertResultD(ad); - assertResultD(ind); - assertResultD(nand); - - } - - @DontCompile - public void assertResultI(int a) { - Asserts.assertEQ(Integer.reverseBytes(Integer.reverseBytes(a)), testI1(a)); - Asserts.assertEQ(Integer.reverse(Integer.reverse(a)) , testI2(a)); - } - - @DontCompile - public void assertResultL(long a) { - Asserts.assertEQ(Long.reverseBytes(Long.reverseBytes(a)), testL1(a)); - Asserts.assertEQ(Long.reverse(Long.reverse(a)) , testL2(a)); - } - - @DontCompile - public void assertResultS(short a) { - Asserts.assertEQ(Short.reverseBytes(Short.reverseBytes(a)), testS1(a)); - } - - @DontCompile - public void assertResultUS(char a) { - Asserts.assertEQ(Character.reverseBytes(Character.reverseBytes(a)), testUS1(a)); - } - - @DontCompile - public void assertResultF(float a) { - Asserts.assertEQ(Float.floatToRawIntBits(-(-a)), Float.floatToRawIntBits(testF1(a))); - } - - @DontCompile - public void assertResultD(double a) { - Asserts.assertEQ(Double.doubleToRawLongBits(-(-a)), Double.doubleToRawLongBits(testD1(a))); - } - - @Test - @IR(failOn = {IRNode.REVERSE_BYTES_I}) - public int testI1(int x) { - return Integer.reverseBytes(Integer.reverseBytes(x)); - } - - @Test - @IR(failOn = {IRNode.REVERSE_I}) - public int testI2(int x) { - return Integer.reverse(Integer.reverse(x)); - } - - @Test - @IR(failOn = {IRNode.REVERSE_BYTES_L}) - public long testL1(long x) { - return Long.reverseBytes(Long.reverseBytes(x)); - } - - @Test - @IR(failOn = {IRNode.REVERSE_L}) - public long testL2(long x) { - return Long.reverse(Long.reverse(x)); - } - - @Test - @IR(failOn = {IRNode.REVERSE_BYTES_S}) - public short testS1(short x) { - return Short.reverseBytes(Short.reverseBytes(x)); - } - - @Test - @IR(failOn = {IRNode.REVERSE_BYTES_US}) - public char testUS1(char x) { - return Character.reverseBytes(Character.reverseBytes(x)); - } - - @Test - @IR(failOn = {IRNode.NEG_F}) - public float testF1(float x) { - return -(-x); - } - - @Test - @IR(failOn = {IRNode.NEG_D}) - public double testD1(double x) { - return -(-x); - } -} diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/compiler/c2/irTests/stringopts/TestArrayCopySelect.java openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/irTests/stringopts/TestArrayCopySelect.java --- openjdk-25-25~32ea/test/hotspot/jtreg/compiler/c2/irTests/stringopts/TestArrayCopySelect.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/irTests/stringopts/TestArrayCopySelect.java 2025-09-25 16:16:56.000000000 +0000 @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2025, Institute of Software, Chinese Academy of Sciences. + * 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package compiler.c2.irTests.stringopts; + +import compiler.lib.ir_framework.*; + +/** + * @test + * @bug 8359270 + * @requires vm.debug == true & vm.compiler2.enabled + * @requires os.arch=="amd64" | os.arch=="x86_64" | os.arch=="riscv64" | os.arch=="aarch64" + * @summary C2: alignment check should consider base offset when emitting arraycopy runtime call. + * @library /test/lib / + * @run driver compiler.c2.irTests.stringopts.TestArrayCopySelect + */ + +public class TestArrayCopySelect { + + public static final String input_strU = "\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28"; + public static final char[] input_arrU = new char[] {'\u0f21', '\u0f22', '\u0f23', '\u0f24', + '\u0f25', '\u0f26', '\u0f27', '\u0f28'}; + + public static String output_strU; + public static char[] output_arrU; + + public static void main(String[] args) { + TestFramework.runWithFlags("-XX:-UseCompactObjectHeaders", + "-XX:-CompactStrings", + "-XX:CompileCommand=inline,java.lang.StringBuilder::toString", + "-XX:CompileCommand=inline,java.lang.StringUTF16::getChars", + "-XX:CompileCommand=inline,java.lang.StringUTF16::toBytes"); + + TestFramework.runWithFlags("-XX:+UseCompactObjectHeaders", + "-XX:-CompactStrings", + "-XX:CompileCommand=inline,java.lang.StringBuilder::toString", + "-XX:CompileCommand=inline,java.lang.StringUTF16::getChars", + "-XX:CompileCommand=inline,java.lang.StringUTF16::toBytes"); + } + + @Test + @Warmup(10000) + @IR(applyIf = {"UseCompactObjectHeaders", "false"}, + counts = {IRNode.CALL_OF, "arrayof_jshort_disjoint_arraycopy", ">0"}) + static void testSBToStringAligned() { + // Exercise the StringBuilder.toString API + StringBuilder sb = new StringBuilder(input_strU); + output_strU = sb.append(input_strU).toString(); + } + + @Test + @Warmup(10000) + @IR(applyIf = {"UseCompactObjectHeaders", "true"}, + counts = {IRNode.CALL_OF, "arrayof_jshort_disjoint_arraycopy", "0"}) + static void testSBToStringUnAligned() { + // Exercise the StringBuilder.toString API + StringBuilder sb = new StringBuilder(input_strU); + output_strU = sb.append(input_strU).toString(); + } + + @Test + @Warmup(10000) + @IR(applyIf = {"UseCompactObjectHeaders", "false"}, + counts = {IRNode.CALL_OF, "arrayof_jshort_disjoint_arraycopy", ">0"}) + static void testStrUGetCharsAligned() { + // Exercise the StringUTF16.getChars API + output_arrU = input_strU.toCharArray(); + } + + @Test + @Warmup(10000) + @IR(applyIf = {"UseCompactObjectHeaders", "true"}, + counts = {IRNode.CALL_OF, "arrayof_jshort_disjoint_arraycopy", "0"}) + static void testStrUGetCharsUnAligned() { + // Exercise the StringUTF16.getChars API + output_arrU = input_strU.toCharArray(); + } + + @Test + @Warmup(10000) + @IR(applyIf = {"UseCompactObjectHeaders", "false"}, + counts = {IRNode.CALL_OF, "arrayof_jshort_disjoint_arraycopy", ">0"}) + static void testStrUtoBytesAligned() { + // Exercise the StringUTF16.toBytes API + output_strU = String.valueOf(input_arrU); + } + + @Test + @Warmup(10000) + @IR(applyIf = {"UseCompactObjectHeaders", "true"}, + counts = {IRNode.CALL_OF, "arrayof_jshort_disjoint_arraycopy", "0"}) + static void testStrUtoBytesUnAligned() { + // Exercise the StringUTF16.toBytes API + output_strU = String.valueOf(input_arrU); + } + +} diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java --- openjdk-25-25~32ea/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java 2025-09-25 16:16:56.000000000 +0000 @@ -1469,16 +1469,6 @@ superWordNodes(MAX_REDUCTION_V, "MaxReductionV"); } - public static final String NEG_F = PREFIX + "NEG_F" + POSTFIX; - static { - beforeMatchingNameRegex(NEG_F, "NegF"); - } - - public static final String NEG_D = PREFIX + "NEG_D" + POSTFIX; - static { - beforeMatchingNameRegex(NEG_D, "NegD"); - } - public static final String NEG_VF = VECTOR_PREFIX + "NEG_VF" + POSTFIX; static { vectorNode(NEG_VF, "NegVF", TYPE_FLOAT); diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/compiler/vectorization/runner/BasicIntOpTest.java openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/vectorization/runner/BasicIntOpTest.java --- openjdk-25-25~32ea/test/hotspot/jtreg/compiler/vectorization/runner/BasicIntOpTest.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/vectorization/runner/BasicIntOpTest.java 2025-09-25 16:16:56.000000000 +0000 @@ -141,7 +141,7 @@ } @Test - @IR(applyIfCPUFeatureOr = {"asimd", "true", "avx2", "true", "rvv", "true"}, + @IR(applyIfCPUFeatureOr = {"asimd", "true", "avx2", "true", "zvbb", "true"}, counts = {IRNode.POPCOUNT_VI, ">0"}) public int[] vectorPopCount() { int[] res = new int[SIZE]; diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsFlagsWithUlimit.java openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsFlagsWithUlimit.java --- openjdk-25-25~32ea/test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsFlagsWithUlimit.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/arguments/TestUseCompressedOopsFlagsWithUlimit.java 2025-09-25 16:16:56.000000000 +0000 @@ -31,6 +31,8 @@ * @library /test/lib * @library / * @requires vm.bits == "64" + * @comment ulimit clashes with the memory requirements of ASAN + * @requires !vm.asan * @requires os.family == "linux" * @requires vm.gc != "Z" * @requires vm.opt.UseCompressedOops == null diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/gc/z/TestCommitFailure.java openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/z/TestCommitFailure.java --- openjdk-25-25~32ea/test/hotspot/jtreg/gc/z/TestCommitFailure.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/z/TestCommitFailure.java 2025-09-25 16:16:56.000000000 +0000 @@ -0,0 +1,103 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package gc.z; + +/* + * @test id=ZFakeNUMA + * @requires vm.gc.Z & vm.debug + * @library / /test/lib + * @summary Test ZGC graceful failure when a commit fails (with ZFakeNUMA) + * @run driver gc.z.TestCommitFailure -XX:ZFakeNUMA=16 + */ + +import jdk.test.lib.process.ProcessTools; + +import static gc.testlibrary.Allocation.blackHole; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class TestCommitFailure { + static final int K = 1024; + static final int M = 1024 * K; + + static final int XMS = 128 * M; + static final int XMX = 512 * M; + + static class Test { + static final int LARGE_ALLOC = 256 * M; + static final int SMALL_GARBAGE = 256 * M; + static final int SMALL_LIVE = 128 * M; + + // Allocates at least totalLive bytes of objects and add them to list. + static void allocLive(List list, int totalLive) { + final int largePageAllocationSize = 6 * M; + for (int live = 0; live < totalLive; live += largePageAllocationSize) { + list.add(new byte[largePageAllocationSize - K]); + } + } + + // Allocates at least totalGarbage bytes of garbage large pages. + static void allocGarbage(int totalGarbage) { + final int largePageAllocationSize = 6 * M; + for (int garbage = 0; garbage < totalGarbage; garbage += largePageAllocationSize) { + blackHole(new byte[largePageAllocationSize - K]); + } + } + + public static void main(String[] args) { + final var list = new ArrayList(); + try { + // Fill heap with small live objects + allocLive(list, SMALL_LIVE); + // Fill with small garbage objects + allocGarbage(SMALL_GARBAGE); + // Allocate large objects where commit fails until an OOME is thrown + while (true) { + list.add(new byte[LARGE_ALLOC - K]); + } + } catch (OutOfMemoryError oome) {} + blackHole(list); + } + } + + public static void main(String[] args) throws Exception { + final int xmxInM = XMX / M; + final int xmsInM = XMS / M; + final var arguments = new ArrayList(Arrays.asList(args)); + arguments.addAll(List.of( + "-XX:+UseZGC", + "-Xlog:gc+init", + "-XX:ZFailLargerCommits=" + XMS, + "-Xms" + xmsInM + "M", + "-Xmx" + xmxInM + "M", + Test.class.getName())); + + ProcessTools.executeTestJava(arguments) + .outputTo(System.out) + .errorTo(System.out) + .shouldHaveExitValue(0); + } +} diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/runtime/Thread/TestBreakSignalThreadDump.java openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/Thread/TestBreakSignalThreadDump.java --- openjdk-25-25~32ea/test/hotspot/jtreg/runtime/Thread/TestBreakSignalThreadDump.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/Thread/TestBreakSignalThreadDump.java 2025-09-25 16:16:56.000000000 +0000 @@ -38,6 +38,8 @@ * @requires os.family != "windows" & os.family != "aix" * @comment TODO: Decide libjsig support on static JDK with 8351367 * @requires !jdk.static + * @comment loading of the jsig lib does currently not work well with ASAN lib + * @requires !vm.asan * @library /vmTestbase * /test/lib * @run driver TestBreakSignalThreadDump load_libjsig diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/runtime/XCheckJniJsig/XCheckJSig.java openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/XCheckJniJsig/XCheckJSig.java --- openjdk-25-25~32ea/test/hotspot/jtreg/runtime/XCheckJniJsig/XCheckJSig.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/XCheckJniJsig/XCheckJSig.java 2025-09-25 16:16:56.000000000 +0000 @@ -29,6 +29,8 @@ * @modules java.base/jdk.internal.misc * java.management * @requires os.family == "linux" | os.family == "mac" + * @comment loading of the jsig lib does currently not work well with ASAN lib + * @requires !vm.asan * @comment TODO: Decide libjsig support on static JDK with 8351367 * @requires !jdk.static * @run driver XCheckJSig diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java --- openjdk-25-25~32ea/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java 2025-09-25 16:16:56.000000000 +0000 @@ -38,6 +38,7 @@ import java.util.concurrent.CountDownLatch; import com.sun.management.HotSpotDiagnosticMXBean; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; @@ -50,6 +51,15 @@ boolean done; /** + * The tests accumulate previous heap dumps. Trigger GC before each test to get rid of them. + * This makes dumps smaller, processing faster, and avoids OOMs + */ + @BeforeEach + void doGC() { + System.gc(); + } + + /** * Test dumping the heap while a virtual thread is blocked entering a synchronized native method. */ @Test diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/serviceability/dcmd/vm/SystemDumpMapTest.java openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/dcmd/vm/SystemDumpMapTest.java --- openjdk-25-25~32ea/test/hotspot/jtreg/serviceability/dcmd/vm/SystemDumpMapTest.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/dcmd/vm/SystemDumpMapTest.java 2025-09-25 16:16:56.000000000 +0000 @@ -36,6 +36,8 @@ * @summary Test of diagnostic command System.map * @library /test/lib * @requires (os.family == "linux" | os.family == "windows" | os.family == "mac") + * @comment ASAN changes the memory map dump slightly, but the test has rather strict requirements + * @requires !vm.asan * @requires os.arch != "riscv64" | !(vm.cpu.features ~= ".*qemu.*") * @modules java.base/jdk.internal.misc * java.compiler diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTest.java openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTest.java --- openjdk-25-25~32ea/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTest.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTest.java 2025-09-25 16:16:56.000000000 +0000 @@ -32,6 +32,8 @@ * @summary Test of diagnostic command System.map * @library /test/lib * @requires (vm.gc != "Z") & (os.family == "linux" | os.family == "windows" | os.family == "mac") + * @comment ASAN changes the memory map dump slightly, but the test has rather strict requirements + * @requires !vm.asan * @modules java.base/jdk.internal.misc * java.compiler * java.management @@ -47,6 +49,8 @@ * @summary Test of diagnostic command System.map using ZGC * @library /test/lib * @requires vm.gc.Z & (os.family == "linux" | os.family == "windows" | os.family == "mac") + * @comment ASAN changes the memory map dump slightly, but the test has rather strict requirements + * @requires !vm.asan * @modules java.base/jdk.internal.misc * java.compiler * java.management diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/serviceability/jvmti/thread/GetCurrentContendedMonitor/contmon01/contmon01.java openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/jvmti/thread/GetCurrentContendedMonitor/contmon01/contmon01.java --- openjdk-25-25~32ea/test/hotspot/jtreg/serviceability/jvmti/thread/GetCurrentContendedMonitor/contmon01/contmon01.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/jvmti/thread/GetCurrentContendedMonitor/contmon01/contmon01.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2023, 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 @@ -154,9 +154,9 @@ System.out.println("check #2 done"); System.out.println("notifying main thread"); + System.out.println("thread is going to loop while is true ..."); contmon01.startingBarrier = false; - System.out.println("thread is going to loop while is true ..."); int i = 0; int n = 1000; while (flag) { diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace010/TestDescription.java openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace010/TestDescription.java --- openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace010/TestDescription.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace010/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 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 @@ -47,5 +47,5 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm nsk.monitoring.stress.thread.strace010 -depth=100 -threadCount=30 + * @run main/othervm/native nsk.monitoring.stress.thread.strace010 -depth=100 -threadCount=30 */ diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace011/TestDescription.java openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace011/TestDescription.java --- openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace011/TestDescription.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace011/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 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 @@ -44,7 +44,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/native * nsk.monitoring.stress.thread.strace010 * -testMode=server * -depth=100 diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace012/TestDescription.java openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace012/TestDescription.java --- openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace012/TestDescription.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace012/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 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 @@ -44,7 +44,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/native * nsk.monitoring.stress.thread.strace010 * -testMode=server * -MBeanServer=custom diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace013/TestDescription.java openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace013/TestDescription.java --- openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace013/TestDescription.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace013/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 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 @@ -44,7 +44,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/native * nsk.monitoring.stress.thread.strace010 * -depth=100 * -threadCount=30 diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace014/TestDescription.java openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace014/TestDescription.java --- openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace014/TestDescription.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace014/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 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 @@ -44,7 +44,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/native * nsk.monitoring.stress.thread.strace010 * -testMode=server * -depth=100 diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace015/TestDescription.java openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace015/TestDescription.java --- openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace015/TestDescription.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace015/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 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 @@ -44,7 +44,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/native * nsk.monitoring.stress.thread.strace010 * -testMode=server * -MBeanServer=custom diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace016/TestDescription.java openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace016/TestDescription.java --- openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace016/TestDescription.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace016/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 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 @@ -44,7 +44,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/native * nsk.monitoring.stress.thread.strace010 * -depth=100 * -threadCount=30 diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace017/TestDescription.java openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace017/TestDescription.java --- openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace017/TestDescription.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace017/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 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 @@ -44,7 +44,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/native * nsk.monitoring.stress.thread.strace010 * -testMode=server * -depth=100 diff -Nru openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace018/TestDescription.java openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace018/TestDescription.java --- openjdk-25-25~32ea/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace018/TestDescription.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/monitoring/stress/thread/strace018/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 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 @@ -44,7 +44,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/native * nsk.monitoring.stress.thread.strace010 * -testMode=server * -MBeanServer=custom diff -Nru openjdk-25-25~32ea/test/jdk/ProblemList.txt openjdk-25-25.0.1+8/test/jdk/ProblemList.txt --- openjdk-25-25~32ea/test/jdk/ProblemList.txt 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/ProblemList.txt 2025-09-25 16:16:56.000000000 +0000 @@ -773,6 +773,7 @@ jdk/jfr/event/oldobject/TestShenandoah.java 8342951 generic-all jdk/jfr/event/runtime/TestResidentSetSizeEvent.java 8309846 aix-ppc64 jdk/jfr/jvm/TestWaste.java 8282427 generic-all +jdk/jfr/event/io/TestIOTopFrame.java 8362556 generic-all ############################################################################ diff -Nru openjdk-25-25~32ea/test/jdk/TEST.ROOT openjdk-25-25.0.1+8/test/jdk/TEST.ROOT --- openjdk-25-25~32ea/test/jdk/TEST.ROOT 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/TEST.ROOT 2025-09-25 16:16:56.000000000 +0000 @@ -102,6 +102,8 @@ vm.cds.write.archived.java.heap \ vm.continuations \ vm.musl \ + vm.asan \ + vm.ubsan \ vm.debug \ vm.hasSA \ vm.hasJFR \ diff -Nru openjdk-25-25~32ea/test/jdk/build/AbsPathsInImage.java openjdk-25-25.0.1+8/test/jdk/build/AbsPathsInImage.java --- openjdk-25-25~32ea/test/jdk/build/AbsPathsInImage.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/build/AbsPathsInImage.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 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 @@ -40,6 +40,8 @@ * @bug 8226346 * @summary Check all output files for absolute path fragments * @requires !vm.debug + * @comment ASAN keeps the 'unwanted' paths in the binaries because of its build options + * @requires !vm.asan * @run main/othervm -Xmx900m AbsPathsInImage */ public class AbsPathsInImage { diff -Nru openjdk-25-25~32ea/test/jdk/java/awt/event/KeyEvent/KeyCharTest/KeyCharTest.java openjdk-25-25.0.1+8/test/jdk/java/awt/event/KeyEvent/KeyCharTest/KeyCharTest.java --- openjdk-25-25~32ea/test/jdk/java/awt/event/KeyEvent/KeyCharTest/KeyCharTest.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/java/awt/event/KeyEvent/KeyCharTest/KeyCharTest.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 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 @@ -23,7 +23,7 @@ /* @test - @bug 5013984 + @bug 5013984 8360647 @summary Tests KEY_PRESSED has the same KeyChar as KEY_RELEASED @key headful @run main KeyCharTest @@ -37,7 +37,7 @@ import java.util.HashMap; public class KeyCharTest extends Frame implements KeyListener { - HashMap transMap = new HashMap(); + HashMap transMap = new HashMap<>(); public void keyTyped(KeyEvent e){ } @@ -47,22 +47,35 @@ } public void keyReleased(KeyEvent e){ - Object value = transMap.get(e.getKeyCode()); - if (value != null && e.getKeyChar() != ((Character)value).charValue()) { + Character value = transMap.get(e.getKeyCode()); + if (value != null && e.getKeyChar() != value) { throw new RuntimeException("Wrong KeyChar on KEY_RELEASED "+ KeyEvent.getKeyText(e.getKeyCode())); } } - public void start () { + private void testKeyRange(Robot robot, int start, int end) { + System.out.printf("\nTesting range on %d to %d\n", start, end); + for(int vkey = start; vkey <= end; vkey++) { + try { + robot.keyPress(vkey); + robot.keyRelease(vkey); + System.out.println(KeyEvent.getKeyText(vkey) + " " + vkey); + } catch (RuntimeException ignored) {} + } + robot.delay(100); + } + + public void start() throws Exception { + Robot robot = new Robot(); addKeyListener(this); setLocationRelativeTo(null); setSize(200, 200); setVisible(true); requestFocus(); + boolean wasNumlockPressed = false; try { - Robot robot = new Robot(); robot.setAutoDelay(10); robot.setAutoWaitForIdle(true); robot.delay(100); @@ -72,22 +85,25 @@ robot.mousePress(MouseEvent.BUTTON1_DOWN_MASK); robot.mouseRelease(MouseEvent.BUTTON1_DOWN_MASK); - for(int vkey = 0x20; vkey < 0x7F; vkey++) { - try { - robot.keyPress(vkey); - robot.keyRelease(vkey); - System.out.println(KeyEvent.getKeyText(vkey) + " " + vkey); - } catch (RuntimeException e) { - } - } - robot.delay(100); + testKeyRange(robot, 0x20, 0x7E); + + // Try again with a different numpad state. + robot.keyPress(KeyEvent.VK_NUM_LOCK); + robot.keyRelease(KeyEvent.VK_NUM_LOCK); + wasNumlockPressed = true; + + testKeyRange(robot, KeyEvent.VK_NUMPAD0, KeyEvent.VK_DIVIDE); } catch(Exception e){ - e.printStackTrace(); throw new RuntimeException("Exception while performing Robot actions."); + } finally { + if (wasNumlockPressed) { + robot.keyPress(KeyEvent.VK_NUM_LOCK); + robot.keyRelease(KeyEvent.VK_NUM_LOCK); + } } } - public static void main(String[] args) { + public static void main(String[] args) throws Exception { KeyCharTest test = new KeyCharTest(); try { test.start(); diff -Nru openjdk-25-25~32ea/test/jdk/java/io/File/EmptyPath.java openjdk-25-25.0.1+8/test/jdk/java/io/File/EmptyPath.java --- openjdk-25-25~32ea/test/jdk/java/io/File/EmptyPath.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/java/io/File/EmptyPath.java 2025-09-25 16:16:56.000000000 +0000 @@ -22,15 +22,18 @@ */ /* @test - * @bug 4842706 8024695 8361587 + * @bug 4842706 8024695 8361587 8362429 * @summary Test some file operations with empty path * @run junit EmptyPath */ import java.io.File; +import java.io.FileFilter; import java.io.FileInputStream; +import java.io.FilenameFilter; import java.io.FileNotFoundException; import java.io.IOException; +import java.net.MalformedURLException; import java.nio.file.Files; import java.nio.file.FileStore; import java.nio.file.Path; @@ -38,6 +41,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; +import java.util.function.Function; import java.util.stream.Collectors; import org.junit.jupiter.api.BeforeAll; @@ -211,7 +215,15 @@ @Test public void list() throws IOException { - String[] files = f.list(); + list(f.list()); + } + + @Test + public void listFilenameFilter() throws IOException { + list(f.list((FilenameFilter)null)); + } + + private void list(String[] files) throws IOException { assertNotNull(files); Set ioSet = new HashSet(Arrays.asList(files)); Set nioSet = new HashSet(); @@ -221,11 +233,42 @@ @Test public void listFiles() throws IOException { - File child = new File(f.getAbsoluteFile(), "child"); + listFiles(x -> x.listFiles()); + } + + @Test + public void listFilesFileFilter() throws IOException { + FileFilter ff = new FileFilter() { + public boolean accept(File pathname) { return true; } + }; + listFiles(x -> x.listFiles(ff)); + } + + @Test + public void listFilesNullFileFilter() throws IOException { + listFiles(x -> x.listFiles((FileFilter)null)); + } + + @Test + public void listFilesFilenameFilter() throws IOException { + FilenameFilter fnf = new FilenameFilter() { + public boolean accept(File dir, String name) { return true; } + }; + listFiles(x -> x.listFiles(fnf)); + } + + @Test + public void listFilesNullFilenameFilter() throws IOException { + listFiles(x -> x.listFiles((FilenameFilter)null)); + } + + private void listFiles(Function func) throws IOException { + String childName = "child" + System.nanoTime(); + File child = new File(f.getAbsoluteFile(), childName); assertTrue(child.createNewFile()); child.deleteOnExit(); - File[] files = f.listFiles(); + File[] files = func.apply(f); for (File file : files) assertEquals(-1, f.toString().indexOf(File.separatorChar)); @@ -348,4 +391,9 @@ public void toURI() { assertEquals(f.toPath().toUri(), f.toURI()); } + + @Test + public void toURL() throws MalformedURLException { + assertEquals(f.toPath().toUri().toURL(), f.toURL()); + } } diff -Nru openjdk-25-25~32ea/test/jdk/java/util/Calendar/JapaneseCalendarNameTest.java openjdk-25-25.0.1+8/test/jdk/java/util/Calendar/JapaneseCalendarNameTest.java --- openjdk-25-25~32ea/test/jdk/java/util/Calendar/JapaneseCalendarNameTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/java/util/Calendar/JapaneseCalendarNameTest.java 2025-09-25 16:16:56.000000000 +0000 @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2018, 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8202088 8207152 8217609 8219890 8358819 + * @summary Test the localized Japanese calendar names, such as + * the Reiwa Era names (May 1st. 2019-), or the Gan-nen text + * @modules jdk.localedata + * @run junit JapaneseCalendarNameTest + */ + +import static java.util.Calendar.*; +import static java.util.Locale.*; + +import java.text.DateFormat; +import java.text.ParseException; +import java.util.Calendar; +import java.util.Locale; +import java.util.stream.Stream; + +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class JapaneseCalendarNameTest { + private static final Calendar c = new Calendar.Builder() + .setCalendarType("japanese") + .setFields(ERA, 5, YEAR, 1, MONTH, MAY, DAY_OF_MONTH, 1) + .build(); + private static final Locale JAJPJP = Locale.of("ja", "JP", "JP"); + private static final Locale JCAL = Locale.forLanguageTag("ja-u-ca-japanese"); + + private static Stream reiwaEraNames() { + return Stream.of( + // type, locale, name + Arguments.of(LONG, JAPAN, "令和"), + Arguments.of(LONG, US, "Reiwa"), + Arguments.of(LONG, CHINA, "令和"), + Arguments.of(SHORT, JAPAN, "令和"), + Arguments.of(SHORT, US, "Reiwa"), + Arguments.of(SHORT, CHINA, "令和") + ); + } + + @ParameterizedTest + @MethodSource("reiwaEraNames") + void testReiwaEraName(int type, Locale locale, String expected) { + assertEquals(expected, c.getDisplayName(ERA, type, locale)); + } + + private static Stream gannen() { + return Stream.of( + // format, + // formatted text + Arguments.of(DateFormat.getDateInstance(DateFormat.FULL, JAJPJP), + "令和元年5月1日水曜日"), + Arguments.of(DateFormat.getDateInstance(DateFormat.FULL, JCAL), + "令和元年5月1日水曜日"), + Arguments.of(DateFormat.getDateInstance(DateFormat.LONG, JAJPJP), + "令和元年5月1日"), + Arguments.of(DateFormat.getDateInstance(DateFormat.LONG, JCAL), + "令和元年5月1日"), + Arguments.of(DateFormat.getDateInstance(DateFormat.MEDIUM, JAJPJP), + "令和1年5月1日"), + Arguments.of(DateFormat.getDateInstance(DateFormat.MEDIUM, JCAL), + "令和1年5月1日"), + Arguments.of(DateFormat.getDateInstance(DateFormat.SHORT, JAJPJP), + "令和1/5/1"), + Arguments.of(DateFormat.getDateInstance(DateFormat.SHORT, JCAL), + "令和1/5/1") + ); + } + + @ParameterizedTest + @MethodSource("gannen") + void testGannenFormat(DateFormat df, String expected) { + assertEquals(expected, df.format(c.getTime())); + } + + @ParameterizedTest + @MethodSource("gannen") + void testGannenParse(DateFormat df, String formatted) throws ParseException { + assertEquals(c.getTime(), df.parse(formatted)); + } +} diff -Nru openjdk-25-25~32ea/test/jdk/java/util/Calendar/JapaneseEraNameTest.java openjdk-25-25.0.1+8/test/jdk/java/util/Calendar/JapaneseEraNameTest.java --- openjdk-25-25~32ea/test/jdk/java/util/Calendar/JapaneseEraNameTest.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/java/util/Calendar/JapaneseEraNameTest.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2018, 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 - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * @test - * @bug 8202088 8207152 8217609 8219890 - * @summary Test the localized Japanese new era name (May 1st. 2019-) - * is retrieved no matter CLDR provider contains the name or not. - * @modules jdk.localedata - * @run testng JapaneseEraNameTest - */ - -import static java.util.Calendar.*; -import static java.util.Locale.*; -import java.util.Calendar; -import java.util.Locale; - -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; -import static org.testng.Assert.assertEquals; - -@Test -public class JapaneseEraNameTest { - static final Calendar c = new Calendar.Builder() - .setCalendarType("japanese") - .setFields(ERA, 5, YEAR, 1, MONTH, MAY, DAY_OF_MONTH, 1) - .build(); - - @DataProvider(name="names") - Object[][] names() { - return new Object[][] { - // type, locale, name - { LONG, JAPAN, "\u4ee4\u548c" }, - { LONG, US, "Reiwa" }, - { LONG, CHINA, "\u4ee4\u548c" }, - { SHORT, JAPAN, "\u4ee4\u548c" }, - { SHORT, US, "Reiwa" }, - { SHORT, CHINA, "\u4ee4\u548c" }, - }; - } - - @Test(dataProvider="names") - public void testJapaneseNewEraName(int type, Locale locale, String expected) { - assertEquals(c.getDisplayName(ERA, type, locale), expected); - } -} diff -Nru openjdk-25-25~32ea/test/jdk/java/util/Currency/ISO4217-list-one.txt openjdk-25-25.0.1+8/test/jdk/java/util/Currency/ISO4217-list-one.txt --- openjdk-25-25~32ea/test/jdk/java/util/Currency/ISO4217-list-one.txt 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/java/util/Currency/ISO4217-list-one.txt 2025-09-25 16:16:56.000000000 +0000 @@ -1,12 +1,12 @@ # # -# Amendments up until ISO 4217 AMENDMENT NUMBER 179 -# (As of 02 May 2025) +# Amendments up until ISO 4217 AMENDMENT NUMBER 180 +# (As of 22 September 2025) # # Version FILEVERSION=3 -DATAVERSION=179 +DATAVERSION=180 # ISO 4217 currency data AF AFN 971 2 @@ -44,7 +44,7 @@ BR BRL 986 2 IO USD 840 2 BN BND 96 2 -BG BGN 975 2 +BG BGN 975 2 2025-12-31-22-00-00 EUR 978 2 BF XOF 952 0 BI BIF 108 0 KH KHR 116 2 @@ -69,7 +69,7 @@ CI XOF 952 0 HR EUR 978 2 CU CUP 192 2 -CW ANG 532 2 2025-04-01-04-00-00 XCG 532 2 +CW XCG 532 2 CY EUR 978 2 CZ CZK 203 2 DK DKK 208 2 @@ -233,7 +233,7 @@ SD SDG 938 2 SR SRD 968 2 SJ NOK 578 2 -SX ANG 532 2 2025-04-01-04-00-00 XCG 532 2 +SX XCG 532 2 SZ SZL 748 2 SE SEK 752 2 CH CHF 756 2 diff -Nru openjdk-25-25~32ea/test/jdk/java/util/Currency/ValidateISO4217.java openjdk-25-25.0.1+8/test/jdk/java/util/Currency/ValidateISO4217.java --- openjdk-25-25~32ea/test/jdk/java/util/Currency/ValidateISO4217.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/java/util/Currency/ValidateISO4217.java 2025-09-25 16:16:56.000000000 +0000 @@ -26,7 +26,7 @@ * @bug 4691089 4819436 4942982 5104960 6544471 6627549 7066203 7195759 * 8039317 8074350 8074351 8145952 8187946 8193552 8202026 8204269 * 8208746 8209775 8264792 8274658 8283277 8296239 8321480 8334653 - * 8354343 8354344 8356096 + * 8354343 8354344 8356096 8368308 * @summary Validate ISO 4217 data for Currency class. * @modules java.base/java.util:open * jdk.localedata @@ -116,7 +116,7 @@ private static final Set currenciesNotYetDefined = new HashSet<>(); // Codes that are obsolete, do not have related country, extra currency private static final String otherCodes = - "ADP-AFA-ATS-AYM-AZM-BEF-BGL-BOV-BYB-BYR-CHE-CHW-CLF-COU-CUC-CYP-" + "ADP-AFA-ATS-AYM-AZM-BEF-BGL-BGN-BOV-BYB-BYR-CHE-CHW-CLF-COU-CUC-CYP-" + "DEM-EEK-ESP-FIM-FRF-GHC-GRD-GWP-HRK-IEP-ITL-LTL-LUF-LVL-MGF-MRO-MTL-MXV-MZM-NLG-" + "PTE-ROL-RUR-SDD-SIT-SLL-SKK-SRG-STD-TMM-TPE-TRL-VEF-UYI-USN-USS-VEB-VED-" + "XAD-XAG-XAU-XBA-XBB-XBC-XBD-XDR-XFO-XFU-XPD-XPT-XSU-XTS-XUA-XXX-" diff -Nru openjdk-25-25~32ea/test/jdk/javax/swing/JMenuItem/TestRadioAndCheckMenuItemWithIcon.java openjdk-25-25.0.1+8/test/jdk/javax/swing/JMenuItem/TestRadioAndCheckMenuItemWithIcon.java --- openjdk-25-25~32ea/test/jdk/javax/swing/JMenuItem/TestRadioAndCheckMenuItemWithIcon.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/javax/swing/JMenuItem/TestRadioAndCheckMenuItemWithIcon.java 2025-09-25 16:16:56.000000000 +0000 @@ -0,0 +1,155 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8348760 + * @summary Verify if RadioButtonMenuItem bullet and + * JCheckboxMenuItem checkmark is shown if + * JRadioButtonMenuItem and JCheckboxMenuItem + * is rendered with ImageIcon in WindowsLookAndFeel + * @requires (os.family == "windows") + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @run main/manual TestRadioAndCheckMenuItemWithIcon + */ + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.event.ActionEvent; +import java.awt.event.KeyEvent; +import java.awt.image.BufferedImage; + +import javax.swing.AbstractButton; +import javax.swing.ButtonGroup; +import javax.swing.ImageIcon; +import javax.swing.JCheckBoxMenuItem; +import javax.swing.JFrame; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JPanel; +import javax.swing.JRadioButtonMenuItem; +import javax.swing.KeyStroke; +import javax.swing.UIManager; + +public class TestRadioAndCheckMenuItemWithIcon { + + private static final String INSTRUCTIONS = """ + A top level Menu will be shown. + + Clicking on the Menu will show a + JRadioButtonMenuItem group with 3 radiobutton menuitems + and a JCheckBoxMenuItem group with 3 checkbox menuitems. + + First radiobutton menuitem is selected with imageicon of a red square. + Second radiobutton menuitem is unselected with imageicon. + Third radiobutton menuItem is unselected without imageicon. + + First checkbox menuitem is selected with imageicon. + Second checkbox menuitem is unselected with imageicon. + Third checkbox menuItem is unselected without imageicon. + + Verify that for first JRadioButtonMenuItem with imageicon, + a bullet is shown alongside the imageicon and + for first JCheckBoxMenuItem with imageicon + a checkmark is shown alongside the imageicon. + + If bullet and checkmark is shown, test passes else fails."""; + + public static void main(String[] args) throws Exception { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + PassFailJFrame.builder() + .title("JRadioButtonMenuItem Instructions") + .instructions(INSTRUCTIONS) + .columns(60) + .testUI(TestRadioAndCheckMenuItemWithIcon::doTest) + .build() + .awaitAndCheck(); + } + + public static JFrame doTest() { + BufferedImage img = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB); + Graphics g = img.getGraphics(); + g.setColor(Color.red); + g.fillRect(0, 0, img.getWidth(), img.getHeight()); + g.dispose(); + + BufferedImage img2 = new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB); + Graphics g2 = img2.getGraphics(); + g2.setColor(Color.red); + g2.fillRect(0, 0, img2.getWidth(), img2.getHeight()); + g2.dispose(); + + JFrame frame = new JFrame("RadioButtonWithImageIcon"); + ImageIcon imageIcon1 = new ImageIcon(img); + ImageIcon imageIcon2 = new ImageIcon(img2); + AbstractButton button1; + JRadioButtonMenuItem m1 = new JRadioButtonMenuItem("JRadioButtonMenuItem 1", + imageIcon1); + m1.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F4, ActionEvent.ALT_MASK|ActionEvent.CTRL_MASK|ActionEvent.SHIFT_MASK)); + button1 = m1; + button1.setSelected(true); + AbstractButton button2 = new JRadioButtonMenuItem("JRadioButtonMenuItem 2", imageIcon2); + AbstractButton button3 = new JRadioButtonMenuItem("JRadioButtonMenuItem 3"); + + ButtonGroup buttonGroup = new ButtonGroup(); + buttonGroup.add(button1); + buttonGroup.add(button2); + buttonGroup.add(button3); + + AbstractButton check1 = new JCheckBoxMenuItem("JCheckBoxMenuItem 1", + imageIcon1); + check1.setSelected(true); + AbstractButton check2 = new JCheckBoxMenuItem("JCheckBoxMenuItem 2", imageIcon1); + JCheckBoxMenuItem c3; + AbstractButton check3 = c3 = new JCheckBoxMenuItem("JCheckBoxMenuItem 3"); + c3.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F5, ActionEvent.ALT_MASK|ActionEvent.CTRL_MASK|ActionEvent.SHIFT_MASK)); + + JMenu topLevel = new JMenu("Menu"); + + topLevel.add(button1); + topLevel.add(button2); + topLevel.add(button3); + + topLevel.addSeparator(); + + topLevel.add(check1); + topLevel.add(check2); + topLevel.add(check3); + + AbstractButton menuitem1 = new JMenuItem("MenuItem1"); + AbstractButton menuitem2 = new JMenuItem("MenuItem2", imageIcon1); + topLevel.addSeparator(); + topLevel.add(menuitem1); + topLevel.add(menuitem2); + + JMenuBar menuBar = new JMenuBar(); + menuBar.add(topLevel); + + frame.setJMenuBar(menuBar); + frame.setSize(300, 300); + return frame; + + } +} diff -Nru openjdk-25-25~32ea/test/jdk/jdk/jfr/event/io/TestIOTopFrame.java openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/io/TestIOTopFrame.java --- openjdk-25-25~32ea/test/jdk/jdk/jfr/event/io/TestIOTopFrame.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/io/TestIOTopFrame.java 2025-09-25 16:16:56.000000000 +0000 @@ -0,0 +1,372 @@ +/* + * Copyright (c) 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 + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package jdk.jfr.event.io; + +import static java.nio.file.StandardOpenOption.READ; +import static java.nio.file.StandardOpenOption.WRITE; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.RandomAccessFile; +import java.nio.ByteBuffer; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.ServerSocket; +import java.net.Socket; +import java.nio.channels.AsynchronousFileChannel; +import java.nio.channels.FileChannel; +import java.nio.channels.SeekableByteChannel; +import java.nio.channels.ServerSocketChannel; +import java.nio.channels.SocketChannel; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.OpenOption; +import java.nio.file.StandardOpenOption; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import jdk.jfr.Recording; +import jdk.jfr.consumer.RecordedEvent; +import jdk.jfr.consumer.RecordedMethod; +import jdk.jfr.consumer.RecordedStackTrace; +import jdk.jfr.consumer.RecordingFile; + +/** + * @test TestIOTopFrame + * @summary Tests that the top frames of I/O events are as expected. + * @requires vm.flagless + * @requires vm.hasJFR + * @library /test/lib /test/jdk + * @run main/othervm jdk.jfr.event.io.TestIOTopFrame + */ + +// Lines commented with a number indicate that they are the nth event for that +// top frame. The invocation of the methods RandomAccessFile::readUTF(), +// SocketInputStream::readNBytes(...) and FileInputStream::readAllBytes() +// results in 2-3 events. +public class TestIOTopFrame { + private static final String EVENT_FILE_READ = "jdk.FileRead"; + private static final String EVENT_FILE_FORCE = "jdk.FileForce"; + private static final String EVENT_FILE_WRITE = "jdk.FileWrite"; + private static final String EVENT_SOCKET_READ = "jdk.SocketRead"; + private static final String EVENT_SOCKET_WRITE = "jdk.SocketWrite"; + + public static void main(String... args) throws Exception { + testFileRead(); + testFileWrite(); + testSocketStreams(); + testSocketChannels(); + } + + private static void testFileRead() throws Exception { + printTestDescription(EVENT_FILE_READ, "RandomAccessFile, FileInputStream, Files.newInputStream and Files.newByteChannel"); + File f1 = new File("testFileRead-1.bin"); + writeRAF(f1); + File f2 = new File("testFileRead-2.bin"); + writeFileStream(f2); + Path p = Path.of("testFileRead-3.bin"); + writeFilesNew(p); + try (Recording r = new Recording()) { + r.enable(EVENT_FILE_READ).withStackTrace(); + r.start(); + readRAF(f1); + readFileStream(f2); + readFilesNew(p); + r.stop(); + assertTopFrames(r, "readFilesNew", 1, "readRAF", 20, "readStream", 15); + } + } + + private static void readFileStream(File f) throws Exception { + try (FileInputStream fis = new FileInputStream(f)) { + readStream(fis); + } + } + + private static void writeFileStream(File f) throws Exception { + try (FileOutputStream fos = new FileOutputStream(f)) { + writeStream(fos); + } + } + + private static void readFilesNew(Path p) throws Exception { + ByteBuffer b = ByteBuffer.allocateDirect(1000); + try (SeekableByteChannel channel = Files.newByteChannel(p)) { + channel.read(b); // 1 + } + try (InputStream is = Files.newInputStream(p)) { + readStream(is); + } + } + + private static void testFileWrite() throws Exception { + printTestDescription(EVENT_FILE_WRITE + ", " + EVENT_FILE_FORCE, "RandomAccessFile, FileInputStream, Files.newOutputStream and Files.newByteChanneland"); + File f = new File("testFileWrite.bin"); + try (Recording r = new Recording()) { + r.enable(EVENT_FILE_WRITE).withStackTrace(); + r.enable(EVENT_FILE_FORCE).withStackTrace(); + r.start(); + writeRAF(f); + writeFileStream(f); + writeAsync(f); + writeFilesNew(f.toPath()); + r.stop(); + assertTopFrames(r, "writeFilesNew", 1, "writeRAF", 17, "writeStream", 6, "writeAsync", 1); + } + } + + private static void writeFilesNew(Path p) throws Exception { + ByteBuffer b = ByteBuffer.allocateDirect(1000); + OpenOption[] options = { StandardOpenOption.CREATE, StandardOpenOption.WRITE }; + try (SeekableByteChannel channel = Files.newByteChannel(p, options)) { + channel.write(b); // 1 + } + try (OutputStream os = Files.newOutputStream(p, options)) { + writeStream(os); + } + } + + private static void writeAsync(File file) throws Exception { + AsynchronousFileChannel channel = AsynchronousFileChannel.open(file.toPath(), READ, WRITE); + ByteBuffer[] buffers = createBuffers(); + channel.force(true); + } + + private static void writeStream(OutputStream os) throws Exception { + byte[] bytes = new byte[200]; + os.write(67); // 1 + os.write(bytes); // 2 + os.write(bytes, 0, 1); // 3 + } + + private static void writeRAF(File file) throws Exception { + ByteBuffer[] buffers = createBuffers(); + byte[] bytes = new byte[100]; + try (RandomAccessFile raf = new RandomAccessFile(file, "rw")) { + raf.writeUTF("o\n"); // 1 + raf.writeUTF("hello"); // 2 + raf.write(23); // 3 + raf.write(bytes); // 4 + raf.write(bytes, 0, 50); // 5 + raf.writeBoolean(true); // 6 + raf.writeByte(23); // 7 + raf.writeBytes("hello"); // 8 + raf.writeChar('h'); // 9 + raf.writeChars("hello"); // 10 + raf.writeDouble(76.0); // 11 + raf.writeFloat(21.7f); // 12 + raf.writeInt(4711); // 13 + raf.writeLong(Long.MAX_VALUE); // 14 + FileChannel fc = raf.getChannel(); + fc.write(buffers[0]); // 15 + fc.write(buffers); // 16 + fc.force(true); // 17 + } + } + + private static void readStream(InputStream is) throws Exception { + byte[] bytes = new byte[10]; + is.read(); // 1 + is.read(bytes); // 2 + is.read(bytes, 0, 3); // 3 + is.readNBytes(2); // 4 + is.readNBytes(bytes, 0, 1); // 5 + byte[] leftOver = is.readAllBytes(); // 6, 7, 8 or 6, 7 for Files.newInputStream + if (leftOver.length < 1) { + throw new Exception("Expected some bytes to be read"); + } + } + + private static void readRAF(File file) throws Exception { + ByteBuffer[] buffers = createBuffers(); + byte[] bytes = new byte[100]; + try (RandomAccessFile raf = new RandomAccessFile(file, "r")) { + raf.readLine(); // 1 + raf.readUTF(); // 2, 3 (size and content) + raf.read(); // 4 + raf.read(bytes); // 5 + raf.read(bytes, 0, 0); // 6 + raf.readBoolean(); // 7 + raf.readByte(); // 8 + raf.readChar(); // 9 + raf.readDouble(); // 10 + raf.readFloat(); // 11 + raf.seek(0); + raf.readFully(bytes); // 12 + raf.seek(0); + raf.readFully(bytes, 10, 10); // 13 + raf.readInt(); // 14 + raf.readLong(); // 15 + raf.readShort(); // 16 + raf.readUnsignedByte(); // 17 + raf.readUnsignedShort(); // 18 + FileChannel fc = raf.getChannel(); + fc.read(buffers[0]); // 19 + if (fc.read(buffers) < 1) { // 20 + throw new Exception("Expected some bytes to be read"); + }; + } + } + + private static void testSocketChannels() throws Exception { + printTestDescription(EVENT_SOCKET_READ + ", " + EVENT_SOCKET_WRITE, "SocketChannel and Socket adapters"); + try (Recording r = new Recording()) { + try (ServerSocketChannel ssc = ServerSocketChannel.open()) { + ssc.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), 0)); + r.enable(EVENT_SOCKET_READ).withStackTrace(); + r.enable(EVENT_SOCKET_WRITE).withStackTrace(); + r.start(); + Thread readerThread = Thread.ofPlatform().start(() -> readSocketChannel(ssc)); + writeSocketChannel(ssc); + readerThread.join(); + r.stop(); + assertTopFrames(r, "readSocket", 6, "readSocketChannel", 2, "writeSocket", 3, "writeSocketChannel", 2); + } + } + } + + private static void readSocketChannel(ServerSocketChannel ssc) { + ByteBuffer[] buffers = createBuffers(); + try (SocketChannel sc = ssc.accept()) { + sc.read(buffers[0]); // 1 + sc.read(buffers); // 2 + try (InputStream is = sc.socket().getInputStream()) { + readSocket(is); + } + } catch (Exception ioe) { + throw new RuntimeException(ioe); + } + } + + private static void writeSocketChannel(ServerSocketChannel ssc) throws Exception { + ByteBuffer[] buffers = createBuffers(); + try (SocketChannel sc = SocketChannel.open(ssc.getLocalAddress())) { + sc.write(buffers[0]); // 1 + sc.write(buffers); // 2 + try (OutputStream out = sc.socket().getOutputStream()) { + writeSocket(out); + } + } + } + + private static void testSocketStreams() throws Exception { + printTestDescription(EVENT_SOCKET_READ + ", " + EVENT_SOCKET_WRITE, "SocketInputStream and SocketOutputStream"); + try (ServerSocket serverSocket = new ServerSocket(0); + Socket client = new Socket("localhost", serverSocket.getLocalPort()); + Socket server = serverSocket.accept(); + OutputStream socketOut = client.getOutputStream(); + InputStream socketIn = server.getInputStream(); + Recording r = new Recording()) { + r.enable(EVENT_SOCKET_READ).withStackTrace(); + r.enable(EVENT_SOCKET_WRITE).withStackTrace(); + r.start(); + Thread readerThread = Thread.ofPlatform().start(() -> readSocket(socketIn)); + writeSocket(socketOut); + readerThread.join(); + r.stop(); + assertTopFrames(r, "readSocket", 6, "writeSocket", 3); + } + } + + private static void writeSocket(OutputStream socketOut) throws Exception { + byte[] bytes = "hello, world!".getBytes(); + socketOut.write(bytes); // 1 + socketOut.write(4711); // 2 + socketOut.write(bytes, 0, 3); // 3 + } + + private static void readSocket(InputStream socketIn) { + try { + byte[] bytes = new byte[100]; + socketIn.read(); // 1 + socketIn.read(bytes, 0, 3); // 2 + socketIn.readNBytes(3); // 3, 4 + socketIn.readNBytes(bytes, 0, 2); // 5 + if (socketIn.read(bytes) < 1) { // 6 + throw new RuntimeException("Expected some bytes to be read"); + } + } catch (IOException ioe) { + throw new RuntimeException(ioe); + } + } + + private static void assertTopFrames(Recording r, Object... frameCount) throws Exception { + TreeMap expected = new TreeMap<>(); + for (int i = 0; i < frameCount.length; i += 2) { + String method = TestIOTopFrame.class.getName() + "::" + frameCount[i]; + Integer count = (Integer) frameCount[i + 1]; + expected.put(method, count); + } + Path dumpFile = Path.of("test-top-frame-" + r.getId() + ".jfr"); + r.dump(dumpFile); + List events = RecordingFile.readAllEvents(dumpFile); + TreeMap actual = new TreeMap<>(); + for (RecordedEvent e : events) { + RecordedStackTrace st = e.getStackTrace(); + RecordedMethod topMethod = st.getFrames().get(0).getMethod(); + String methodName = topMethod.getType().getName() + "::" + topMethod.getName(); + actual.merge(methodName, 1, Integer::sum); + } + + printMap("Expected", expected); + printMap("Actual", actual); + if (!expected.equals(actual)) { + System.out.println(events); + throw new Exception("Top methods are not as expected"); + } + Files.delete(dumpFile); + } + + private static void printTestDescription(String eventNames, String components) { + String title = "Testing top frames for events: " + eventNames + " (" + components + ")"; + System.out.println(title); + System.out.println("*".repeat(title.length())); + } + + private static void printMap(String title, TreeMap map) { + System.out.println(title + ":"); + for (var entry : map.entrySet()) { + System.out.println(entry.getKey() + "\t" + entry.getValue()); + } + System.out.println(); + } + + private static ByteBuffer[] createBuffers() { + byte[] data = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; + ByteBuffer buffer = ByteBuffer.wrap(data); + ByteBuffer[] buffers = new ByteBuffer[2]; + buffers[0] = buffer.duplicate(); + buffers[1] = buffer.duplicate(); + return buffers; + } +} diff -Nru openjdk-25-25~32ea/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java openjdk-25-25.0.1+8/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java --- openjdk-25-25~32ea/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/security/infra/java/security/cert/CertPathValidator/certification/CAInterop.java 2025-09-25 16:16:56.000000000 +0000 @@ -417,50 +417,6 @@ */ /* - * @test id=affirmtrustcommercialca - * @bug 8040012 - * @summary Interoperability tests with AffirmTrust Commercial CA - * @library /test/lib - * @build jtreg.SkippedException ValidatePathWithURL CAInterop - * @run main/othervm/manual -Djava.security.debug=certpath,ocsp CAInterop affirmtrustcommercialca OCSP - * @run main/othervm/manual -Djava.security.debug=certpath,ocsp -Dcom.sun.security.ocsp.useget=false CAInterop affirmtrustcommercialca OCSP - * @run main/othervm/manual -Djava.security.debug=certpath CAInterop affirmtrustcommercialca CRL - */ - -/* - * @test id=affirmtrustnetworkingca - * @bug 8040012 - * @summary Interoperability tests with AffirmTrust Networking CA - * @library /test/lib - * @build jtreg.SkippedException ValidatePathWithURL CAInterop - * @run main/othervm/manual -Djava.security.debug=certpath,ocsp CAInterop affirmtrustnetworkingca OCSP - * @run main/othervm/manual -Djava.security.debug=certpath,ocsp -Dcom.sun.security.ocsp.useget=false CAInterop affirmtrustnetworkingca OCSP - * @run main/othervm/manual -Djava.security.debug=certpath CAInterop affirmtrustnetworkingca CRL - */ - -/* - * @test id=affirmtrustpremiumca - * @bug 8040012 - * @summary Interoperability tests with AffirmTrust Premium CA - * @library /test/lib - * @build jtreg.SkippedException ValidatePathWithURL CAInterop - * @run main/othervm/manual -Djava.security.debug=certpath,ocsp CAInterop affirmtrustpremiumca OCSP - * @run main/othervm/manual -Djava.security.debug=certpath,ocsp -Dcom.sun.security.ocsp.useget=false CAInterop affirmtrustpremiumca OCSP - * @run main/othervm/manual -Djava.security.debug=certpath CAInterop affirmtrustpremiumca CRL - */ - -/* - * @test id=affirmtrustpremiumeccca - * @bug 8040012 - * @summary Interoperability tests with AffirmTrust Premium ECC CA - * @library /test/lib - * @build jtreg.SkippedException ValidatePathWithURL CAInterop - * @run main/othervm/manual -Djava.security.debug=certpath,ocsp CAInterop affirmtrustpremiumeccca OCSP - * @run main/othervm/manual -Djava.security.debug=certpath,ocsp -Dcom.sun.security.ocsp.useget=false CAInterop affirmtrustpremiumeccca OCSP - * @run main/othervm/manual -Djava.security.debug=certpath CAInterop affirmtrustpremiumeccca CRL - */ - -/* * @test id=teliarootcav2 * @bug 8317373 * @summary Interoperability tests with Telia Root CA V2 @@ -726,20 +682,6 @@ new CATestURLs("https://valid.servicesca.dhimyotis.com", "https://revoked.servicesca.dhimyotis.com"); - // These are listed at https://www.affirmtrust.com/resources/ - case "affirmtrustcommercialca" -> - new CATestURLs("https://validcommercial.affirmtrust.com", - "https://revokedcommercial.affirmtrust.com"); - case "affirmtrustnetworkingca" -> - new CATestURLs("https://validnetworking.affirmtrust.com", - "https://revokednetworking.affirmtrust.com"); - case "affirmtrustpremiumca" -> - new CATestURLs("https://validpremium.affirmtrust.com", - "https://revokedpremium.affirmtrust.com"); - case "affirmtrustpremiumeccca" -> - new CATestURLs("https://validpremiumecc.affirmtrust.com", - "https://revokedpremiumecc.affirmtrust.com"); - case "teliarootcav2" -> new CATestURLs("https://juolukka.cover.telia.fi:10600", "https://juolukka.cover.telia.fi:10601"); diff -Nru openjdk-25-25~32ea/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java openjdk-25-25.0.1+8/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java --- openjdk-25-25~32ea/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/sun/security/lib/cacerts/VerifyCACerts.java 2025-09-25 16:16:56.000000000 +0000 @@ -28,7 +28,7 @@ * 8223499 8225392 8232019 8234245 8233223 8225068 8225069 8243321 8243320 * 8243559 8225072 8258630 8259312 8256421 8225081 8225082 8225083 8245654 * 8305975 8304760 8307134 8295894 8314960 8317373 8317374 8318759 8319187 - * 8321408 8316138 8341057 8303770 8350498 8359170 + * 8321408 8316138 8341057 8303770 8350498 8359170 8361212 * @summary Check root CA entries in cacerts file */ import java.io.ByteArrayInputStream; @@ -47,12 +47,12 @@ + File.separator + "security" + File.separator + "cacerts"; // The numbers of certs now. - private static final int COUNT = 113; + private static final int COUNT = 109; // SHA-256 of cacerts, can be generated with // shasum -a 256 cacerts | sed -e 's/../&:/g' | tr '[:lower:]' '[:upper:]' | cut -c1-95 private static final String CHECKSUM - = "18:36:49:15:B6:71:85:FF:F1:8E:C0:10:BE:0A:41:52:5B:DC:F7:B3:1F:51:7A:45:7D:7A:14:10:3A:59:42:4C"; + = "70:73:12:D3:E8:01:89:28:F5:3D:10:8E:45:34:F6:28:CB:BF:AD:18:19:6D:F1:A2:E7:28:84:30:0B:E1:A6:9F"; // Hex formatter to upper case with ":" delimiter private static final HexFormat HEX = HexFormat.ofDelimiter(":").withUpperCase(); @@ -193,14 +193,6 @@ "43:DF:57:74:B0:3E:7F:EF:5F:E4:0D:93:1A:7B:ED:F1:BB:2E:6B:42:73:8C:4E:6D:38:41:10:3D:3A:A7:F3:39"); put("entrustevca [jdk]", "73:C1:76:43:4F:1B:C6:D5:AD:F4:5B:0E:76:E7:27:28:7C:8D:E5:76:16:C1:E6:E6:14:1A:2B:2C:BC:7D:8E:4C"); - put("affirmtrustnetworkingca [jdk]", - "0A:81:EC:5A:92:97:77:F1:45:90:4A:F3:8D:5D:50:9F:66:B5:E2:C5:8F:CD:B5:31:05:8B:0E:17:F3:F0:B4:1B"); - put("affirmtrustpremiumca [jdk]", - "70:A7:3F:7F:37:6B:60:07:42:48:90:45:34:B1:14:82:D5:BF:0E:69:8E:CC:49:8D:F5:25:77:EB:F2:E9:3B:9A"); - put("affirmtrustcommercialca [jdk]", - "03:76:AB:1D:54:C5:F9:80:3C:E4:B2:E2:01:A0:EE:7E:EF:7B:57:B6:36:E8:A9:3C:9B:8D:48:60:C9:6F:5F:A7"); - put("affirmtrustpremiumeccca [jdk]", - "BD:71:FD:F6:DA:97:E4:CF:62:D1:64:7A:DD:25:81:B0:7D:79:AD:F8:39:7E:B4:EC:BA:9C:5E:84:88:82:14:23"); put("ttelesecglobalrootclass3ca [jdk]", "FD:73:DA:D3:1C:64:4F:F1:B4:3B:EF:0C:CD:DA:96:71:0B:9C:D9:87:5E:CA:7E:31:70:7A:F3:E9:6D:52:2B:BD"); put("ttelesecglobalrootclass2ca [jdk]", diff -Nru openjdk-25-25~32ea/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/Entrust.java openjdk-25-25.0.1+8/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/Entrust.java --- openjdk-25-25~32ea/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/Entrust.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/Entrust.java 2025-09-25 16:16:56.000000000 +0000 @@ -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 @@ -28,7 +28,7 @@ /** * @test - * @bug 8337664 8341059 + * @bug 8337664 8341059 8361212 * @summary Check that TLS Server certificates chaining back to distrusted * Entrust roots are invalid * @library /test/lib @@ -41,14 +41,13 @@ public class Entrust { - private static final String certPath = "chains" + File.separator + "entrust"; + private static final String CERT_PATH = "chains" + File.separator + "entrust"; // Each of the roots have a test certificate chain stored in a file // named "-chain.pem". - private static String[] rootsToTest = new String[]{ - "entrustevca", "entrustrootcaec1", "entrustrootcag2", "entrustrootcag4", - "entrust2048ca", "affirmtrustcommercialca", "affirmtrustnetworkingca", - "affirmtrustpremiumca", "affirmtrustpremiumeccca"}; + private static final String[] ROOTS_TO_TEST = new String[]{ + "entrustevca", "entrustrootcaec1", "entrustrootcag2", + "entrustrootcag4", "entrust2048ca"}; // Date when the restrictions take effect private static final ZonedDateTime DISTRUST_DATE = @@ -63,6 +62,6 @@ }; Date notBefore = distrust.getNotBefore(DISTRUST_DATE); - distrust.testCertificateChain(certPath, notBefore, tms, rootsToTest); + distrust.testCertificateChain(CERT_PATH, notBefore, tms, ROOTS_TO_TEST); } } diff -Nru openjdk-25-25~32ea/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustcommercialca-chain.pem openjdk-25-25.0.1+8/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustcommercialca-chain.pem --- openjdk-25-25~32ea/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustcommercialca-chain.pem 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustcommercialca-chain.pem 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -Root Certificate: - Version: 3 (0x2) - Serial Number: 8608355977964138876 (0x7777062726a9b17c) - Signature Algorithm: sha256WithRSAEncryption - Issuer: C=US, O=AffirmTrust, CN=AffirmTrust Commercial - Validity - Not Before: Jan 29 14:06:06 2010 GMT - Not After : Dec 31 14:06:06 2030 GMT - ------BEGIN CERTIFICATE----- -MIIHHjCCBgagAwIBAgIQAWZjFOyCvT00u/gtkCvS2TANBgkqhkiG9w0BAQsFADCB -gzELMAkGA1UEBhMCQ0ExFDASBgNVBAoTC0FmZmlybVRydXN0MSswKQYDVQQLEyJT -ZWUgd3d3LmFmZmlybXRydXN0LmNvbS9yZXBvc2l0b3J5MTEwLwYDVQQDEyhBZmZp -cm1UcnVzdCBFeHRlbmRlZCBWYWxpZGF0aW9uIENBIC0gRVYxMB4XDTI0MDYyODIx -MzgwNVoXDTI1MDcyODIxMzgwNFowgdgxCzAJBgNVBAYTAkNBMRAwDgYDVQQIEwdP -bnRhcmlvMQ8wDQYDVQQHEwZPdHRhd2ExEzARBgsrBgEEAYI3PAIBAxMCQ0ExGDAW -BgsrBgEEAYI3PAIBAhMHT250YXJpbzEcMBoGA1UEChMTQWZmaXJtdHJ1c3QgTGlt -aXRlZDEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xEDAOBgNVBAUTBzI1 -NDA1NDcxKDAmBgNVBAMTH3ZhbGlkY29tbWVyY2lhbC5hZmZpcm10cnVzdC5jb20w -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDeIT2XO0hJ5wDSbIiIcMvs -P3NpQc7O7v5DqldpME6+Qn2sF5b9hc6j72hgTXREa77uUcP5u1JcMWCSWwYQHMpJ -kFzmIzijhS60wW1epb5QyTgM3ZYh1WKvttFCbHUcrTtd+LoPFYsjw9ZK//K9tPp+ -ddn06/ivWvUO5y5vn0wrCaB9tuLdDn4RCQzK2XoZdDuqhPlBBogJX0vM6lsXjgLy -EbvE+/sKYps/In6VtRvCoYavg3OqaIMeaA7gTiYTb1ZGFOAiltnq7fcp6SZUohK3 -QNihv1DadVc+n8LnEUKKDkgG2YgWEFczaE3qwG3ef6L3MzLGrkgVY+qGHyyv2IE7 -AgMBAAGjggM1MIIDMTAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBT4ARNL47hAsOpa -96VMgKEY3sLIAjAfBgNVHSMEGDAWgBTb72U3C+VHyzXRkB8DwbyIx6fqgDBsBggr -BgEFBQcBAQRgMF4wJwYIKwYBBQUHMAGGG2h0dHA6Ly9vY3NwLmFmZmlybXRydXN0 -LmNvbTAzBggrBgEFBQcwAoYnaHR0cDovL2FpYS5hZmZpcm10cnVzdC5jb20vYWZ0 -ZXYxY2EuY3J0MDwGA1UdHwQ1MDMwMaAvoC2GK2h0dHA6Ly9jcmwuYWZmaXJtdHJ1 -c3QuY29tL2NybC9hZnRldjFjYS5jcmwwKgYDVR0RBCMwIYIfdmFsaWRjb21tZXJj -aWFsLmFmZmlybXRydXN0LmNvbTAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYI -KwYBBQUHAwEGCCsGAQUFBwMCMFYGA1UdIARPME0wBwYFZ4EMAQEwQgYKKwYBBAGC -jwkCATA0MDIGCCsGAQUFBwIBFiZodHRwczovL3d3dy5hZmZpcm10cnVzdC5jb20v -cmVwb3NpdG9yeTCCAYAGCisGAQQB1nkCBAIEggFwBIIBbAFqAHcAEvFONL1TckyE -BhnDjz96E/jntWKHiJxtMAWE6+WGJjoAAAGQYMi3wQAABAMASDBGAiEAjvdsU4G2 -o4BZSOOjaH6gOp7zhKtXQByQUvfHfsi2ePcCIQDnnIO2qlHBm+sskUDlXfR0lCUW -yFPVr9nFZ0L9YPpozgB2AA3h8jAr0w3BQGISCepVLvxHdHyx1+kw7w5CHrR+Tqo0 -AAABkGDIt9MAAAQDAEcwRQIhANh1zS3Qeo9yKF+j3G52JhmDRYBS+1TM0wykoXCY -llpxAiAG+LAlKSbwwgrboUSTDDXWNeoRYZ7fKbU72kKfHrpZvwB3ABoE/0nQVB1A -r/agw7/x2MRnL07s7iNAaJhrF0Au3Il9AAABkGDIt9sAAAQDAEgwRgIhAN8OoC4I -zw8bFJy8ACgK40c9ZfsIfFhePTc9CyrL5uDsAiEA4Jn/IqBB9L5DeTgqw9hBaYag -FmY/2gWDip36ga0WUsAwDQYJKoZIhvcNAQELBQADggEBABywPLJP097Emz6LNeFU -/HvfhaUKv2pgIHf/Kvjs5x78RK9G605THPEHr/TeUjNZ4PBd48WBNVWzyd/8FuOt -r+FsYkRJb9CnrOhZHuCwlcdWXvuY8PiuBmT+xB16BWR5yhYbbiGe4hea0Pf6CfHh -jJoGJw4dQKfgneZOV7IcaWnNTKYawlcZOgxvEwFvj+iZM31WphEPKRAV+N+Tp+ZR -nxlEdjmdbOjqBydlYIEzuFIgxgtnPdK5wqCOWb+z2cARUAO/AkiWrOLTPDc7ydQK -GcfDrSqffHOlwaee08C6STFaJWIcpqxZdXE6Jc+8/85bfPEAG1UepgfnBTqW9RGT -Q3s= ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIEqDCCA5CgAwIBAgIQFylVHtaOf7Ht9XMA811/1TANBgkqhkiG9w0BAQsFADBE -MQswCQYDVQQGEwJVUzEUMBIGA1UECgwLQWZmaXJtVHJ1c3QxHzAdBgNVBAMMFkFm -ZmlybVRydXN0IENvbW1lcmNpYWwwHhcNMTkwMzIxMjAyNzU0WhcNMzAxMjAyMDQw -MDAwWjCBgzELMAkGA1UEBhMCQ0ExFDASBgNVBAoTC0FmZmlybVRydXN0MSswKQYD -VQQLEyJTZWUgd3d3LmFmZmlybXRydXN0LmNvbS9yZXBvc2l0b3J5MTEwLwYDVQQD -EyhBZmZpcm1UcnVzdCBFeHRlbmRlZCBWYWxpZGF0aW9uIENBIC0gRVYxMIIBIjAN -BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuPBMIa9VuXJGAw0MHvieGciPFA11 -b9T49YJ7T+zVpoMMQO+ueUKVHb2l26oeCiwIhXMQ5LquOVcx+rofouzcKXY3wKDZ -zHIOnAkU+23Ucn/3dRH7aHJULsBufZq+NvwgYSgJJEDKfqvIV/c5HiRyZ2H+nAI5 -10Q2xC0UxgSBsufccQ+Fwkg6BAGDlTXrvi8wi75UaGue6jv/qcKLybeVUrgqKE64 -d9oa9PG5/g89QwSdsIQEdVSFzFvFpOG9YhJbJ177Zg6DGCxU0lWwFrVpyH/2vnXl -jhMQScn8UxzCJdDg3EDqjgaV0JH2yoLug+QVYgURPu5BEb5ut9vAdP7cLwIDAQAB -o4IBVDCCAVAwNwYIKwYBBQUHAQEEKzApMCcGCCsGAQUFBzABhhtodHRwOi8vb2Nz -cC5hZmZpcm10cnVzdC5jb20wHQYDVR0OBBYEFNvvZTcL5UfLNdGQHwPBvIjHp+qA -MBIGA1UdEwEB/wQIMAYBAf8CAQAwHwYDVR0jBBgwFoAUnZPGU4teyq8/nx4P5ZmV -vCT2lI8wRwYDVR0gBEAwPjA8BgRVHSAAMDQwMgYIKwYBBQUHAgEWJmh0dHBzOi8v -d3d3LmFmZmlybXRydXN0LmNvbS9yZXBvc2l0b3J5MEkGA1UdHwRCMEAwPqA8oDqG -OGh0dHA6Ly9jcmwuYWZmaXJtdHJ1c3QuY29tL2NybC9BZmZpcm1UcnVzdENvbW1l -cmNpYWwuY3JsMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYI -KwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAATH11fMrINGmQGQqQW0ATteVnUG -LrmRSN2OlmRm+dkUwKXhcQQEfYYlEggPqgvxSUpw13fXSOqVHqAcj3BIqF957kh+ -m3DmC0RX9KaEKD165pf77P5nZcRmZpBl9cctvzIxN19uzcminchusYwLyeWhBtTZ -xpER9LbrfMNaQ7GnrgalMx54QvdjOhw/GJs9/SqEzYmPshL+DzgZX/oAzY63rQIh -rBblf6/2talZqci96oFzNst8rGfPy/xQ7lgkki1hwIYbORMfloBhP+vAZJo0mxdM -ipu3Z0ToK+KU2iqnBxXVr2/kod+CpkHnjUHa1wnQuSaefng3XwZ/vqtSL9c= ------END CERTIFICATE----- diff -Nru openjdk-25-25~32ea/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustnetworkingca-chain.pem openjdk-25-25.0.1+8/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustnetworkingca-chain.pem --- openjdk-25-25~32ea/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustnetworkingca-chain.pem 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustnetworkingca-chain.pem 1970-01-01 00:00:00.000000000 +0000 @@ -1,76 +0,0 @@ -Root Certificate: - Version: 3 (0x2) - Serial Number: 8957382827206547757 (0x7c4f04391cd4992d) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=US, O=AffirmTrust, CN=AffirmTrust Networking - Validity - Not Before: Jan 29 14:08:24 2010 GMT - Not After : Dec 31 14:08:24 2030 GMT - ------BEGIN CERTIFICATE----- -MIIHGjCCBgKgAwIBAgIQX2vGPaCJ1tS0ncp2OlBMFjANBgkqhkiG9w0BAQsFADCB -gzELMAkGA1UEBhMCQ0ExFDASBgNVBAoTC0FmZmlybVRydXN0MSswKQYDVQQLEyJT -ZWUgd3d3LmFmZmlybXRydXN0LmNvbS9yZXBvc2l0b3J5MTEwLwYDVQQDEyhBZmZp -cm1UcnVzdCBFeHRlbmRlZCBWYWxpZGF0aW9uIENBIC0gRVYzMB4XDTI0MDYyODIx -NDU0OVoXDTI1MDcyODIxNDU0OFowgdgxCzAJBgNVBAYTAkNBMRAwDgYDVQQIEwdP -bnRhcmlvMQ8wDQYDVQQHEwZPdHRhd2ExEzARBgsrBgEEAYI3PAIBAxMCQ0ExGDAW -BgsrBgEEAYI3PAIBAhMHT250YXJpbzEcMBoGA1UEChMTQWZmaXJtdHJ1c3QgTGlt -aXRlZDEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xEDAOBgNVBAUTBzI1 -NDA1NDcxKDAmBgNVBAMTH3ZhbGlkbmV0d29ya2luZy5hZmZpcm10cnVzdC5jb20w -ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCkGknE8kFr+CaIybQrDPRw -z9OKXq77p4CnrkF1/g9w/HiIs6Ps8YqTjsiTKM3wYLbvPA+TbO9DpCSyCP2bVyLf -AjUE617KZSpfy9RqzvGjn/1qH/cBKohhEliMfDj4ZHfY4x+1WYTZPVK/g0Ny5RAP -wz9lJHR2SsVGLvpqXzWaVoxifJ8HZWD7n5z/75WeYko+Hubx3WvzJZcN2Xjn+q6a -7wkDaXPayrvn5uWGPlOLQHqJ5z7wts21jASMTfJAToFyzH6dGwvqxkP3bVJGJ8AF -vtMfqVjcOcjWgmmOEHMPAAqs5QKrYuSLccH6hFTwFEUCdMwVqfloznt2sNUSBoKj -AgMBAAGjggMxMIIDLTAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBTrE0z4fRyx9P9M -0FfA6VgGkJiYVDAfBgNVHSMEGDAWgBR5HrHJF8cerLHHFNfD6H+8uVCbFTBsBggr -BgEFBQcBAQRgMF4wJwYIKwYBBQUHMAGGG2h0dHA6Ly9vY3NwLmFmZmlybXRydXN0 -LmNvbTAzBggrBgEFBQcwAoYnaHR0cDovL2FpYS5hZmZpcm10cnVzdC5jb20vYWZ0 -ZXYzY2EuY3J0MDwGA1UdHwQ1MDMwMaAvoC2GK2h0dHA6Ly9jcmwuYWZmaXJtdHJ1 -c3QuY29tL2NybC9hZnRldjNjYS5jcmwwKgYDVR0RBCMwIYIfdmFsaWRuZXR3b3Jr -aW5nLmFmZmlybXRydXN0LmNvbTAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYI -KwYBBQUHAwEGCCsGAQUFBwMCMFYGA1UdIARPME0wBwYFZ4EMAQEwQgYKKwYBBAGC -jwkCAjA0MDIGCCsGAQUFBwIBFiZodHRwczovL3d3dy5hZmZpcm10cnVzdC5jb20v -cmVwb3NpdG9yeTCCAXwGCisGAQQB1nkCBAIEggFsBIIBaAFmAHYADeHyMCvTDcFA -YhIJ6lUu/Ed0fLHX6TDvDkIetH5OqjQAAAGQYM/MjQAABAMARzBFAiBjnehs1mvh -5Xm3uXZ7Bq8gijwiXThwnLSYROQxnWrnbAIhALbgJG+PRZQfzTBbgM/zAwNsBjhe -F5iENnaajJCxzOhaAHUAEvFONL1TckyEBhnDjz96E/jntWKHiJxtMAWE6+WGJjoA -AAGQYM/MgQAABAMARjBEAiAsWOm1IIjaxQP9uaPI9tQmkiJPUOTrBTsTDO+jkgiG -+QIgVNhND82rsFGjrtAAHzzgCVzLDUM3zaHxnP/z3BNuO4QAdQAaBP9J0FQdQK/2 -oMO/8djEZy9O7O4jQGiYaxdALtyJfQAAAZBgz8zLAAAEAwBGMEQCIBIGxtjk7Lw8 -i+oggK7VrPMNTB632t321cwhEm517BbZAiBws3+uytwh59N6qGJUuSFQnOZNPOPj -eQnH2fSdT1J2sDANBgkqhkiG9w0BAQsFAAOCAQEAcSzitESRKlbcUvxvUB7FjK0I -CaBU1Nyu0xDFCoG2pmp7GASJz34wtPYfsiX5+j4hDh/noMcgk7WlD8pzgWYw15Rk -+5kTv2v4U85y/JFjzMOHbz64KjQdGebqhjvC/E/EXxK+AZf4H574/w7rbyJ30vFL -gNvPF9AxS1MuYIO55jXrHMByKnFoQZgPsmAY/x+n+OzMxWOdR18PupypCB5TyJZ8 -pQzwoxmX7qeZHiXyJ8jQUwe1qoQc2SbwfQxfwSPUPSJuQo90N+5nyQMe7vvPBM0Y -/CXaFpfPqh71D4C0Ey+0hYxSt99gYs4P9twUByjIlP0wTyhaoEpt3zw9DdZypQ== ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIEqDCCA5CgAwIBAgIQNCSh7Pjwo1/nRrcBHEPoRDANBgkqhkiG9w0BAQsFADBE -MQswCQYDVQQGEwJVUzEUMBIGA1UECgwLQWZmaXJtVHJ1c3QxHzAdBgNVBAMMFkFm -ZmlybVRydXN0IE5ldHdvcmtpbmcwHhcNMTkwMzIxMjAzODU5WhcNMzAxMjAyMDQw -MDAwWjCBgzELMAkGA1UEBhMCQ0ExFDASBgNVBAoTC0FmZmlybVRydXN0MSswKQYD -VQQLEyJTZWUgd3d3LmFmZmlybXRydXN0LmNvbS9yZXBvc2l0b3J5MTEwLwYDVQQD -EyhBZmZpcm1UcnVzdCBFeHRlbmRlZCBWYWxpZGF0aW9uIENBIC0gRVYzMIIBIjAN -BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmHDl/3xr1qiHoe0Rzb3AGLw56e9J -l2a3X59+PAfI5wGBHuK9Dl7XsyoH65X6QIC/rXyVpuNgKbbwIGHB+rCSplyHzGyC -WeM3LXa2q1US7VteeFDS959nxJVRFfwATR9xAK6YTUWQ/yWdw0dZSm0lQNmEMBwS -qi0ufWokiWXZUzWHOu7A6driCohu9sFDwe1INJUPH6uIlovmzGvG3UYbUSymJcjs -Ka0fXXX9zukco8exlOIKWRJSNLxKtSSPDVASrGLQ1xi3qkiLTKci3+jKMNDFf1vw -foZN99HhUcWKXfr2KlWfANdjTMlsTKCfuhfWl1OBVNHGRrACAQCXI/ji0wIDAQAB -o4IBVDCCAVAwNwYIKwYBBQUHAQEEKzApMCcGCCsGAQUFBzABhhtodHRwOi8vb2Nz -cC5hZmZpcm10cnVzdC5jb20wHQYDVR0OBBYEFHkesckXxx6ssccU18Pof7y5UJsV -MBIGA1UdEwEB/wQIMAYBAf8CAQAwHwYDVR0jBBgwFoAUBx/S55zawm6iQLSwelAQ -UHTEyL0wRwYDVR0gBEAwPjA8BgRVHSAAMDQwMgYIKwYBBQUHAgEWJmh0dHBzOi8v -d3d3LmFmZmlybXRydXN0LmNvbS9yZXBvc2l0b3J5MEkGA1UdHwRCMEAwPqA8oDqG -OGh0dHA6Ly9jcmwuYWZmaXJtdHJ1c3QuY29tL2NybC9BZmZpcm1UcnVzdE5ldHdv -cmtpbmcuY3JsMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYI -KwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAhmE4I56hNpnWXQ2Si8a/TgQUZr -X5Jlv1LDvl3rkDyfEIHNZ8dth17SakJYJBWHExph/iIYjCJ9YmeyhghV5rPqT+wF -4yyE2ngenIusfnWT2bTpT9u2VZbCNeACE5XnN2UHSA0J9idPjfLuthViWEvSZZUh -DJ53bX+exO366nDY4AI7owIyhz8hdsWyhZ/0ST+eD+kbgd8osd+GdxzRmyKcfl84 -D1K1uff01T9w2dyUaZglQsFljkaO6xmeXZJsPnhwCp/HlMHWzhAneUQ7I9FZSOW+ -WiYbt4RitmBpysadBReikWM4knECzJQ/fMT9vC0k9BLlqUYRwCH9vr0UnZo= ------END CERTIFICATE----- diff -Nru openjdk-25-25~32ea/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustpremiumca-chain.pem openjdk-25-25.0.1+8/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustpremiumca-chain.pem --- openjdk-25-25~32ea/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustpremiumca-chain.pem 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustpremiumca-chain.pem 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ -Root Certificate: - Version: 3 (0x2) - Serial Number: 7893706540734352110 (0x6d8c1446b1a60aee) - Signature Algorithm: sha384WithRSAEncryption - Issuer: C=US, O=AffirmTrust, CN=AffirmTrust Premium - Validity - Not Before: Jan 29 14:10:36 2010 GMT - Not After : Dec 31 14:10:36 2040 GMT - ------BEGIN CERTIFICATE----- -MIIIFjCCBv6gAwIBAgIQQVOTWr7tEAJXmRDkCSxkajANBgkqhkiG9w0BAQsFADCB -gzELMAkGA1UEBhMCQ0ExFDASBgNVBAoTC0FmZmlybVRydXN0MSswKQYDVQQLEyJT -ZWUgd3d3LmFmZmlybXRydXN0LmNvbS9yZXBvc2l0b3J5MTEwLwYDVQQDEyhBZmZp -cm1UcnVzdCBFeHRlbmRlZCBWYWxpZGF0aW9uIENBIC0gRVYyMB4XDTI0MDYyODIx -NDgyN1oXDTI1MDcyODIxNDgyNlowgdUxCzAJBgNVBAYTAkNBMRAwDgYDVQQIEwdP -bnRhcmlvMQ8wDQYDVQQHEwZPdHRhd2ExEzARBgsrBgEEAYI3PAIBAxMCQ0ExGDAW -BgsrBgEEAYI3PAIBAhMHT250YXJpbzEcMBoGA1UEChMTQWZmaXJtdHJ1c3QgTGlt -aXRlZDEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xEDAOBgNVBAUTBzI1 -NDA1NDcxJTAjBgNVBAMTHHZhbGlkcHJlbWl1bS5hZmZpcm10cnVzdC5jb20wggIi -MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDVRMzwbDq47ivHOKqJdiEJNL2+ -g9Snj/BRctqcQTrIV99RP0pmAh5fHg7vnhVsHqc9sRLVcQWTJk9NuRJ2VnDKWsBa -Xrp5UWaNjS0vaFA4jzCi1gWzTTZgPTQn3VRG3JP1F5CZb405/mtWDaw/CfWkcUqQ -VSilqFlJRsjcPCzQh7ZaXAo+FmzJxNSwjxdP6JSYMeTDRCUpSb3T8PypVI1CEmLZ -jsxrg5oIZn25591g/pzgLE56N0stNY4d3q4YD1t5x46RsqYAJYSkk8rcTN+kHzsY -VSqaRDyPkGbmuCeJUvW24wJ30yQtXQWA+U0dMYLe7LyglJ7dkOzvWNbqrIcvM8My -hxH/wwVH7e4dL/1E58yr1BHENUk7Mp9rzIXj496eLkF5G1lMkNnuVRQqCAOW0rPY -V0rI8yrCMTK52s4mNjQo2J7JOYdTUvAWZ92MKvEjjhQlMH8eK72Km/+mkxpsgGmr -3c6u+Gom7oI5VaLZ+3p2uWaOsutk1tkzWjhzY4L27hwmIdWujfrWMRx8uxcfoJxX -gQ40d1QiSN51BtCPE5UnpLU/YUxMdzWmtUoGUfYIGVqDVToBnunIFMdmFjC0IrNl -hquDQi/OGMpzuOvxX1FoXb+rRwOhhdrcR0BQqUVRTV0U5LlcsDeNMqmqPE9mzGtJ -W69Fsh7crntng/L72wIDAQABo4IDMDCCAywwDAYDVR0TAQH/BAIwADAdBgNVHQ4E -FgQU3PWyi/4usZghgahc/Tj+Q60QLOcwHwYDVR0jBBgwFoAUc3yaOGg8UXxBCP6h -HyoetGHbzTwwbAYIKwYBBQUHAQEEYDBeMCcGCCsGAQUFBzABhhtodHRwOi8vb2Nz -cC5hZmZpcm10cnVzdC5jb20wMwYIKwYBBQUHMAKGJ2h0dHA6Ly9haWEuYWZmaXJt -dHJ1c3QuY29tL2FmdGV2MmNhLmNydDA8BgNVHR8ENTAzMDGgL6AthitodHRwOi8v -Y3JsLmFmZmlybXRydXN0LmNvbS9jcmwvYWZ0ZXYyY2EuY3JsMCcGA1UdEQQgMB6C -HHZhbGlkcHJlbWl1bS5hZmZpcm10cnVzdC5jb20wDgYDVR0PAQH/BAQDAgWgMB0G -A1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBWBgNVHSAETzBNMAcGBWeBDAEB -MEIGCisGAQQBgo8JAgMwNDAyBggrBgEFBQcCARYmaHR0cHM6Ly93d3cuYWZmaXJt -dHJ1c3QuY29tL3JlcG9zaXRvcnkwggF+BgorBgEEAdZ5AgQCBIIBbgSCAWoBaAB2 -ABoE/0nQVB1Ar/agw7/x2MRnL07s7iNAaJhrF0Au3Il9AAABkGDSN7EAAAQDAEcw -RQIgVDWwhv7yG6RNnkMZnVq1YYA7ypn/GSH0ibUKnESHRpYCIQCY8gyCX7VFONUI -QuR8daz7ra2FCUI9TwylrR3eFfIgGgB3AN3cyjSV1+EWBeeVMvrHn/g9HFDf2wA6 -FBJ2Ciysu8gqAAABkGDSN5cAAAQDAEgwRgIhAM1edsSyFUKU0Dj1WxTGwziE6fCW -g2ByfL8kDrP260YXAiEA6YQOpJf04N13Nn263BxAl+laH9Ar0eo03fArlv743TQA -dQAN4fIwK9MNwUBiEgnqVS78R3R8sdfpMO8OQh60fk6qNAAAAZBg0je+AAAEAwBG -MEQCIExqK4katETAQo+H0+ImuNJCSeFEI9C+9wrjhl6ZnWb9AiBwkC1vpLYOIm/1 -YCLCQIOmTdg2wf8LITlrQNJA8vbBljANBgkqhkiG9w0BAQsFAAOCAQEASOmPu7ot -yl6MoMns19uI6H2KSUjMFh3/fKMcY/ettmEYalgrytexFMrLnD2UniBlD+nJEshp -5/z7o0YDiRoiLhMAs7VqIdX3erNu/ghNh7P2bDnoMWShSoAKxez1XOGL3rRE0NAi -DsWCaNRHH9rnC97275sbGnua7ZYg+8BiF62vpJlqjrxDHjGiej8qAWSjztbB43Af -bwRscpXTxNkMvOBuRFMH+rSxB8CrOV68W+yxmzPuPxVjM7oJH8Qk5BC53NRqFsVz -JhbNfot0+/drj7JT3jlacUVQcD/BzDuC3+qczQlLjLdHgQM2/e4fXsD6C5S6B11d -BDx6ipGpaASofA== ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIFojCCA4qgAwIBAgIQU3HI6weE/VEI5dTz4yPsRjANBgkqhkiG9w0BAQsFADBB -MQswCQYDVQQGEwJVUzEUMBIGA1UECgwLQWZmaXJtVHJ1c3QxHDAaBgNVBAMME0Fm -ZmlybVRydXN0IFByZW1pdW0wHhcNMTkwMzIxMjA0NjM1WhcNMzAxMjAyMDQwMDAw -WjCBgzELMAkGA1UEBhMCQ0ExFDASBgNVBAoTC0FmZmlybVRydXN0MSswKQYDVQQL -EyJTZWUgd3d3LmFmZmlybXRydXN0LmNvbS9yZXBvc2l0b3J5MTEwLwYDVQQDEyhB -ZmZpcm1UcnVzdCBFeHRlbmRlZCBWYWxpZGF0aW9uIENBIC0gRVYyMIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvDDZHfxkB1nAGFKdw0VCgV+B/eBtW1o+ -bXzwRcpeFh5saDI+tv1RAMrYFq+AJkXCCJopgMF2Wqfv5myE3JMgxEHuuKUpJz7H -FprrFckVOGCtJKH8Iy9AWPjBwt8lKmxGJF7EZst+QoVt4hMe0qhL0WEKbATFPe41 -DcM7UsyQv6Bvpn424uePy3/1ATIsVL3YmvAbUNR0aqVxYAJzTefvyIet/761bKGc -NyqdOVWFFeTDtr8iL1TBXToAgl0GJ39bFQZsP19VcCpfk9Zj3YHTPRPq5wZOZuUN -F7jiBUEi6DaVOi3Wy4vdySHtWPeBHRYif1I6fcUfdCNORMc4ee6KewIDAQABo4IB -UTCCAU0wNwYIKwYBBQUHAQEEKzApMCcGCCsGAQUFBzABhhtodHRwOi8vb2NzcC5h -ZmZpcm10cnVzdC5jb20wHQYDVR0OBBYEFHN8mjhoPFF8QQj+oR8qHrRh2808MBIG -A1UdEwEB/wQIMAYBAf8CAQAwHwYDVR0jBBgwFoAUncBnpgwi2Sb1RaumZVIRJ9hF -rGMwRwYDVR0gBEAwPjA8BgRVHSAAMDQwMgYIKwYBBQUHAgEWJmh0dHBzOi8vd3d3 -LmFmZmlybXRydXN0LmNvbS9yZXBvc2l0b3J5MEYGA1UdHwQ/MD0wO6A5oDeGNWh0 -dHA6Ly9jcmwuYWZmaXJtdHJ1c3QuY29tL2NybC9BZmZpcm1UcnVzdFByZW1pdW0u -Y3JsMA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUH -AwIwDQYJKoZIhvcNAQELBQADggIBABi64UEwl3l0yIiuSACyVQQIBI60BUmhseac -4BzCAsJrR5tE/2U9QAa2y6JpR1nqm76DJvw1QQgvFcNe+fkwpvoViCaSTbZkGGwD -mQe2xRSYJcDSMQUc/GgzLcX2c1CrexQXE1vwV/q33af1en5s1GzLl915aNS/k1ch -G7EMruJ/D4cuH9j4j2i+b+llmVBzavBwelN5rc693o+Ot9id/1sTWNugwAu3uXGb -VlhETMnjXGIciegOLdWYhWBln0izYlt9IwlDEpjMVaZ0HZlj2JBGaSe4PfEFpJPO -beuPcQpLQGw2XpW2ZMG5JcRYaoKWjixXAGktRA3H9nvVW92jvzx/RX484w2ZM5Rt -E+I1ikAuQLAyWG7clht387e2RuC3NZTtefSyjE3L9gQDOPC+Z9ycwr0WJHRsxFvh -FJQi3JnxgFZf5mc5n2mh3qAgALTNOUHuDiHrerjTOWbpF/1/NJmo/c/YZ63vZIhc -EaER4HuhbBqlpf6z3WOIQdZm1ChwXYHrEcLDgfwm9cXoaVK2HZapkMwQbPffPlT1 -E+AxRFB4YmT1y2WzdaHfhFA9nH6ByUdL5+FfrDoIIUO2e8OLOAcrJsf5+unhAhc0 -v7N48JWdmpstjkXCaCIaidrZLJxS+pikNgHB1dXF/TxokLTiPB9jcYKdGaYs3XHb -YKLdwubu ------END CERTIFICATE----- diff -Nru openjdk-25-25~32ea/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustpremiumeccca-chain.pem openjdk-25-25.0.1+8/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustpremiumeccca-chain.pem --- openjdk-25-25~32ea/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustpremiumeccca-chain.pem 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/sun/security/ssl/X509TrustManagerImpl/distrust/chains/entrust/affirmtrustpremiumeccca-chain.pem 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -Root Certificate: - Version: 3 (0x2) - Serial Number: 8401224907861490260 (0x7497258ac73f7a54) - Signature Algorithm: ecdsa-with-SHA384 - Issuer: C=US, O=AffirmTrust, CN=AffirmTrust Premium ECC - Validity - Not Before: Jan 29 14:20:24 2010 GMT - Not After : Dec 31 14:20:24 2040 GMT - ------BEGIN CERTIFICATE----- -MIIF0zCCBVmgAwIBAgIQFVwk9nYUM5SYOnBd+IoGtzAKBggqhkjOPQQDAzCBhTEL -MAkGA1UEBhMCQ0ExFDASBgNVBAoTC0FmZmlybVRydXN0MSswKQYDVQQLEyJTZWUg -d3d3LmFmZmlybXRydXN0LmNvbS9yZXBvc2l0b3J5MTMwMQYDVQQDEypBZmZpcm1U -cnVzdCBFeHRlbmRlZCBWYWxpZGF0aW9uIENBIC0gRVZFQzEwHhcNMjQwNjI4MjE0 -OTUwWhcNMjUwNzI4MjE0OTQ4WjCB2DELMAkGA1UEBhMCQ0ExEDAOBgNVBAgTB09u -dGFyaW8xDzANBgNVBAcTBk90dGF3YTETMBEGCysGAQQBgjc8AgEDEwJDQTEYMBYG -CysGAQQBgjc8AgECEwdPbnRhcmlvMRwwGgYDVQQKExNBZmZpcm10cnVzdCBMaW1p -dGVkMR0wGwYDVQQPExRQcml2YXRlIE9yZ2FuaXphdGlvbjEQMA4GA1UEBRMHMjU0 -MDU0NzEoMCYGA1UEAxMfdmFsaWRwcmVtaXVtZWNjLmFmZmlybXRydXN0LmNvbTB2 -MBAGByqGSM49AgEGBSuBBAAiA2IABEkLBzBYSJPRENKDaA1iBPQz+jZUV+OoM9nJ -sr9sMfmHaqr3nlWxAMM99b9/usVfYyUxqyi+YL2Z3ZSxjX2dpyhwMtPpIQkL1pMW -Iv55XBIcYRyl2NjcADS9B06G+nnix6OCAzcwggMzMAwGA1UdEwEB/wQCMAAwHQYD -VR0OBBYEFP+37ywf2YJJ/4CEVy1GY4ioGm1yMB8GA1UdIwQYMBaAFMaQjAKD113j -vjucLtVlfSoQYO7lMG4GCCsGAQUFBwEBBGIwYDAnBggrBgEFBQcwAYYbaHR0cDov -L29jc3AuYWZmaXJtdHJ1c3QuY29tMDUGCCsGAQUFBzAChilodHRwOi8vYWlhLmFm -ZmlybXRydXN0LmNvbS9hZnRldmVjMWNhLmNydDA+BgNVHR8ENzA1MDOgMaAvhi1o -dHRwOi8vY3JsLmFmZmlybXRydXN0LmNvbS9jcmwvYWZ0ZXZlYzFjYS5jcmwwKgYD -VR0RBCMwIYIfdmFsaWRwcmVtaXVtZWNjLmFmZmlybXRydXN0LmNvbTAOBgNVHQ8B -Af8EBAMCB4AwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMFYGA1UdIARP -ME0wBwYFZ4EMAQEwQgYKKwYBBAGCjwkCBDA0MDIGCCsGAQUFBwIBFiZodHRwczov -L3d3dy5hZmZpcm10cnVzdC5jb20vcmVwb3NpdG9yeTCCAX4GCisGAQQB1nkCBAIE -ggFuBIIBagFoAHUA5tIxY0B3jMEQQQbXcbnOwdJA9paEhvu6hzId/R43jlAAAAGQ -YNN5tQAABAMARjBEAiAnainEoBGI9czVh+c9QLPL30S3Rtov8zrnhlXfeKLzZQIg -UGkntBMux0MqHt9Aj60qMsS/C4ZWF7AihVVaUKcrEVgAdgAN4fIwK9MNwUBiEgnq -VS78R3R8sdfpMO8OQh60fk6qNAAAAZBg03m1AAAEAwBHMEUCIGI9kBByoozH4cfS -ECW/O2N/ElkdATkt7EwQ52kcc4ICAiEA9QTh8JlJTb/ytYC1ECX0vQbrYVexg+fu -dw7dfToF9nAAdwAS8U40vVNyTIQGGcOPP3oT+Oe1YoeInG0wBYTr5YYmOgAAAZBg -03ndAAAEAwBIMEYCIQCox5nSCcVB2AfNYXco77zsJnYP7KAU2I4VA2GNL7I4wQIh -AP6WEzyfBoGpYYqFmNnJUavyhKBmeNiR7eNtaFwpSc+UMAoGCCqGSM49BAMDA2gA -MGUCMAGSNMXAAKDRk0ZOtydN95Rkja97+70TatCIIxEAsJD8Hu7lfj2LHCYFQjVY -oaWTrQIxAKUudx7E/JnjsthuL6sNqKVHfD3iLUJyQNK9wE0SVt1xAm7Cu1JXZORE -M64KMKoQFQ== ------END CERTIFICATE----- ------BEGIN CERTIFICATE----- -MIIDXDCCAuKgAwIBAgIQAgKlhME0Bk3J8y0gfqNymDAKBggqhkjOPQQDAzBFMQsw -CQYDVQQGEwJVUzEUMBIGA1UECgwLQWZmaXJtVHJ1c3QxIDAeBgNVBAMMF0FmZmly -bVRydXN0IFByZW1pdW0gRUNDMB4XDTE5MDMyMTIwNTUwN1oXDTMwMTIwMjA0MDAw -MFowgYUxCzAJBgNVBAYTAkNBMRQwEgYDVQQKEwtBZmZpcm1UcnVzdDErMCkGA1UE -CxMiU2VlIHd3dy5hZmZpcm10cnVzdC5jb20vcmVwb3NpdG9yeTEzMDEGA1UEAxMq -QWZmaXJtVHJ1c3QgRXh0ZW5kZWQgVmFsaWRhdGlvbiBDQSAtIEVWRUMxMHYwEAYH -KoZIzj0CAQYFK4EEACIDYgAEu9f5NkumdaVlmaNaxpDB+rBk/S6lhqcUU1zTLcRz -4G0dr4290hezjrvZJxGJ/X15aexpdD2V9cwaPD/yuEJcaaz+rg/qDoqQF3+AFqVc -41jw1E0S59+57XVKLtXI7Xh6o4IBVDCCAVAwNwYIKwYBBQUHAQEEKzApMCcGCCsG -AQUFBzABhhtodHRwOi8vb2NzcC5hZmZpcm10cnVzdC5jb20wHQYDVR0OBBYEFMaQ -jAKD113jvjucLtVlfSoQYO7lMBIGA1UdEwEB/wQIMAYBAf8CAQAwHwYDVR0jBBgw -FoAUmq8pesARNTUmUTAAw2r+QNWu1jwwRwYDVR0gBEAwPjA8BgRVHSAAMDQwMgYI -KwYBBQUHAgEWJmh0dHBzOi8vd3d3LmFmZmlybXRydXN0LmNvbS9yZXBvc2l0b3J5 -MEkGA1UdHwRCMEAwPqA8oDqGOGh0dHA6Ly9jcmwuYWZmaXJtdHJ1c3QuY29tL2Ny -bC9BZmZpcm1UcnVzdFByZW1pdW1FQ0MuY3JsMA4GA1UdDwEB/wQEAwIBhjAdBgNV -HSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwCgYIKoZIzj0EAwMDaAAwZQIwHJ5g -a6sHvQ51DGr0bWq34awuwlWbybC2grHoNp5uYapcXr/qTJusb/6n+dczqFdaAjEA -7VQY06fE9ifMnTgT9824jc3+H6kfhMk4PoIj9ouWdYfc1DyTBS/low9Hb8liQyFr ------END CERTIFICATE----- diff -Nru openjdk-25-25~32ea/test/jdk/sun/security/tools/keytool/i18n.java openjdk-25-25.0.1+8/test/jdk/sun/security/tools/keytool/i18n.java --- openjdk-25-25~32ea/test/jdk/sun/security/tools/keytool/i18n.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jdk/sun/security/tools/keytool/i18n.java 2025-09-25 16:16:56.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 4348369 8076069 8294994 + * @bug 4348369 8076069 8294994 8360400 * @summary keytool i18n compliant * @author charlie lai * @modules java.base/sun.security.tools.keytool @@ -33,7 +33,7 @@ /* * @test - * @bug 4348369 8076069 8294994 + * @bug 4348369 8076069 8294994 8360400 * @summary keytool i18n compliant * @author charlie lai * @modules java.base/sun.security.tools.keytool @@ -43,7 +43,7 @@ /* * @test - * @bug 4348369 8076069 8294994 + * @bug 4348369 8076069 8294994 8360400 * @summary keytool i18n compliant * @author charlie lai * @modules java.base/sun.security.tools.keytool @@ -53,7 +53,7 @@ /* * @test - * @bug 4348369 8076069 8294994 + * @bug 4348369 8076069 8294994 8360400 * @summary keytool i18n compliant * @author charlie lai * @modules java.base/sun.security.tools.keytool @@ -95,10 +95,6 @@ + "512-bit DSA key algorithm for CN=Name, OU=Java, " + "O=Oracle, L=City, ST=State C=Country."}, - {"-list -v -storepass a -keystore ./i18n.keystore", - "Output in ${LANG}. Check keytool error:java.io.IOException: " - + "keystore password was incorrect."}, - {"-genkey -keyalg DSA -v -keysize 512 " + "-storepass password " + "-keypass password " diff -Nru openjdk-25-25~32ea/test/jtreg-ext/requires/VMProps.java openjdk-25-25.0.1+8/test/jtreg-ext/requires/VMProps.java --- openjdk-25-25~32ea/test/jtreg-ext/requires/VMProps.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/jtreg-ext/requires/VMProps.java 2025-09-25 16:16:56.000000000 +0000 @@ -138,6 +138,8 @@ map.put("container.support", this::containerSupport); map.put("systemd.support", this::systemdSupport); map.put("vm.musl", this::isMusl); + map.put("vm.asan", this::isAsanEnabled); + map.put("vm.ubsan", this::isUbsanEnabled); map.put("release.implementor", this::implementor); map.put("jdk.containerized", this::jdkContainerized); map.put("vm.flagless", this::isFlagless); @@ -728,6 +730,15 @@ return Boolean.toString(WB.getLibcName().contains("musl")); } + // Sanitizer support + protected String isAsanEnabled() { + return "" + WB.isAsanEnabled(); + } + + protected String isUbsanEnabled() { + return "" + WB.isUbsanEnabled(); + } + private String implementor() { try (InputStream in = new BufferedInputStream(new FileInputStream( System.getProperty("java.home") + "/release"))) { diff -Nru openjdk-25-25~32ea/test/lib/jdk/test/lib/containers/docker/ContainerRuntimeVersionTestUtils.java openjdk-25-25.0.1+8/test/lib/jdk/test/lib/containers/docker/ContainerRuntimeVersionTestUtils.java --- openjdk-25-25~32ea/test/lib/jdk/test/lib/containers/docker/ContainerRuntimeVersionTestUtils.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/lib/jdk/test/lib/containers/docker/ContainerRuntimeVersionTestUtils.java 2025-09-25 16:16:56.000000000 +0000 @@ -79,12 +79,21 @@ try { // Example 'docker version 20.10.0 or podman version 4.9.4-rhel' String versNums = version.split("\\s+", 3)[2]; + // On some docker implementations e.g. RHEL8 ppc64le we have the following version output: + // Docker version v25.0.3, build 4debf41 + // Trim potentially leading 'v' and trailing ',' + if (versNums.startsWith("v")) { + versNums = versNums.substring(1); + } + int cidx = versNums.indexOf(','); + versNums = (cidx != -1) ? versNums.substring(0, cidx) : versNums; + String[] numbers = versNums.split("-")[0].split("\\.", 3); return new ContainerRuntimeVersionTestUtils(Integer.parseInt(numbers[0]), Integer.parseInt(numbers[1]), Integer.parseInt(numbers[2])); } catch (Exception e) { - throw new RuntimeException("Failed to parse container runtime version: " + version); + throw new RuntimeException("Failed to parse container runtime version: " + version, e); } } @@ -104,4 +113,4 @@ public static ContainerRuntimeVersionTestUtils getContainerRuntimeVersion() { return ContainerRuntimeVersionTestUtils.fromVersionString(getContainerRuntimeVersionStr()); } -} \ No newline at end of file +} diff -Nru openjdk-25-25~32ea/test/lib/jdk/test/lib/security/CertificateBuilder.java openjdk-25-25.0.1+8/test/lib/jdk/test/lib/security/CertificateBuilder.java --- openjdk-25-25~32ea/test/lib/jdk/test/lib/security/CertificateBuilder.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/lib/jdk/test/lib/security/CertificateBuilder.java 2025-09-25 16:16:56.000000000 +0000 @@ -54,6 +54,7 @@ import sun.security.x509.SubjectAlternativeNameExtension; import sun.security.x509.URIName; import sun.security.x509.KeyIdentifier; +import sun.security.x509.X500Name; /** * Helper class that builds and signs X.509 certificates. @@ -90,7 +91,7 @@ public class CertificateBuilder { private final CertificateFactory factory; - private X500Principal subjectName = null; + private X500Name subjectName = null; private BigInteger serialNumber = null; private PublicKey publicKey = null; private Date notBefore = null; @@ -116,7 +117,7 @@ * on this certificate. */ public CertificateBuilder setSubjectName(X500Principal name) { - subjectName = name; + subjectName = X500Name.asX500Name(name); return this; } @@ -126,7 +127,23 @@ * @param name The subject name in RFC 2253 format */ public CertificateBuilder setSubjectName(String name) { - subjectName = new X500Principal(name); + try { + subjectName = new X500Name(name); + } catch (IOException ioe) { + throw new IllegalArgumentException(ioe); + } + return this; + } + + /** + * Set the subject name for the certificate. This method is useful when + * you need more control over the contents of the subject name. + * + * @param name an {@code X500Name} to be used as the subject name + * on this certificate + */ + public CertificateBuilder setSubjectName(X500Name name) { + subjectName = name; return this; } diff -Nru openjdk-25-25~32ea/test/lib/jdk/test/whitebox/WhiteBox.java openjdk-25-25.0.1+8/test/lib/jdk/test/whitebox/WhiteBox.java --- openjdk-25-25~32ea/test/lib/jdk/test/whitebox/WhiteBox.java 2025-07-17 01:29:57.000000000 +0000 +++ openjdk-25-25.0.1+8/test/lib/jdk/test/whitebox/WhiteBox.java 2025-09-25 16:16:56.000000000 +0000 @@ -326,6 +326,10 @@ public native void NMTFreeArena(long arena); public native void NMTArenaMalloc(long arena, long size); + // Sanitizers + public native boolean isAsanEnabled(); + public native boolean isUbsanEnabled(); + // Compiler // Determines if the libgraal shared library file is present.