Version in base suite: 25.0.1+8-1~deb13u1 Base version: openjdk-25_25.0.1+8-1~deb13u1 Target version: openjdk-25_25.0.2+10-1~deb13u2 Base file: /srv/ftp-master.debian.org/ftp/pool/main/o/openjdk-25/openjdk-25_25.0.1+8-1~deb13u1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/o/openjdk-25/openjdk-25_25.0.2+10-1~deb13u2.dsc /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/empty.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid_invalid.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid_null.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid_valid.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid_wrongType.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null_invalid.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null_null.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null_valid.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null_wrongType.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid_invalid.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid_null.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid_valid.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid_wrongType.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType_invalid.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType_null.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType_valid.ser |binary /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType_wrongType.ser |binary openjdk-25-25.0.2+10/.jcheck/conf | 2 openjdk-25-25.0.2+10/debian/JB-doc.overrides.in | 3 openjdk-25-25.0.2+10/debian/JB-jre-headless.overrides.in | 3 openjdk-25-25.0.2+10/debian/JB-jre-zero.overrides.in | 5 openjdk-25-25.0.2+10/debian/JB-jre.overrides.in | 4 openjdk-25-25.0.2+10/debian/JB-jvmci-jdk.overrides.in | 3 openjdk-25-25.0.2+10/debian/README.Debian | 31 openjdk-25-25.0.2+10/debian/README.source | 107 openjdk-25-25.0.2+10/debian/changelog | 54 openjdk-25-25.0.2+10/debian/control | 20 openjdk-25-25.0.2+10/debian/control.in | 2 openjdk-25-25.0.2+10/debian/patches/jdk-8359735.patch | 63 openjdk-25-25.0.2+10/debian/patches/jdk-8369450-proposed.patch | 18 openjdk-25-25.0.2+10/debian/patches/jdk-8370049-proposed.patch | 59 openjdk-25-25.0.2+10/debian/patches/power-opt.diff | 10 openjdk-25-25.0.2+10/debian/patches/series | 3 openjdk-25-25.0.2+10/debian/rules | 42 openjdk-25-25.0.2+10/debian/source/lintian-overrides | 5 openjdk-25-25.0.2+10/debian/tests/control | 8 openjdk-25-25.0.2+10/debian/tests/control.in | 8 openjdk-25-25.0.2+10/make/StaticLibs.gmk | 3 openjdk-25-25.0.2+10/make/autoconf/basic_tools.m4 | 2 openjdk-25-25.0.2+10/make/autoconf/boot-jdk.m4 | 3 openjdk-25-25.0.2+10/make/autoconf/configure.ac | 3 openjdk-25-25.0.2+10/make/autoconf/flags-cflags.m4 | 24 openjdk-25-25.0.2+10/make/autoconf/jdk-options.m4 | 25 openjdk-25-25.0.2+10/make/autoconf/lib-tests.m4 | 2 openjdk-25-25.0.2+10/make/autoconf/libraries.m4 | 6 openjdk-25-25.0.2+10/make/conf/github-actions.conf | 2 openjdk-25-25.0.2+10/make/conf/jib-profiles.js | 6 openjdk-25-25.0.2+10/make/conf/version-numbers.conf | 4 openjdk-25-25.0.2+10/make/data/ubsan/ubsan_default_options.c | 5 openjdk-25-25.0.2+10/make/ide/vscode/hotspot/CreateVSCodeProject.gmk | 2 openjdk-25-25.0.2+10/make/ide/vscode/hotspot/template-workspace.jsonc | 4 openjdk-25-25.0.2+10/make/modules/java.desktop/lib/ClientLibraries.gmk | 3 openjdk-25-25.0.2+10/make/modules/jdk.jpackage/Lib.gmk | 4 openjdk-25-25.0.2+10/make/test/JtregNativeJdk.gmk | 4 openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/aarch64.ad | 32 openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp | 11 openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp | 2 openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/javaFrameAnchor_aarch64.hpp | 14 openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp | 5 openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp | 15 openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/abstractInterpreter_ppc.cpp | 7 openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/interp_masm_ppc.hpp | 9 openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp | 34 openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp | 13 openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/vm_version_ppc.cpp | 4 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/assembler_riscv.hpp | 56 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp | 8 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp | 94 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/downcallLinker_riscv.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/interp_masm_riscv.cpp | 11 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/interp_masm_riscv.hpp | 2 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/javaFrameAnchor_riscv.hpp | 14 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp | 146 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp | 39 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/nativeInst_riscv.cpp | 253 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/nativeInst_riscv.hpp | 43 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/relocInfo_riscv.cpp | 22 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/riscv.ad | 84 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/riscv_v.ad | 1 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp | 79 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp | 19 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp | 12 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/templateTable_riscv.cpp | 12 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/vm_version_riscv.cpp | 27 openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/vm_version_riscv.hpp | 142 openjdk-25-25.0.2+10/src/hotspot/cpu/s390/gc/g1/g1_s390.ad | 2 openjdk-25-25.0.2+10/src/hotspot/cpu/x86/assembler_x86.cpp | 200 openjdk-25-25.0.2+10/src/hotspot/cpu/x86/assembler_x86.hpp | 9 openjdk-25-25.0.2+10/src/hotspot/cpu/x86/methodHandles_x86.cpp | 4 openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64.hpp | 2 openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp | 20 openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64_exp.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64_log.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64_pow.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/cpu/x86/templateInterpreterGenerator_x86_64.cpp | 14 openjdk-25-25.0.2+10/src/hotspot/cpu/x86/vm_version_x86.cpp | 38 openjdk-25-25.0.2+10/src/hotspot/cpu/x86/vm_version_x86.hpp | 17 openjdk-25-25.0.2+10/src/hotspot/os/aix/os_aix.cpp | 4 openjdk-25-25.0.2+10/src/hotspot/os/linux/os_linux.cpp | 46 openjdk-25-25.0.2+10/src/hotspot/os/linux/os_linux.hpp | 17 openjdk-25-25.0.2+10/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp | 12 openjdk-25-25.0.2+10/src/hotspot/os_cpu/linux_riscv/riscv_hwprobe.cpp | 45 openjdk-25-25.0.2+10/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp | 3 openjdk-25-25.0.2+10/src/hotspot/share/c1/c1_Compiler.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/c1/c1_LIR.cpp | 5 openjdk-25-25.0.2+10/src/hotspot/share/c1/c1_LIR.hpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/c1/c1_Runtime1.cpp | 8 openjdk-25-25.0.2+10/src/hotspot/share/cds/cds_globals.hpp | 1 openjdk-25-25.0.2+10/src/hotspot/share/cds/metaspaceShared.cpp | 3 openjdk-25-25.0.2+10/src/hotspot/share/ci/ciClassList.hpp | 1 openjdk-25-25.0.2+10/src/hotspot/share/ci/ciKlass.hpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/ci/ciReplay.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/classfile/classFileParser.cpp | 9 openjdk-25-25.0.2+10/src/hotspot/share/classfile/classFileParser.hpp | 5 openjdk-25-25.0.2+10/src/hotspot/share/classfile/systemDictionaryShared.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/classfile/verifier.cpp | 230 openjdk-25-25.0.2+10/src/hotspot/share/classfile/verifier.hpp | 13 openjdk-25-25.0.2+10/src/hotspot/share/classfile/vmClasses.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/classfile/vmIntrinsics.cpp | 9 openjdk-25-25.0.2+10/src/hotspot/share/code/aotCodeCache.hpp | 4 openjdk-25-25.0.2+10/src/hotspot/share/code/codeCache.cpp | 3 openjdk-25-25.0.2+10/src/hotspot/share/code/compiledIC.hpp | 4 openjdk-25-25.0.2+10/src/hotspot/share/code/nmethod.cpp | 14 openjdk-25-25.0.2+10/src/hotspot/share/code/nmethod.hpp | 85 openjdk-25-25.0.2+10/src/hotspot/share/compiler/compilationPolicy.cpp | 139 openjdk-25-25.0.2+10/src/hotspot/share/compiler/compilationPolicy.hpp | 5 openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectedHeap.cpp | 149 openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectedHeap.hpp | 8 openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectorState.hpp | 6 openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1Policy.cpp | 19 openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1VMOperations.cpp | 9 openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1VMOperations.hpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/gc/shared/gcCause.hpp | 5 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGenerationalHeuristics.cpp | 16 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGlobalHeuristics.cpp | 7 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahYoungHeuristics.cpp | 34 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahAgeCensus.cpp | 96 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahAgeCensus.hpp | 30 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahAllocRequest.hpp | 10 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.cpp | 3 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.cpp | 16 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.hpp | 30 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp | 24 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.cpp | 38 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.hpp | 1 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp | 50 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp | 8 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp | 12 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.hpp | 1 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalFullGC.cpp | 5 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalFullGC.hpp | 1 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.hpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.inline.hpp | 37 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp | 77 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp | 16 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.inline.hpp | 1 openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp | 1 openjdk-25-25.0.2+10/src/hotspot/share/gc/z/zPageAllocator.cpp | 23 openjdk-25-25.0.2+10/src/hotspot/share/jfr/jfr.cpp | 4 openjdk-25-25.0.2+10/src/hotspot/share/jfr/jfr.hpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp | 7 openjdk-25-25.0.2+10/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp | 7 openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdKlassQueue.cpp | 13 openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp | 16 openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp | 4 openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp | 9 openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciEnv.cpp | 6 openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciEnv.hpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciRuntime.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/logging/logAsyncWriter.cpp | 6 openjdk-25-25.0.2+10/src/hotspot/share/memory/allocation.cpp | 4 openjdk-25-25.0.2+10/src/hotspot/share/memory/guardedMemory.hpp | 18 openjdk-25-25.0.2+10/src/hotspot/share/memory/memoryReserver.cpp | 5 openjdk-25-25.0.2+10/src/hotspot/share/memory/memoryReserver.hpp | 1 openjdk-25-25.0.2+10/src/hotspot/share/memory/metaspace.cpp | 10 openjdk-25-25.0.2+10/src/hotspot/share/memory/metaspace.hpp | 4 openjdk-25-25.0.2+10/src/hotspot/share/nmt/mallocHeader.inline.hpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/nmt/mallocTracker.cpp | 6 openjdk-25-25.0.2+10/src/hotspot/share/oops/array.inline.hpp | 6 openjdk-25-25.0.2+10/src/hotspot/share/oops/arrayKlass.cpp | 4 openjdk-25-25.0.2+10/src/hotspot/share/oops/arrayKlass.hpp | 4 openjdk-25-25.0.2+10/src/hotspot/share/oops/cpCache.inline.hpp | 3 openjdk-25-25.0.2+10/src/hotspot/share/oops/instanceKlass.cpp | 20 openjdk-25-25.0.2+10/src/hotspot/share/oops/instanceKlass.hpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/oops/instanceMirrorKlass.hpp | 3 openjdk-25-25.0.2+10/src/hotspot/share/oops/instanceMirrorKlass.inline.hpp | 63 openjdk-25-25.0.2+10/src/hotspot/share/oops/klass.cpp | 15 openjdk-25-25.0.2+10/src/hotspot/share/oops/klass.hpp | 6 openjdk-25-25.0.2+10/src/hotspot/share/oops/klass.inline.hpp | 11 openjdk-25-25.0.2+10/src/hotspot/share/oops/method.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/oops/trainingData.cpp | 4 openjdk-25-25.0.2+10/src/hotspot/share/oops/trainingData.hpp | 27 openjdk-25-25.0.2+10/src/hotspot/share/opto/bytecodeInfo.cpp | 33 openjdk-25-25.0.2+10/src/hotspot/share/opto/callnode.cpp | 23 openjdk-25-25.0.2+10/src/hotspot/share/opto/callnode.hpp | 50 openjdk-25-25.0.2+10/src/hotspot/share/opto/compile.cpp | 13 openjdk-25-25.0.2+10/src/hotspot/share/opto/library_call.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/opto/parse1.cpp | 7 openjdk-25-25.0.2+10/src/hotspot/share/opto/superword.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp | 5 openjdk-25-25.0.2+10/src/hotspot/share/prims/jvmtiEnv.cpp | 22 openjdk-25-25.0.2+10/src/hotspot/share/prims/jvmtiTagMap.cpp | 6 openjdk-25-25.0.2+10/src/hotspot/share/prims/vectorSupport.cpp | 19 openjdk-25-25.0.2+10/src/hotspot/share/prims/vectorSupport.hpp | 19 openjdk-25-25.0.2+10/src/hotspot/share/prims/whitebox.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/runtime/abstract_vm_version.cpp | 12 openjdk-25-25.0.2+10/src/hotspot/share/runtime/arguments.cpp | 1 openjdk-25-25.0.2+10/src/hotspot/share/runtime/deoptimization.cpp | 4 openjdk-25-25.0.2+10/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp | 18 openjdk-25-25.0.2+10/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp | 4 openjdk-25-25.0.2+10/src/hotspot/share/runtime/globals.hpp | 11 openjdk-25-25.0.2+10/src/hotspot/share/runtime/java.cpp | 5 openjdk-25-25.0.2+10/src/hotspot/share/runtime/javaThread.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/runtime/mutexLocker.cpp | 2 openjdk-25-25.0.2+10/src/hotspot/share/runtime/os.cpp | 6 openjdk-25-25.0.2+10/src/hotspot/share/runtime/vmStructs.cpp | 14 openjdk-25-25.0.2+10/src/hotspot/share/utilities/vmError.cpp | 7 openjdk-25-25.0.2+10/src/java.base/share/classes/java/lang/ClassValue.java | 3 openjdk-25-25.0.2+10/src/java.base/share/classes/java/lang/ScopedValue.java | 29 openjdk-25-25.0.2+10/src/java.base/share/classes/java/net/InMemoryCookieStore.java | 18 openjdk-25-25.0.2+10/src/java.base/share/classes/java/nio/Bits.java | 26 openjdk-25-25.0.2+10/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template | 4 openjdk-25-25.0.2+10/src/java.base/share/classes/java/text/Collator.java | 9 openjdk-25-25.0.2+10/src/java.base/share/classes/java/text/RuleBasedCollator.java | 11 openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/SimpleTimeZone.java | 27 openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java | 8 openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java | 41 openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/Executors.java | 7 openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/classfile/impl/verifier/VerifierImpl.java | 17 openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/foreign/abi/BindingSpecializer.java | 6 openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/util/Exceptions.java | 5 openjdk-25-25.0.2+10/src/java.base/share/classes/sun/invoke/util/BytecodeDescriptor.java | 13 openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/provider/certpath/URICertStore.java | 358 openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/ssl/DTLSInputRecord.java | 9 openjdk-25-25.0.2+10/src/java.base/share/conf/security/java.security | 45 openjdk-25-25.0.2+10/src/java.base/unix/classes/sun/nio/ch/NativeThread.java | 13 openjdk-25-25.0.2+10/src/java.base/unix/classes/sun/nio/ch/UnixDispatcher.java | 16 openjdk-25-25.0.2+10/src/java.base/unix/native/libjava/ProcessImpl_md.c | 2 openjdk-25-25.0.2+10/src/java.base/unix/native/libjava/childproc.c | 5 openjdk-25-25.0.2+10/src/java.base/unix/native/libjava/java_props_md.c | 2 openjdk-25-25.0.2+10/src/java.base/unix/native/libnio/ch/NativeThread.c | 11 openjdk-25-25.0.2+10/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c | 15 openjdk-25-25.0.2+10/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java | 3 openjdk-25-25.0.2+10/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDesktopPeer.java | 57 openjdk-25-25.0.2+10/src/java.desktop/macosx/native/libawt_lwawt/awt/CDesktopPeer.m | 126 openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java | 21 openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java | 6 openjdk-25-25.0.2+10/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java | 41 openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/border/LineBorder.java | 6 openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java | 9 openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java | 106 openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPasswordFieldUI.java | 21 openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java | 18 openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthPasswordFieldUI.java | 17 openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/awt/image/XbmImageDecoder.java | 209 openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java | 12 openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java | 22 openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/java2d/pipe/SpanClipRenderer.java | 8 openjdk-25-25.0.2+10/src/java.desktop/share/native/common/java2d/opengl/OGLContext.c | 1 openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConvMxN_Fp.c | 9 openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConvMxN_ext.c | 6 openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_16ext.c | 23 openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_16nw.c | 7 openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_32nw.c | 7 openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_8ext.c | 23 openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_8nw.c | 7 openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_u16ext.c | 23 openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_u16nw.c | 7 openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageLookUp_Bit.c | 12 openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageScanPoly.c | 11 openjdk-25-25.0.2+10/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java | 9 openjdk-25-25.0.2+10/src/java.desktop/unix/classes/sun/print/PrintServiceLookupProvider.java | 6 openjdk-25-25.0.2+10/src/java.desktop/unix/native/common/awt/awt_GraphicsEnv.h | 7 openjdk-25-25.0.2+10/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c | 346 openjdk-25-25.0.2+10/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxMenuItemUI.java | 4 openjdk-25-25.0.2+10/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java | 11 openjdk-25-25.0.2+10/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java | 71 openjdk-25-25.0.2+10/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuUI.java | 3 openjdk-25-25.0.2+10/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsRadioButtonMenuItemUI.java | 4 openjdk-25-25.0.2+10/src/java.desktop/windows/classes/sun/awt/windows/WDesktopPeer.java | 53 openjdk-25-25.0.2+10/src/java.desktop/windows/native/libawt/windows/awt_Desktop.cpp | 49 openjdk-25-25.0.2+10/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp | 32 openjdk-25-25.0.2+10/src/java.rmi/share/classes/javax/rmi/ssl/SslRMIClientSocketFactory.java | 13 openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_convert.c | 3 openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_crypt.c | 38 openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_keymgmt.c | 103 openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c | 10 openjdk-25-25.0.2+10/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java | 37 openjdk-25-25.0.2+10/src/jdk.httpserver/share/classes/sun/net/httpserver/ExchangeImpl.java | 19 openjdk-25-25.0.2+10/src/jdk.httpserver/share/classes/sun/net/httpserver/Utils.java | 33 openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java | 5 openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java | 19 openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotVMConfig.java | 2 openjdk-25-25.0.2+10/src/jdk.jartool/share/classes/sun/tools/jar/Main.java | 3 openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/events/MethodTraceEvent.java | 2 openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataRepository.java | 2 openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/SettingsManager.java | 4 openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java | 8 openjdk-25-25.0.2+10/src/jdk.jfr/share/conf/jfr/default.jfc | 6 openjdk-25-25.0.2+10/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/AppImageSigner.java | 2 openjdk-25-25.0.2+10/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/SigningIdentityBuilder.java | 4 openjdk-25-25.0.2+10/src/jdk.jpackage/share/classes/jdk/jpackage/internal/FromParams.java | 11 openjdk-25-25.0.2+10/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/PListReader.java | 273 openjdk-25-25.0.2+10/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp | 25 openjdk-25-25.0.2+10/src/jdk.jpackage/windows/native/common/Executor.cpp | 6 openjdk-25-25.0.2+10/src/jdk.jpackage/windows/native/common/Executor.h | 13 openjdk-25-25.0.2+10/src/jdk.management.jfr/share/classes/jdk/management/jfr/RemoteRecordingStream.java | 14 openjdk-25-25.0.2+10/src/jdk.management/linux/native/libmanagement_ext/UnixOperatingSystem.c | 4 openjdk-25-25.0.2+10/test/docs/TEST.ROOT | 2 openjdk-25-25.0.2+10/test/hotspot/gtest/gc/shenandoah/test_shenandoahAgeCensus.cpp | 159 openjdk-25-25.0.2+10/test/hotspot/gtest/gc/shenandoah/test_shenandoahCollectorPolicy.cpp | 72 openjdk-25-25.0.2+10/test/hotspot/gtest/nmt/test_nmt_buffer_overflow_detection.cpp | 2 openjdk-25-25.0.2+10/test/hotspot/gtest/runtime/test_arguments.cpp | 5 openjdk-25-25.0.2+10/test/hotspot/gtest/runtime/test_cgroupSubsystem_linux.cpp | 5 openjdk-25-25.0.2+10/test/hotspot/gtest/runtime/test_os.cpp | 10 openjdk-25-25.0.2+10/test/hotspot/gtest/x86/asmtest.out.h | 5312 +++++----- openjdk-25-25.0.2+10/test/hotspot/gtest/x86/x86-asmtest.py | 30 openjdk-25-25.0.2+10/test/hotspot/jtreg/ProblemList.txt | 11 openjdk-25-25.0.2+10/test/hotspot/jtreg/TEST.ROOT | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/TEST.groups | 6 openjdk-25-25.0.2+10/test/hotspot/jtreg/applications/jcstress/README | 11 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/arraycopy/TestIllegalArrayCopyBeforeInfiniteLoop.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/arraycopy/TestNegArrayLengthAsIndex1.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/arraycopy/TestNegArrayLengthAsIndex2.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/arraycopy/TestNegativeArrayCopyAfterLoop.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c1/TestRangeCheckEliminated.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/Test7046096.java | 14 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/Test7179138_2.java | 13 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/TestBit.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/TestDuplicateSimpleLoopBackedge.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/TestMergeStores.java | 450 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/cr6865031/Test.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/irTests/TestAutoVectorization2DArray.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/irTests/TestIfMinMax.java | 12 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/compilercontrol/TestConflictInlineCommands.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/debug/TraceIterativeGVN.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/gcbarriers/TestG1BarrierGeneration.java | 20 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/float16/Binary16ConversionNaN_2.java | 178 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/math/TestPow0Dot5Opt.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/math/TestPow2Opt.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnSupportedCPU.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnUnsupportedCPU.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jvmci/errors/TestInvalidTieredStopAtLevel.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/lib/compile_framework/Compile.java | 6 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/irrule/checkattribute/parsing/RawIRNode.java | 6 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/LoopReductionHasControlOrBadInput.java | 56 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/TestLoopEndNodeEliminate.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/TestLoopPredicateDep.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/TestSkeletonPredicateNegation.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/RedTest_long.java | 10 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/SumRed_Long.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/TestAlignVector.java | 20 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/TestGeneralizedReductions.java | 22 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/TestUnorderedReductionPartialVectorization.java | 14 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/oracle/TestInvalidCompileCommand.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/print/TestTraceOptoParse.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java | 3 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/regalloc/TestGCMRecalcPressureNodes.java | 3 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/unsafe/TestMisalignedUnsafeAccess.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorapi/TestIntrinsicBailOut.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorapi/TestVectorErgonomics.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorapi/TestVectorMathLib.java | 131 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorapi/VectorReinterpretTest.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorization/TestFloatConversionsVectorNaN.java | 14 openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorization/runner/LoopReductionOpTest.java | 6 openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/DockerBasicTest.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/ShareTmpDir.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestCPUAwareness.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestCPUSets.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestContainerInfo.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJFREvents.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJFRNetworkEvents.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJFRWithJMX.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJcmdWithSideCar.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestLimitsUpdating.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMemoryWithCgroupV1.java | 3 openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMisc.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestPids.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/TestAlwaysPreTouchBehavior.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/TestTransparentHugePagesHeap.java | 181 openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/arguments/TestG1CompressedOops.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/g1/TestCodeCacheUnloadDuringConcCycle.java | 206 openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/g1/plab/TestPLABEvacuationFailure.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/g1/plab/lib/PLABUtils.java | 14 openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/shenandoah/compiler/TestLinkToNativeRBP.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/z/TestCommitFailure.java | 8 openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/z/TestUncommit.java | 9 openjdk-25-25.0.2+10/test/hotspot/jtreg/gtest/GTestWrapper.java | 3 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/CompressedOops/CompressedCPUSpecificClassSpaceReservation.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/ErrorHandling/CreateCoredumpOnCrash.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java | 5 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/TestBreakSignalThreadDump.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/ThreadCountLimit.java | 27 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/TooSmallStackSize.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java | 20 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/ArchiveRelocationTest.java | 8 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/FillerObjectLoadTest.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/LotsOfSyntheticClasses.java | 3 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/TestDumpClassListSource.java | 3 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/TransformInterfaceOfLambda.java | 3 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/AOTLoggingTag.java | 11 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/ExcludedClasses.java | 59 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotFlags/AOTFlags.java | 11 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveNoDefaultArchive.java | 1 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java | 3 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/jni/checked/TestCharArrayReleasing.java | 2 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/jni/checked/TestLargeUTF8Length.java | 11 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/os/TestHugePageDecisionsAtVMStartup.java | 6 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/signal/SigTestDriver.java | 10 openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/signal/TestSigusr2.java | 35 openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java | 9 openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/VMEvent/libVMEventTest.c | 42 openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/GarbageProducerTest.java | 15 openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/GcNewTest.java | 11 openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/GcTest01.java | 15 openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/GcTest02.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCapacityTool.java | 5 openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCauseTool.java | 5 openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcNewTool.java | 5 openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcTool.java | 5 openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatResults.java | 6 openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatTool.java | 59 openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java | 57 openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java | 7 openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestBadFormat.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestIRMatching.java | 13 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/gctests/AllocateWithoutOomTest/AllocateWithoutOomTest.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Allocate/alloc001/alloc001.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetErrorName/geterrname002/TestDescription.java | 5 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted003.java | 23 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetVerboseFlag/setvrbflag002/TestDescription.java | 5 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Launcher.java | 6 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/BindServer.java | 1847 --- openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeArgumentHandler.java | 44 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeBinder.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeProcess.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/IOPipe.java | 10 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/test/Stresser.java | 38 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Implicit01/cs_disabled/TestDescription.java | 16 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Implicit01/cs_enabled/TestDescription.java | 16 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Merge01/cs_disabled/TestDescription.java | 16 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Merge01/cs_enabled/TestDescription.java | 16 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings_Strings/TestDescription.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree/TestDescription.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_ArrayOf/TestDescription.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_TwoFields/TestDescription.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings/TestDescription.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_InternedStrings/TestDescription.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_TwoFields/TestDescription.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree/TestDescription.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Strings/TestDescription.java | 4 openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/mlvm/indy/func/jvmti/stepBreakPopReturn/stepBreakPopReturn.cpp | 6 openjdk-25-25.0.2+10/test/jaxp/TEST.ROOT | 2 openjdk-25-25.0.2+10/test/jdk/ProblemList.txt | 14 openjdk-25-25.0.2+10/test/jdk/TEST.ROOT | 2 openjdk-25-25.0.2+10/test/jdk/com/sun/jdi/JdbStopInNotificationThreadTest.java | 6 openjdk-25-25.0.2+10/test/jdk/com/sun/jdi/ThreadMemoryLeakTest.java | 2 openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/FileServerHandler.java | 28 openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test12.java | 162 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Bind.java | 15 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/CloseDescriptors.java | 7 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/CommUp.java | 15 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Connect.java | 13 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Receive.java | 16 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/ReceiveIntoDirect.java | 15 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Send.java | 15 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Shutdown.java | 15 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java | 15 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Branch.java | 15 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/CloseDescriptors.java | 13 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Send.java | 15 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SendFailed.java | 15 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java | 15 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpServerChannel/Accept.java | 15 openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpServerChannel/NonBlockingAccept.java | 13 openjdk-25-25.0.2+10/test/jdk/java/awt/Cursor/CursorDragTest/ListDragCursor.java | 100 openjdk-25-25.0.2+10/test/jdk/java/awt/Desktop/BrowseTest.java | 26 openjdk-25-25.0.2+10/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java | 2 openjdk-25-25.0.2+10/test/jdk/java/awt/FileDialog/DoubleActionESC.java | 50 openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/ComponentLostFocusTest.java | 38 openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/InactiveFocusRace.java | 53 openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/BogusFocusableWindowState/BogusFocusableWindowState.java | 50 openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java | 2 openjdk-25-25.0.2+10/test/jdk/java/awt/List/MouseDraggedOriginatedByScrollBarTest.java | 84 openjdk-25-25.0.2+10/test/jdk/java/awt/TextField/SetEchoCharTest4/SetEchoCharTest4.java | 27 openjdk-25-25.0.2+10/test/jdk/java/awt/TextField/SetEchoCharWordOpsTest.java | 4 openjdk-25-25.0.2+10/test/jdk/java/awt/Toolkit/Headless/WrappedToolkitTest/TestWrapped.java | 77 openjdk-25-25.0.2+10/test/jdk/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh | 221 openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/SerializationSpecTest.java | 99 openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/StandardProfilesRoundTrip.java | 73 openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/ValidateICCHeaderData/ValidateICCHeaderData.java | 10 openjdk-25-25.0.2+10/test/jdk/java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java | 256 openjdk-25-25.0.2+10/test/jdk/java/awt/font/FontNames/LocaleFamilyNames.java | 13 openjdk-25-25.0.2+10/test/jdk/java/awt/font/TextLayout/MyanmarTextTest.java | 45 openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/XBMDecoderTest.java | 77 openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid.xbm | 2 openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid_hex.xbm | 3 openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid_ht.xbm | 3 openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/valid.xbm | 6 openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/valid_hex.xbm | 4 openjdk-25-25.0.2+10/test/jdk/java/awt/print/Dialog/DialogType.java | 96 openjdk-25-25.0.2+10/test/jdk/java/awt/regtesthelpers/PassFailJFrame.java | 25 openjdk-25-25.0.2+10/test/jdk/java/foreign/TestUpcallStructScope.java | 39 openjdk-25-25.0.2+10/test/jdk/java/foreign/libTestUpcallStructScope.c | 4 openjdk-25-25.0.2+10/test/jdk/java/io/File/MaxPathLength.java | 43 openjdk-25-25.0.2+10/test/jdk/java/io/File/SymLinks.java | 39 openjdk-25-25.0.2+10/test/jdk/java/io/FileDescriptor/Sync.java | 2 openjdk-25-25.0.2+10/test/jdk/java/lang/Math/FusedMultiplyAddTests.java | 9 openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessBuilder/Basic.java | 39 openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/TestChildSignalDisposition.java | 70 openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/exePrintSignalDisposition.c | 83 openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/libChangeSignalDisposition.c | 40 openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessHandle/InfoTest.java | 12 openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-ALL.properties | 8 openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-FINE.properties | 2 openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-FINER.properties | 8 openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-INFO.properties | 2 openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-OFF.properties | 8 openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-SEVERE.properties | 8 openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-WARNING.properties | 8 openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/RuntimeExitLogTest.java | 86 openjdk-25-25.0.2+10/test/jdk/java/lang/String/nativeEncoding/libstringPlatformChars.c | 16 openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/ParkWithFixedThreadPool.java | 2 openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenBlocking.java | 4 openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java | 4 openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/stress/ParkALot.java | 4 openjdk-25-25.0.2+10/test/jdk/java/lang/instrument/RetransformBigClassTest.java | 161 openjdk-25-25.0.2+10/test/jdk/java/lang/invoke/ClassValueTest.java | 73 openjdk-25-25.0.2+10/test/jdk/java/lang/invoke/MethodTypeTest.java | 23 openjdk-25-25.0.2+10/test/jdk/java/net/CookieHandler/B6644726.java | 9 openjdk-25-25.0.2+10/test/jdk/java/net/CookieStoreTest.java | 113 openjdk-25-25.0.2+10/test/jdk/java/net/InetAddress/ptr/Lookup.java | 9 openjdk-25-25.0.2+10/test/jdk/java/net/NetworkInterface/IPv4Only.java | 14 openjdk-25-25.0.2+10/test/jdk/java/net/Socket/DeadlockTest.java | 30 openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/CancelRequestTest.java | 10 openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/HttpsTunnelAuthTest.java | 10 openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ManyRequests.java | 1 openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ProxyServer.java | 28 openjdk-25-25.0.2+10/test/jdk/java/net/ipv6tests/TcpTest.java | 9 openjdk-25-25.0.2+10/test/jdk/java/net/vthread/HttpALot.java | 45 openjdk-25-25.0.2+10/test/jdk/java/nio/Buffer/AllocateDirectInit.java | 59 openjdk-25-25.0.2+10/test/jdk/java/nio/channels/DatagramChannel/PromiscuousIPv6.java | 24 openjdk-25-25.0.2+10/test/jdk/java/nio/channels/DatagramChannel/StressNativeSignal.java | 87 openjdk-25-25.0.2+10/test/jdk/java/nio/channels/FileChannel/directio/DirectIOTest.java | 90 openjdk-25-25.0.2+10/test/jdk/java/nio/channels/FileChannel/directio/libDirectIO.c | 34 openjdk-25-25.0.2+10/test/jdk/java/nio/channels/vthread/BlockingChannelOps.java | 140 openjdk-25-25.0.2+10/test/jdk/java/nio/charset/Charset/IllegalCharsetName.java | 6 openjdk-25-25.0.2+10/test/jdk/java/nio/file/DirectoryStream/SecureDS.java | 2 openjdk-25-25.0.2+10/test/jdk/java/nio/file/FileStore/Basic.java | 13 openjdk-25-25.0.2+10/test/jdk/java/security/SignedJar/spi-calendar-provider/TestSPISigned.java | 9 openjdk-25-25.0.2+10/test/jdk/java/util/TimeZone/DefaultTimeZoneTest.java | 34 openjdk-25-25.0.2+10/test/jdk/java/util/TimeZone/SimpleTimeZoneEqualsHashCodeTest.java | 83 openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/CopyOnWriteArraySet/SerializationTest.java | 84 openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/Executors/AutoShutdown.java | 59 openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/tck/CompletableFutureTest.java | 43 openjdk-25-25.0.2+10/test/jdk/javax/management/security/SecurityTest.java | 2 openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/DTLSNamedGroups.java | 3 openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/DTLSOverDatagram.java | 12 openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/DTLSSignatureSchemes.java | 3 openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/FragmentedFinished.java | 72 openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/PacketLossRetransmission.java | 27 openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLException/CheckSSLHandshakeException.java | 2 openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLException/CheckSSLKeyException.java | 2 openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLException/CheckSSLPeerUnverifiedException.java | 2 openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLException/CheckSSLProtocolException.java | 2 openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLParameters/NamedGroups.java | 2 openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLParameters/NamedGroupsSpec.java | 2 openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLParameters/SignatureSchemes.java | 2 openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/ServerName/EndingDotHostname.java | 3 openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/templates/SSLExampleCert.java | 2 openjdk-25-25.0.2+10/test/jdk/javax/print/PrintServiceLookup/CountPrintServices.java | 28 openjdk-25-25.0.2+10/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java | 5 openjdk-25-25.0.2+10/test/jdk/javax/security/auth/callback/PasswordCallback/CheckCleanerBound.java | 3 openjdk-25-25.0.2+10/test/jdk/javax/security/auth/callback/PasswordCallback/PasswordCleanup.java | 3 openjdk-25-25.0.2+10/test/jdk/javax/swing/JCheckBox/4449413/bug4449413.java | 29 openjdk-25-25.0.2+10/test/jdk/javax/swing/JFileChooser/HTMLFileName.java | 69 openjdk-25-25.0.2+10/test/jdk/javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java | 17 openjdk-25-25.0.2+10/test/jdk/javax/swing/JMenuBar/RightLeftOrientation.java | 85 openjdk-25-25.0.2+10/test/jdk/javax/swing/JMenuItem/RightLeftOrientation.java | 105 openjdk-25-25.0.2+10/test/jdk/javax/swing/JOptionPane/TestJOptionHTMLTag.java | 68 openjdk-25-25.0.2+10/test/jdk/javax/swing/JPasswordField/PasswordFieldInputMapWordTest.java | 118 openjdk-25-25.0.2+10/test/jdk/javax/swing/JTabbedPane/bug4499556.java | 5 openjdk-25-25.0.2+10/test/jdk/javax/swing/SwingUtilities/bug4967768.java | 12 openjdk-25-25.0.2+10/test/jdk/javax/swing/border/LineBorder/ScaledLineBorderTest.java | 114 openjdk-25-25.0.2+10/test/jdk/javax/swing/border/LineBorder/ScaledTextFieldBorderTest.java | 9 openjdk-25-25.0.2+10/test/jdk/javax/swing/plaf/basic/BasicTextUI/PasswordSelectionWordTest.java | 94 openjdk-25-25.0.2+10/test/jdk/jdk/incubator/vector/BasicFloat16ArithTests.java | 67 openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/GetFreeSwapSpaceSize.java | 2 openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerBasic.java | 1 openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerCpuMetrics.java | 1 openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java | 1 openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetricsSubgroup.java | 1 openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestGetFreeSwapSpaceSize.java | 3 openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestLimitsUpdating.java | 1 openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestPidsLimit.java | 1 openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestSystemMetrics.java | 1 openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestUseContainerSupport.java | 1 openjdk-25-25.0.2+10/test/jdk/jdk/jfr/api/flightrecorder/TestSettingsControl.java | 14 openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/gc/configuration/TestGCHeapConfigurationEventWith32BitOops.java | 2 openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/gc/configuration/TestGCHeapConfigurationEventWithZeroBasedOops.java | 2 openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/gc/detailed/TestGCHeapMemoryUsageEvent.java | 4 openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/io/TestIOTopFrame.java | 8 openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/oldobject/TestEmergencyDumpAtOOM.java | 117 openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleThrottling.java | 20 openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/tracing/TestMethodTrace.java | 29 openjdk-25-25.0.2+10/test/jdk/jdk/jfr/jmx/streaming/TestEnableDisable.java | 4 openjdk-25-25.0.2+10/test/jdk/jdk/jfr/jmx/streaming/TestWithers.java | 141 openjdk-25-25.0.2+10/test/jdk/jdk/jfr/tool/TestPrintContextual.java | 1 openjdk-25-25.0.2+10/test/jdk/jdk/nio/zipfs/NewFileSystemTests.java | 6 openjdk-25-25.0.2+10/test/jdk/sun/awt/font/TestDevTransform.java | 48 openjdk-25-25.0.2+10/test/jdk/sun/java2d/cmm/ColorConvertOp/FilterSemiCustomImages.java | 162 openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/AbstractFilePermissionTest.java | 7 openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.java | 2 openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/LocalManagementTest.java | 12 openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java | 3 openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java | 4 openjdk-25-25.0.2+10/test/jdk/sun/net/www/protocol/file/FileURLTest.java | 7 openjdk-25-25.0.2+10/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java | 716 - openjdk-25-25.0.2+10/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/TEST.properties | 3 openjdk-25-25.0.2+10/test/jdk/sun/security/ec/ECDHKeyAgreementParamValidation.java | 2 openjdk-25-25.0.2+10/test/jdk/sun/security/jgss/GssContextCleanup.java | 3 openjdk-25-25.0.2+10/test/jdk/sun/security/jgss/GssNameCleanup.java | 3 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/ReinitCipher.java | 7 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/Test4512704.java | 21 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestCICOWithGCM.java | 27 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestCICOWithGCMAndAAD.java | 10 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPoly.java | 7 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyKAT.java | 16 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyNoReuse.java | 15 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyOutputSize.java | 9 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestCipherMode.java | 37 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestGCMKeyAndIvCheck.java | 25 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestKATForGCM.java | 9 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestRSACipher.java | 6 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestRSACipherWrap.java | 6 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestRawRSACipher.java | 6 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestSymmCiphers.java | 80 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java | 62 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java | 7 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/TestDH.java | 6 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/TestInterop.java | 6 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/TestShort.java | 35 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java | 7 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyGenerator/DESParity.java | 11 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyGenerator/TestAES.java | 14 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyGenerator/TestChaCha20.java | 7 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java | 2 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java | 7 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyPairGenerator/TestDefaultDHPrivateExpSize.java | 9 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyStore/CertChainRemoval.java | 11 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyStore/ClientAuth.java | 5 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/PKCS11Test.java | 49 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/SecretKeyFactory/TestGeneral.java | 55 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/SecureRandom/Basic.java | 7 openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/SecureRandom/TestDeserialization.java | 12 openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/SignatureScheme/SigAlgosExtTestWithTLS12.java | 2 openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/SignatureScheme/SigAlgosExtTestWithTLS13.java | 2 openjdk-25-25.0.2+10/test/jdk/sun/security/tools/jarsigner/EC.java | 3 openjdk-25-25.0.2+10/test/jdk/sun/security/tools/jarsigner/VerifyJarEntryName.java | 32 openjdk-25-25.0.2+10/test/jdk/sun/security/x509/URICertStore/AIACertTimeout.java | 2 openjdk-25-25.0.2+10/test/jdk/sun/security/x509/URICertStore/ExtensionsWithLDAP.java | 94 openjdk-25-25.0.2+10/test/jdk/sun/text/resources/LocaleDataTest.java | 4 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcCapacityOutput1.sh | 7 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcCauseOutput1.sh | 7 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcMetaCapacityOutput1.sh | 7 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcNewCapacityOutput1.sh | 7 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcNewOutput1.sh | 7 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcOldCapacityOutput1.sh | 7 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcOldOutput1.sh | 7 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcOutput1.sh | 7 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatLineCounts1.sh | 7 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatLineCounts2.sh | 7 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatLineCounts3.sh | 7 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatLineCounts4.sh | 7 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/lineCounts1.awk | 2 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/lineCounts2.awk | 2 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/lineCounts3.awk | 2 openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/lineCounts4.awk | 2 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/TEST.properties | 1 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/apps/PrintEnv.java | 33 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/apps/UseShutdownHook.java | 88 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/clean_test_output.sh | 87 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AdditionalLauncher.java | 385 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AppImageFile.java | 69 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/CfgFile.java | 12 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/CommandArguments.java | 5 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/ConfigFilesStasher.java | 2 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java | 75 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherAsServiceVerifier.java | 97 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherIconVerifier.java | 21 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherShortcut.java | 167 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherVerifier.java | 368 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LinuxHelper.java | 241 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MacHelper.java | 19 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MacSignVerify.java | 11 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MsiDatabase.java | 377 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageTest.java | 53 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java | 76 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WinShortcutVerifier.java | 283 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WindowsHelper.java | 310 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/junit/share/jdk.jpackage/jdk/jpackage/internal/util/PListReaderTest.java | 290 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/linux/UpgradeTest.java | 10 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/macosx/MacFileAssociationsTest.java | 35 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/macosx/MacSignTest.java | 7 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/macosx/base/SigningBase.java | 4 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/resources/Win8365790Test.ps1 | 83 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/resources/msi-export.js | 81 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/resources/query-msi-property.js | 65 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/share/AddLShortcutTest.java | 322 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/share/AddLauncherTest.java | 14 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/share/FileAssociationsTest.java | 34 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/share/PerUserCfgTest.java | 12 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/windows/Win8365790Test.java | 128 openjdk-25-25.0.2+10/test/jdk/tools/launcher/TooSmallStackSize.java | 4 openjdk-25-25.0.2+10/test/jdk/tools/sincechecker/modules/jdk.editpad/JdkEditpadCheckSince.java | 30 openjdk-25-25.0.2+10/test/jtreg-ext/requires/VMProps.java | 22 openjdk-25-25.0.2+10/test/langtools/TEST.ROOT | 2 openjdk-25-25.0.2+10/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsClass.java | 11 openjdk-25-25.0.2+10/test/langtools/tools/javac/jvm/ClassRefDupInConstantPoolTest.java | 4 openjdk-25-25.0.2+10/test/lib-test/TEST.ROOT | 2 openjdk-25-25.0.2+10/test/lib-test/jdk/test/whitebox/CPUInfoTest.java | 3 openjdk-25-25.0.2+10/test/lib-test/jdk/test/whitebox/vm_flags/SizeTTest.java | 4 openjdk-25-25.0.2+10/test/lib/jdk/test/lib/Utils.java | 19 openjdk-25-25.0.2+10/test/lib/jdk/test/lib/cds/CDSAppTester.java | 19 openjdk-25-25.0.2+10/test/lib/jdk/test/lib/cds/CDSTestUtils.java | 1 openjdk-25-25.0.2+10/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java | 11 openjdk-25-25.0.2+10/test/lib/jdk/test/lib/os/linux/HugePageConfiguration.java | 29 openjdk-25-25.0.2+10/test/lib/jdk/test/lib/security/CertificateBuilder.java | 96 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/java/lang/ScopedValues.java | 86 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/java/nio/DirectByteBufferAlloc.java | 60 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/java/security/Signatures.java | 3 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/compiler/AutoVectorization2DArray.java | 2 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/compiler/LoopUnroll.java | 2 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/AllDead.java | 10 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/AllLive.java | 10 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesArray.java | 10 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesHashMap.java | 10 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesTreeMap.java | 10 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadFirstPart.java | 10 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadInterleaved.java | 10 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadInterleavedChunks.java | 10 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadSecondPart.java | 10 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfHashedHalfDead.java | 10 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/NoObjects.java | 15 openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/OneBigObject.java | 10 763 files changed, 17029 insertions(+), 10811 deletions(-) dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp2l3q2w4n/openjdk-25_25.0.1+8-1~deb13u1.dsc: no acceptable signature found dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp2l3q2w4n/openjdk-25_25.0.2+10-1~deb13u2.dsc: no acceptable signature found diff -Nru openjdk-25-25.0.1+8/.jcheck/conf openjdk-25-25.0.2+10/.jcheck/conf --- openjdk-25-25.0.1+8/.jcheck/conf 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/.jcheck/conf 2025-12-18 08:04:02.000000000 +0000 @@ -1,7 +1,7 @@ [general] project=jdk-updates jbs=JDK -version=25.0.1 +version=25.0.2 [checks] error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists,copyright diff -Nru openjdk-25-25.0.1+8/debian/JB-doc.overrides.in openjdk-25-25.0.2+10/debian/JB-doc.overrides.in --- openjdk-25-25.0.1+8/debian/JB-doc.overrides.in 2025-09-27 10:40:54.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/JB-doc.overrides.in 2026-01-21 20:46:58.000000000 +0000 @@ -1,8 +1,5 @@ # Override due to upstream copyright @basename@-doc binary: spelling-error-in-copyright "GNU Public License" "GNU General Public License" -# 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.0.1+8/debian/JB-jre-headless.overrides.in openjdk-25-25.0.2+10/debian/JB-jre-headless.overrides.in --- openjdk-25-25.0.1+8/debian/JB-jre-headless.overrides.in 2025-09-27 10:40:54.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/JB-jre-headless.overrides.in 2026-01-21 20:46:58.000000000 +0000 @@ -1,4 +1,5 @@ -# Strip libjvm.so with --strip-debug instead of --strip-unneeded. LP: #574997. +# keep symbols so that native memory tracking works +# See https://bugs.launchpad.net/ubuntu/+source/openjdk-20/+bug/2012326 @basename@-jre-headless binary: unstripped-binary-or-object # openjdk is installed under /usr/lib diff -Nru openjdk-25-25.0.1+8/debian/JB-jre-zero.overrides.in openjdk-25-25.0.2+10/debian/JB-jre-zero.overrides.in --- openjdk-25-25.0.1+8/debian/JB-jre-zero.overrides.in 2024-08-08 06:16:47.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/JB-jre-zero.overrides.in 2026-01-12 00:57:31.000000000 +0000 @@ -1,4 +1,5 @@ -# Strip libjvm.so with --strip-debug instead of --strip-unneeded. LP: #574997. +# keep symbols so that native memory tracking works +# See https://bugs.launchpad.net/ubuntu/+source/openjdk-20/+bug/2012326 @basename@-jre-zero binary: unstripped-binary-or-object # Upstream implementation @@ -6,4 +7,4 @@ @basename@-jre-zero binary: spelling-error-in-binary # repeated lib due to upstream implementation directory layout -@basename@-jre-zero binary: repeated-path-segment \ No newline at end of file +@basename@-jre-zero binary: repeated-path-segment diff -Nru openjdk-25-25.0.1+8/debian/JB-jre.overrides.in openjdk-25-25.0.2+10/debian/JB-jre.overrides.in --- openjdk-25-25.0.1+8/debian/JB-jre.overrides.in 2024-08-08 06:16:47.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/JB-jre.overrides.in 2026-01-12 00:57:31.000000000 +0000 @@ -1,8 +1,8 @@ # these are in the -jre-headless package, -jre depends on it @basename@-jre binary: desktop-command-not-in-package -# LP: #2012326 - in order to print allocation locations, -# the libraries need to retain symbols +# keep symbols so that native memory tracking works +# See https://bugs.launchpad.net/ubuntu/+source/openjdk-20/+bug/2012326 @basename@-jre binary: unstripped-binary-or-object # repeated lib due to upstream implementation directory layout diff -Nru openjdk-25-25.0.1+8/debian/JB-jvmci-jdk.overrides.in openjdk-25-25.0.2+10/debian/JB-jvmci-jdk.overrides.in --- openjdk-25-25.0.1+8/debian/JB-jvmci-jdk.overrides.in 2025-09-27 10:40:54.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/JB-jvmci-jdk.overrides.in 2026-01-21 20:46:58.000000000 +0000 @@ -1,4 +1,5 @@ -# Strip libjvm.so with --strip-debug instead of --strip-unneeded. LP: #574997. +# keep symbols so that native memory tracking works +# See https://bugs.launchpad.net/ubuntu/+source/openjdk-20/+bug/2012326 @basename@-jvmci-jdk binary: unstripped-binary-or-object # override warning for the old mailing address in upstream copyright diff -Nru openjdk-25-25.0.1+8/debian/README.Debian openjdk-25-25.0.2+10/debian/README.Debian --- openjdk-25-25.0.1+8/debian/README.Debian 2023-03-17 00:31:13.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/README.Debian 2026-01-21 20:46:58.000000000 +0000 @@ -1,9 +1,9 @@ -openjdk-9 for Debian/Ubuntu +openjdk-XX for Debian/Ubuntu --------------------------- The OpenJDK build is configured --with-additional-vms to build with -different virtual machines. The original implementation of the hotspot -VM is only available on the amd64, i386, lpia and sparc architectures. +different virtual machines. The hotspot implementation is available +for amd64 arm64 ppc64 ppc64el riscv64 s390x. Other VM's: Zero, providing a byte code interpreter for every architecture. To use a different VM other than the default, use @@ -14,18 +14,13 @@ -J-zero. -To change the default permanently, edit /etc/java-9-openjdk/jvm.cfg. +To change the default permanently, edit /etc/java-XX-openjdk/jvm-.cfg. -The Zero VM can be found in the openjdk-9-jre-zero package (on the +The Zero VM can be found in the openjdk-XX-jre-zero package (on the architectures where the Hotspot VM is available). Please look for further documentation in the directory -/usr/share/doc/openjdk-9-jre/ . - -The package openjdk-9-jre-headless ships a cgi script -/usr/lib/jvm/java-9-openjdk/bin/java-rmi.cgi that you must integrate -into your webserver setup manually if you need it. It is not activated -automatically. +/usr/share/doc/openjdk-XX-jre/ . Note for non-reparenting window manager users @@ -48,18 +43,6 @@ export _JAVA_AWT_WM_NONREPARENTING=true EOF - -IcedTea NPPlugin ----------------- - -IcedTea provides a java plugin for at least mozilla based browsers. It is -not yet 100% with the closed source plugin, but much improved to the former -GCJPlugin. If you experience problems with the plugin, start your browser -from the command line with the environment variable ICEDTEAPLUGIN_DEBUG set, -and attach this output to a bug report. You usually should not expect a -quick fix, if the applet code is closed source, or only accessible after -creating accounts for external web services using these applets. - - + -- Vladimir Petko Fri, 12 Dec 2025 11:29:28 +1300 -- Matthias Klose Sun, 03 May 2009 13:58:10 +0200 -- Torsten Werner Wed, 02 Apr 2008 11:46:53 +0200 diff -Nru openjdk-25-25.0.1+8/debian/README.source openjdk-25-25.0.2+10/debian/README.source --- openjdk-25-25.0.1+8/debian/README.source 2023-03-17 00:31:13.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/README.source 2026-01-21 20:46:58.000000000 +0000 @@ -1,76 +1,63 @@ Content of source package ========================= -"openjdk-8" is a composite source package: -- Multiple tarballs from each Oracle mercurial repositories : - corba / hotspot / jaxp / jaxws / jdk-dfsg / langtools / openjdk -- Tarball from JamVM . +"openjdk-XX" is a composite source package: +- OpenJDK source tarball: + https://github/openjdk/jdku +- Google test source tarball + https://github.com/google/googletest - Debian packaging scripts and patches. -Building a new OpenJDK-8 Debian package +Building a new OpenJDK-XX Debian package =================================================== -Pre-requisites: -- Mercurial -- Bazaar - sudo aptitude install mercurial bzr - -0) Clone OpenJDK debian packaging: - bzr branch lp:~openjdk/openjdk/openjdk7 openjdk7/ - or update existing repository clone: - (cd openjdk7/; bzr pull --remember lp:~openjdk/openjdk/openjdk7) - -1) Clone IcedTea-7 HG: - hg clone http://icedtea.classpath.org/hg/icedtea7 icedtea-2.1.1/ - or update existing repository clone: - (cd icedtea7/; hg pull -u) - -2) Download OpenJDK upstream tarballs and move them to $BUILD/ - export BUILD=7u3 - mkdir -p $BUILD/ - ( - cd icedtea-2.1.1/ - sh autogen.sh && ./configure --enable-jamvm - make download - ) - - mv icedtea-2.1.1/*.tar.gz $BUILD/ - ( - cd icedtea-2.1.1/ - make distclean - ) - -3) Remove files with unclear license from jdk.tar.gz: - sh openjdk7/generate-dfsg-zip.sh $BUILD/jdk.tar.gz - sh openjdk7/generate-dfsg-zip.sh $BUILD/langtools.tar.gz - -4) Check tarballs' name and version (for original directory name) - in openjdk7/generate-debian-orig.sh and package version in - openjdk7/changelog -5) Generate "orig" directory and "orig+debian" directory - sh openjdk7/generate-debian-orig.sh +1. Update version in d/changelog +2. Update git_tag variable in d/rules +3. Execute make -f debian/rules get-orig +3a. Use watch file (uscan or uscan --download-current-version) + as an alternative to generate the source tarball. +4. Validate the build by building the package, installing it + and building again against the newly build package. + +Switching between early access and release builds +=================================================== +1. Update version in d/changelog +2. Update is_upstream_release to 'yes' for release builds +3. Regenerate d/watch: + + make -f debian/rules debian/watch + + +Performing a backport +=================================================== +1. Update version in d/changelog. +2. Unpack source tarballs +2. Regenerate packaging files for the appropriate version in + a chroot, e.g., + + schroot -c trixie-amd64 + make -f debian/rules debian/control gen-autopkgtests + +3. Validate the build by building the package, installing it + and building again against the newly build package. Support for DEB_BUILD_OPTIONS ============================= -As described in Debian Policy §4.9.1, current package's debian/rules support +The current package's debian/rules support the standardized environment variable DEB_BUILD_OPTIONS. This variable can contain several flags to change how a package is compiled and built. - * nocheck: don't run jtreg test suites. - * nodocs: pass --disable-docs to IcedTea configure script, which - disable Javadoc generation. - * nostrip: debugging symbols should not be stripped from the - binary during installation - * parallel=X: package should be built using up to X parallel processes - * nobootstrap: don't use gcj to bootstrap OpenJDK but use existing OpenJDK - installed on current machine. - * noaltzero: don't build alternative Zero VM. - * noaltshark: don't build alternative Shark VM. - * noaltjamvm: don't build alternative Jamvm VM. + * nocheck: don't run jtreg test suites. + * nodocs: skip javadoc generation + * nostrip: debugging symbols should not be stripped from the + binary during installation + * parallel=X: package should be built using up to X parallel processes + * nobootcycle: do not use OpenJDK bootcycle build, build the package + against boot OpenJDK + * noaltzero: don't build alternative Zero VM. + * terse: reduce build output. Sample usage: -DEB_BUILD_OPTIONS="parallel=5 nocheck" debuild -i"(\.hg|\.bzr)" - Build with 5 parallel processes and don't run jtreg test suites. + DEB_BUILD_OPTIONS="parallel=5 nocheck" dpkg-buildpackage -b" -This also work with cowbuilder/pbuilder: -DEB_BUILD_OPTIONS="parallel=5 nocheck" pdebuild -i"(\.hg|\.bzr)" --logfile ../build.log --pbuilder cowbuilder + Build with 5 parallel processes and don't run jtreg test suites. diff -Nru openjdk-25-25.0.1+8/debian/changelog openjdk-25-25.0.2+10/debian/changelog --- openjdk-25-25.0.1+8/debian/changelog 2025-10-23 10:25:46.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/changelog 2026-01-31 22:41:06.000000000 +0000 @@ -1,8 +1,56 @@ -openjdk-25 (25.0.1+8-1~deb13u1) trixie-security; urgency=medium +openjdk-25 (25.0.2+10-1~deb13u2) trixie-security; urgency=medium - * Rebuild for trixie + * Rebuild for trixie, now with jtreg8 re-enabled (since it's now + been available via a backport released via trixie-security) - -- Moritz Mühlenhoff Thu, 23 Oct 2025 12:25:46 +0200 + -- Moritz Mühlenhoff Sat, 31 Jan 2026 23:41:06 +0100 + +openjdk-25 (25.0.2+10-1) unstable; urgency=medium + + * OpenJDK 25.0.2 release, build 10. + - CVEs: + + CVE-2026-21945: 8368032: Enhance Certificate Checking. + + CVE-2026-21932: 8359501: Enhance Handling of URIs. + + CVE-2026-21933: 8362632: Improve HttpServer Request handling. + + CVE-2026-21925: 8341496: Improve JMX connections. + * d/rules: Use jtreg8 package for the tests. + * d/p/power-opt.diff: Refresh patch. + * Drop patches applied upstream: + - d/p/jdk-8359735.patch. + - d/p/jdk-8369450-proposed.patch. + - d/p/jdk-8370049-proposed.patch. + + -- Vladimir Petko Thu, 22 Jan 2026 10:10:25 +1300 + +openjdk-25 (25.0.1+8-3) unstable; urgency=medium + + * d/t/control.in: Remove flaky and skippable flag from dependencies.sh + test and install only jre package. + * d/t/control: Regenerate. + + -- Vladimir Petko Mon, 12 Jan 2026 14:40:31 +1300 + +openjdk-25 (25.0.1+8-2) unstable; urgency=medium + + [ Matthias Klose ] + * d/rules: Adjust any_archs, hppa is unlikely to get fixed for the + opposite stack frame growth. + * d/rules: Run the testsuite for loong64. + * Regenerate the watch file. + + [ Vladimir Petko ] + * d/{rules/control.in/test/control.in}: Replace dbus-x11 with dbus- + daemon dependency. Closes: #1117100. + * d/control: d/test/control: Regenerate. + * d/README.{Debian,source}: Update package readme files. + * d/rules: Use generic code to replace bundled jquery. + * d/JB-doc.overrides.in: Drop binary package bundled jquery + override. The override is not needed for the binary package. + * d/s/lintian-overrides: Update jquery override override comment. + * Update unstripped-binary-or-object override comments. + OpenJDK needs symbols for Native Memory Tracking. + + -- Vladimir Petko Sat, 20 Dec 2025 09:57:54 +1300 openjdk-25 (25.0.1+8-1) unstable; urgency=medium diff -Nru openjdk-25-25.0.1+8/debian/control openjdk-25-25.0.2+10/debian/control --- openjdk-25-25.0.1+8/debian/control 2025-10-23 10:25:46.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/control 2026-01-31 22:40:44.000000000 +0000 @@ -7,7 +7,7 @@ m4, lsb-release, zip, unzip, sharutils, gawk, cpio, procps, wdiff, pkgconf, fastjar (>= 2:0.96-0ubuntu2), time, strip-nondeterminism, debugedit (>= 4.16), - jtreg7 (>= 7.5.1+1~) , libtestng7-java , xvfb , xauth , xfonts-base , libgl1-mesa-dri [!x32] , xfwm4 , x11-xkb-utils , dbus-x11 , libasmtools-java , xvfb , + jtreg8 (>= 8+2~) , libtestng7-java , xvfb , xauth , xfonts-base , libgl1-mesa-dri [!x32] , xfwm4 , x11-xkb-utils , dbus-daemon , libasmtools-java , xvfb , autoconf, automake, ant, ant-optional, g++-14 , openjdk-25-jdk-headless:native | openjdk-24-jdk-headless:native, @@ -24,7 +24,7 @@ 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 +Architecture: alpha amd64 arc armel armhf arm64 i386 loong64 mips64el powerpc ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 Multi-Arch: same Pre-Depends: ${dpkg:Depends} Depends: openjdk-25-jre-headless (= ${binary:Version}), @@ -36,7 +36,7 @@ applets, and components using the Java programming language. Package: openjdk-25-jre-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 +Architecture: alpha amd64 arc armel armhf arm64 i386 loong64 mips64el powerpc ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 Multi-Arch: same Pre-Depends: ${dpkg:Depends} Depends: ${jredefault:Depends}, ${cacert:Depends}, @@ -55,7 +55,7 @@ using ${vm:Name}. Package: openjdk-25-jdk -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 +Architecture: alpha amd64 arc armel armhf arm64 i386 loong64 mips64el powerpc ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 Multi-Arch: same Pre-Depends: ${dpkg:Depends} Depends: openjdk-25-jre (= ${binary:Version}), @@ -69,7 +69,7 @@ applets, and components using the Java programming language. Package: openjdk-25-jre -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 +Architecture: alpha amd64 arc armel armhf arm64 i386 loong64 mips64el powerpc ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 Multi-Arch: same Pre-Depends: ${dpkg:Depends} Depends: openjdk-25-jre-headless (= ${binary:Version}), @@ -82,7 +82,7 @@ programs, using ${vm:Name}. Package: openjdk-25-demo -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 +Architecture: alpha amd64 arc armel armhf arm64 i386 loong64 mips64el powerpc ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 Priority: optional Pre-Depends: ${dpkg:Depends} Depends: openjdk-25-jre (= ${binary:Version}), @@ -122,7 +122,7 @@ This package contains the API documentation. Package: openjdk-25-dbg -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 +Architecture: alpha amd64 arc armel armhf arm64 i386 loong64 mips64el powerpc ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 Multi-Arch: same Priority: optional Section: debug @@ -139,11 +139,11 @@ This package contains the debugging symbols. Package: openjdk-25-testsupport -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 +Architecture: alpha amd64 arc armel armhf arm64 i386 loong64 mips64el powerpc ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 Multi-Arch: same Depends: openjdk-25-jdk (= ${binary:Version}), - build-essential, xfwm4, xvfb, dbus-x11, libatk-wrapper-java, - libatk-wrapper-java-jni, jtreg7 (>= 7.5.1+1~), libtestng7-java, + build-essential, xfwm4, xvfb, dbus-daemon, libatk-wrapper-java, + libatk-wrapper-java-jni, jtreg8 (>= 8+2~), libtestng7-java, ${shlibs:Depends}, ${misc:Depends} Description: Java runtime based on OpenJDK (regression test support) diff -Nru openjdk-25-25.0.1+8/debian/control.in openjdk-25-25.0.2+10/debian/control.in --- openjdk-25-25.0.1+8/debian/control.in 2025-10-23 10:25:46.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/control.in 2026-01-31 22:40:35.000000000 +0000 @@ -142,7 +142,7 @@ Architecture: @any_archs@ Multi-Arch: same Depends: @basename@-jdk (= ${binary:Version}), - build-essential, xfwm4, xvfb, dbus-x11, libatk-wrapper-java, + build-essential, xfwm4, xvfb, dbus-daemon, libatk-wrapper-java, libatk-wrapper-java-jni, @jtreg_dep@, @testng_dep@, ${shlibs:Depends}, ${misc:Depends} diff -Nru openjdk-25-25.0.1+8/debian/patches/jdk-8359735.patch openjdk-25-25.0.2+10/debian/patches/jdk-8359735.patch --- openjdk-25-25.0.1+8/debian/patches/jdk-8359735.patch 2025-08-05 06:33:55.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/patches/jdk-8359735.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -Description: Process tests fail due to rust-coreutils - To accommodate systems like Ubuntu 25.10 that use Rust coreutils, - this PR updates tests that previously assumed busybox was the only - environment to use symlinks for core utilities. - - java/lang/ProcessBuilder/Basic.java: The test is updated to simply - verify that /bin/true and /bin/false are symlinks, - removing the hardcoded check for a /bin/busybox target. - - java/lang/ProcessHandle/InfoTest.java: The test logic is relaxed. - It now confirms that /bin/sleep is a symlink and then uses the - symlink's target as the expected executable name. -Author: Vladimir Petko -Origin: upstream, https://github.com/openjdk/jdk/pull/25838 -Bug: https://bugs.openjdk.org/browse/JDK-8359735 -Reviewed-by: Roger Riggs -Last-Update: 2025-06-19 ---- - ---- a/test/jdk/java/lang/ProcessBuilder/Basic.java -+++ b/test/jdk/java/lang/ProcessBuilder/Basic.java -@@ -696,7 +696,7 @@ - public static String path() { return path; } - private static final String path = path0(); - private static String path0(){ -- if (!Platform.isBusybox("/bin/true")) { -+ if (!Files.isSymbolicLink(Paths.get("/bin/true"))) { - return "/bin/true"; - } else { - File trueExe = new File("true"); -@@ -711,7 +711,7 @@ - public static String path() { return path; } - private static final String path = path0(); - private static String path0(){ -- if (!Platform.isBusybox("/bin/false")) { -+ if (!Files.isSymbolicLink(Paths.get("/bin/false"))) { - return "/bin/false"; - } else { - File falseExe = new File("false"); ---- a/test/jdk/java/lang/ProcessHandle/InfoTest.java -+++ b/test/jdk/java/lang/ProcessHandle/InfoTest.java -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 2014, 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 -@@ -295,10 +295,12 @@ - String expected = "sleep"; - if (Platform.isWindows()) { - expected = "sleep.exe"; -- } else if (Platform.isBusybox("/bin/sleep")) { -- // With busybox sleep is just a sym link to busybox. -- // The busbox executable is seen as ProcessHandle.Info command. -- expected = "busybox"; -+ } else if (Files.isSymbolicLink(Paths.get("/bin/sleep"))) { -+ // Busybox sleep is a symbolic link to /bin/busybox. -+ // Rust coreutils sleep is a symbolic link to coreutils -+ // The busbox/coreutils executables are seen as ProcessHandle.Info command. -+ Path executable = Files.readSymbolicLink(Paths.get("/bin/sleep")); -+ expected = executable.getFileName().toString(); - } - Assert.assertTrue(command.endsWith(expected), "Command: expected: \'" + - expected + "\', actual: " + command); diff -Nru openjdk-25-25.0.1+8/debian/patches/jdk-8369450-proposed.patch openjdk-25-25.0.2+10/debian/patches/jdk-8369450-proposed.patch --- openjdk-25-25.0.1+8/debian/patches/jdk-8369450-proposed.patch 2025-10-09 08:00:49.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/patches/jdk-8369450-proposed.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -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.0.1+8/debian/patches/jdk-8370049-proposed.patch openjdk-25-25.0.2+10/debian/patches/jdk-8370049-proposed.patch --- openjdk-25-25.0.1+8/debian/patches/jdk-8370049-proposed.patch 2025-10-21 09:33:09.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/patches/jdk-8370049-proposed.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,59 +0,0 @@ -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.0.1+8/debian/patches/power-opt.diff openjdk-25-25.0.2+10/debian/patches/power-opt.diff --- openjdk-25-25.0.1+8/debian/patches/power-opt.diff 2025-03-15 07:23:19.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/patches/power-opt.diff 2026-01-21 20:46:58.000000000 +0000 @@ -1,10 +1,10 @@ --- a/make/autoconf/flags-cflags.m4 +++ b/make/autoconf/flags-cflags.m4 -@@ -730,7 +730,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP], - elif test "x$FLAGS_CPU" = xppc64le; then - # Little endian machine uses ELFv2 ABI. - # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI. -- $1_CFLAGS_CPU="-mcpu=power8 -mtune=power10" +@@ -744,7 +744,7 @@ + POWER_TUNE_VERSION="-mtune=power8" + ] + ) +- $1_CFLAGS_CPU="-mcpu=power8 ${POWER_TUNE_VERSION}" + $1_CFLAGS_CPU="" $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2" fi diff -Nru openjdk-25-25.0.1+8/debian/patches/series openjdk-25-25.0.2+10/debian/patches/series --- openjdk-25-25.0.1+8/debian/patches/series 2025-10-21 09:33:09.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/patches/series 2026-01-21 20:46:58.000000000 +0000 @@ -41,6 +41,3 @@ #jdk-8347014-proposed.patch power-opt.diff test-empty-path.patch -jdk-8359735.patch -jdk-8369450-proposed.patch -jdk-8370049-proposed.patch diff -Nru openjdk-25-25.0.1+8/debian/rules openjdk-25-25.0.2+10/debian/rules --- openjdk-25-25.0.1+8/debian/rules 2025-10-22 10:19:10.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/rules 2026-01-21 20:46:58.000000000 +0000 @@ -173,16 +173,11 @@ NJOBS = $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) endif -ifneq (,$(filter $(distrel), bookworm bullseye)) - jtreg_pkg = jtreg# debian will have jtreg7 in jtreg package - testng_pkg = libtestng7-java -else - jtreg_pkg = jtreg7 - testng_pkg = libtestng7-java -endif +jtreg_pkg = jtreg8 +testng_pkg = libtestng7-java with_check = $(if $(findstring nocheck, $(DEB_BUILD_OPTIONS)),,yes) -ifneq (,$(filter $(DEB_HOST_ARCH), alpha arc armel hppa ia64 loong64 mipsel mips64el powerpc riscv64 x32)) +ifneq (,$(filter $(DEB_HOST_ARCH), alpha arc armel mipsel mips64el powerpc riscv64 x32)) with_check = disabled running check on $(DEB_HOST_ARCH) endif # no jtreg backport yet @@ -209,7 +204,7 @@ default_vm = $(if $(filter $(DEB_HOST_ARCH), $(hotspot_archs)),hotspot,zero) -any_archs = alpha amd64 arc armel armhf arm64 hppa i386 ia64 loong64 mips mipsel mips64 mips64el powerpc ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 +any_archs = alpha amd64 arc armel armhf arm64 i386 loong64 mips64el powerpc ppc64 ppc64el m68k riscv64 sh4 sparc sparc64 s390x x32 altzero_archs = $(hotspot_archs) ifneq (,$(filter $(distrel),trusty)) @@ -797,7 +792,7 @@ xvfb$(nocheck_profile), xauth$(nocheck_profile), \ xfonts-base$(nocheck_profile), libgl1-mesa-dri [!x32]$(nocheck_profile), \ xfwm4$(nocheck_profile), x11-xkb-utils$(nocheck_profile), \ - dbus-x11$(nocheck_profile), libasmtools-java$(nocheck_profile), \ + dbus-daemon$(nocheck_profile), libasmtools-java$(nocheck_profile), \ xvfb $(nocheck_profile), else bd_check = file, @@ -1967,11 +1962,28 @@ cp -a $$i $(d_doc)/usr/share/doc/$(p_jrehl)/; \ ln -sf ../$(p_jrehl)/$$b $(d_doc)/usr/share/doc/$(p_doc)/$$b; \ done - rm -v $(d_doc)/usr/share/doc/$(p_jrehl)/api/script-files/jquery-3.7.1.min.js - dh_link -p$(p_doc) \ - /usr/share/javascript/jquery/jquery.min.js \ - /usr/share/doc/$(p_jrehl)/api/script-files/jquery-3.7.1.min.js + # replace bundled scripts with symlinks + JAVADOC_DIR="$(d_doc)/usr/share/doc/$(p_jrehl)/api"; \ + RESOURCE_DIR="$$(find $${JAVADOC_DIR} -name jquery-ui.min.css -exec dirname {} \;)"; \ + if [ -d "$${RESOURCE_DIR}" ]; then \ + rm -f $${RESOURCE_DIR}/jquery-ui.min.css && \ + dh_link -p$(p_doc) /usr/share/javascript/jquery-ui/themes/base/jquery-ui.min.css \ + "$${RESOURCE_DIR#$(d_doc)}/jquery-ui.min.css"; \ + else \ + echo "jquery-ui css directory not found!"; \ + exit 1; \ + fi; \ + SCRIPT_DIR="$$(find $${JAVADOC_DIR} -name jquery-ui.min.js -exec dirname {} \;)"; \ + if [ -d "$${SCRIPT_DIR}" ]; then \ + rm "$${SCRIPT_DIR}"/jquery* && \ + dh_link -p$(p_doc) /usr/share/javascript/jquery/jquery.min.js "$${SCRIPT_DIR#$(d_doc)}/jquery.min.js" && \ + dh_link -p$(p_doc) /usr/share/javascript/jquery-ui/jquery-ui.min.js "$${SCRIPT_DIR#$(d_doc)}/jquery-ui.min.js"; \ + find $${JAVADOC_DIR} -name "*.html" -exec sed -i 's/jquery-[0-9.]*\.min\.js/jquery.min.js/g' {} +; \ + else \ + echo "jquery script directory not found!"; \ + exit 1; \ + fi endif # FIXME: desktop and menu files not ready for multiarch. #658321 ifeq (,$(DEB_HOST_MULTIARCH)) @@ -2071,7 +2083,7 @@ dh_builddeb -a $(nodemo) $(nojrez) #$(bd_options) git_project = jdk25u -git_tag = jdk-25.0.1+8 +git_tag = jdk-25.0.2+10 package_version = $(shell echo $(PKGVERSION) | sed 's/-[^-][^-]*$$//') ifneq ($(is_upstream_release),yes) package_version := $(subst +,~,$(package_version)) diff -Nru openjdk-25-25.0.1+8/debian/source/lintian-overrides openjdk-25-25.0.2+10/debian/source/lintian-overrides --- openjdk-25-25.0.1+8/debian/source/lintian-overrides 2025-09-27 10:40:54.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/source/lintian-overrides 2026-01-21 20:46:58.000000000 +0000 @@ -19,8 +19,9 @@ # false positive, jtreg tests contain example/ directories openjdk-25 source: package-does-not-install-examples -# chromium and firefox snaps are unable to load scripts from /usr/share/javascript -# LP: 2032992 +# upstream source tarball contains prebuilt javascript object +# that are replaced in d/rules with links to the Debian +# Javascript libraries openjdk-25 source: source-contains-prebuilt-javascript-object # false positive: nproc is called to print the number of processors diff -Nru openjdk-25-25.0.1+8/debian/tests/control openjdk-25-25.0.2+10/debian/tests/control --- openjdk-25-25.0.1+8/debian/tests/control 2025-10-23 10:25:46.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/tests/control 2026-01-21 20:46:58.000000000 +0000 @@ -7,15 +7,15 @@ Restrictions: allow-stderr, superficial 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 +Depends: @, jtreg8 (>= 8+2~), libtestng7-java, build-essential, bash, lsb-release, xfwm4, xvfb, xauth, dbus-daemon, 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 +Depends: @, jtreg8 (>= 8+2~), libtestng7-java, build-essential, bash, lsb-release, xfwm4, xvfb, xauth, dbus-daemon, 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 -Restrictions: allow-stderr, skippable, flaky +Depends: openjdk-25-jre-headless, build-essential, bash +Restrictions: allow-stderr diff -Nru openjdk-25-25.0.1+8/debian/tests/control.in openjdk-25-25.0.2+10/debian/tests/control.in --- openjdk-25-25.0.1+8/debian/tests/control.in 2025-10-17 07:17:07.000000000 +0000 +++ openjdk-25-25.0.2+10/debian/tests/control.in 2026-01-21 20:46:58.000000000 +0000 @@ -7,15 +7,15 @@ Restrictions: allow-stderr, superficial 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 +Depends: @, @jtreg_dep@, @testng_dep@, build-essential, bash, lsb-release, xfwm4, xvfb, xauth, dbus-daemon, 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 +Depends: @, @jtreg_dep@, @testng_dep@, build-essential, bash, lsb-release, xfwm4, xvfb, xauth, dbus-daemon, 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 -Restrictions: allow-stderr, skippable, flaky +Depends: @basename@-jre-headless, build-essential, bash +Restrictions: allow-stderr diff -Nru openjdk-25-25.0.1+8/make/StaticLibs.gmk openjdk-25-25.0.2+10/make/StaticLibs.gmk --- openjdk-25-25.0.1+8/make/StaticLibs.gmk 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/StaticLibs.gmk 2025-12-18 08:04:02.000000000 +0000 @@ -116,6 +116,9 @@ $(eval STATIC_LIB_EXPORT_FILES += $(lib).exp) \ ) STATIC_LIBS := -Wl,-bexpfull $(STATIC_LIB_FILES) $(addprefix -Wl$(COMMA)-bE:, $(STATIC_LIB_EXPORT_FILES)) + ifeq ($(DEBUG_LEVEL), slowdebug) + STATIC_LIBS += -Wl,-bbigtoc + endif else $(error Unsupported platform) endif diff -Nru openjdk-25-25.0.1+8/make/autoconf/basic_tools.m4 openjdk-25-25.0.2+10/make/autoconf/basic_tools.m4 --- openjdk-25-25.0.1+8/make/autoconf/basic_tools.m4 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/autoconf/basic_tools.m4 2025-12-18 08:04:02.000000000 +0000 @@ -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.0.1+8/make/autoconf/boot-jdk.m4 openjdk-25-25.0.2+10/make/autoconf/boot-jdk.m4 --- openjdk-25-25.0.1+8/make/autoconf/boot-jdk.m4 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/autoconf/boot-jdk.m4 2025-12-18 08:04:02.000000000 +0000 @@ -446,6 +446,9 @@ # Force en-US environment UTIL_ADD_JVM_ARG_IF_OK([-Duser.language=en -Duser.country=US],boot_jdk_jvmargs,[$JAVA]) + UTIL_ADD_JVM_ARG_IF_OK([-Xlog:all=off:stdout],boot_jdk_jvmargs,[$JAVA]) + UTIL_ADD_JVM_ARG_IF_OK([-Xlog:all=warning:stderr],boot_jdk_jvmargs,[$JAVA]) + if test "x$BOOTJDK_USE_LOCAL_CDS" = xtrue; then # Use our own CDS archive UTIL_ADD_JVM_ARG_IF_OK([$boot_jdk_cds_args -Xshare:auto],boot_jdk_jvmargs,[$JAVA]) diff -Nru openjdk-25-25.0.1+8/make/autoconf/configure.ac openjdk-25-25.0.2+10/make/autoconf/configure.ac --- openjdk-25-25.0.1+8/make/autoconf/configure.ac 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/autoconf/configure.ac 2025-12-18 08:04:02.000000000 +0000 @@ -221,6 +221,9 @@ # LeakSanitizer JDKOPT_SETUP_LEAK_SANITIZER +# Setup static analyzer +JDKOPT_SETUP_STATIC_ANALYZER + # Fallback linker # This needs to go before 'LIB_DETERMINE_DEPENDENCIES' JDKOPT_SETUP_FALLBACK_LINKER diff -Nru openjdk-25-25.0.1+8/make/autoconf/flags-cflags.m4 openjdk-25-25.0.2+10/make/autoconf/flags-cflags.m4 --- openjdk-25-25.0.1+8/make/autoconf/flags-cflags.m4 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/autoconf/flags-cflags.m4 2025-12-18 08:04:02.000000000 +0000 @@ -736,8 +736,15 @@ $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -mminimal-toc" elif test "x$FLAGS_CPU" = xppc64le; then # Little endian machine uses ELFv2 ABI. - # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI. - $1_CFLAGS_CPU="-mcpu=power8 -mtune=power10" + # Use Power8 for target cpu, this is the first CPU to support PPC64 LE with ELFv2 ABI. + # Use Power10 for tuning target, this is supported by gcc >= 10 + POWER_TUNE_VERSION="-mtune=power10" + FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${POWER_TUNE_VERSION}], + IF_FALSE: [ + POWER_TUNE_VERSION="-mtune=power8" + ] + ) + $1_CFLAGS_CPU="-mcpu=power8 ${POWER_TUNE_VERSION}" $1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2" fi elif test "x$FLAGS_CPU" = xs390x; then @@ -933,7 +940,7 @@ # ACLE and this flag are required to build the aarch64 SVE related functions in # libvectormath. Apple Silicon does not support SVE; use macOS as a proxy for # that check. - if test "x$OPENJDK_TARGET_CPU" = "xaarch64" && test "x$OPENJDK_TARGET_CPU" = "xlinux"; then + if test "x$OPENJDK_TARGET_CPU" = "xaarch64" && test "x$OPENJDK_TARGET_OS" = "xlinux"; then if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then AC_LANG_PUSH(C) OLD_CFLAGS="$CFLAGS" @@ -947,6 +954,17 @@ [ AC_MSG_RESULT([yes]) $2SVE_CFLAGS="-march=armv8-a+sve" + # Switching the initialization mode with gcc from 'pattern' to 'zero' + # avoids the use of unsupported `__builtin_clear_padding` for variable + # length aggregates + if test "x$DEBUG_LEVEL" != xrelease && test "x$TOOLCHAIN_TYPE" = xgcc ; then + INIT_ZERO_FLAG="-ftrivial-auto-var-init=zero" + FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$INIT_ZERO_FLAG], + IF_TRUE: [ + $2SVE_CFLAGS="${$2SVE_CFLAGS} $INIT_ZERO_FLAG" + ] + ) + fi ], [ AC_MSG_RESULT([no]) diff -Nru openjdk-25-25.0.1+8/make/autoconf/jdk-options.m4 openjdk-25-25.0.2+10/make/autoconf/jdk-options.m4 --- openjdk-25-25.0.1+8/make/autoconf/jdk-options.m4 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/autoconf/jdk-options.m4 2025-12-18 08:04:02.000000000 +0000 @@ -481,6 +481,31 @@ ################################################################################ # +# Static analyzer +# +AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_ANALYZER], +[ + UTIL_ARG_ENABLE(NAME: static-analyzer, DEFAULT: false, RESULT: STATIC_ANALYZER_ENABLED, + DESC: [enable the GCC static analyzer], + CHECK_AVAILABLE: [ + AC_MSG_CHECKING([if static analyzer is available]) + if test "x$TOOLCHAIN_TYPE" = "xgcc"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + AVAILABLE=false + fi + ], + IF_ENABLED: [ + STATIC_ANALYZER_CFLAGS="-fanalyzer -Wno-analyzer-fd-leak" + CFLAGS_JDKLIB="$CFLAGS_JDKLIB $STATIC_ANALYZER_CFLAGS" + CFLAGS_JDKEXE="$CFLAGS_JDKEXE $STATIC_ANALYZER_CFLAGS" + ]) + AC_SUBST(STATIC_ANALYZER_ENABLED) +]) + +################################################################################ +# # LeakSanitizer # AC_DEFUN_ONCE([JDKOPT_SETUP_LEAK_SANITIZER], diff -Nru openjdk-25-25.0.1+8/make/autoconf/lib-tests.m4 openjdk-25-25.0.2+10/make/autoconf/lib-tests.m4 --- openjdk-25-25.0.1+8/make/autoconf/lib-tests.m4 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/autoconf/lib-tests.m4 2025-12-18 08:04:02.000000000 +0000 @@ -28,7 +28,7 @@ ################################################################################ # Minimum supported versions -JTREG_MINIMUM_VERSION=7.5.1 +JTREG_MINIMUM_VERSION=8 GTEST_MINIMUM_VERSION=1.14.0 ################################################################################ diff -Nru openjdk-25-25.0.1+8/make/autoconf/libraries.m4 openjdk-25-25.0.2+10/make/autoconf/libraries.m4 --- openjdk-25-25.0.1+8/make/autoconf/libraries.m4 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/autoconf/libraries.m4 2025-12-18 08:04:02.000000000 +0000 @@ -136,12 +136,8 @@ BASIC_JVM_LIBS="$BASIC_JVM_LIBS $LIBPTHREAD" fi - # librt for legacy clock_gettime + # librt - for timers (timer_* functions) if test "x$OPENJDK_TARGET_OS" = xlinux; then - # Hotspot needs to link librt to get the clock_* functions. - # But once our supported minimum build and runtime platform - # has glibc 2.17, this can be removed as the functions are - # in libc. BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lrt" fi diff -Nru openjdk-25-25.0.1+8/make/conf/github-actions.conf openjdk-25-25.0.2+10/make/conf/github-actions.conf --- openjdk-25-25.0.1+8/make/conf/github-actions.conf 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/conf/github-actions.conf 2025-12-18 08:04:02.000000000 +0000 @@ -26,7 +26,7 @@ # Versions and download locations for dependencies used by GitHub Actions (GHA) GTEST_VERSION=1.14.0 -JTREG_VERSION=7.5.1+1 +JTREG_VERSION=8+2 LINUX_X64_BOOT_JDK_EXT=tar.gz LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk24/1f9ff9062db4449d8ca828c504ffae90/36/GPL/openjdk-24_linux-x64_bin.tar.gz diff -Nru openjdk-25-25.0.1+8/make/conf/jib-profiles.js openjdk-25-25.0.2+10/make/conf/jib-profiles.js --- openjdk-25-25.0.1+8/make/conf/jib-profiles.js 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/conf/jib-profiles.js 2025-12-18 08:04:02.000000000 +0000 @@ -1174,9 +1174,9 @@ jtreg: { server: "jpg", product: "jtreg", - version: "7.5.1", - build_number: "1", - file: "bundles/jtreg-7.5.1+1.zip", + version: "8", + build_number: "2", + file: "bundles/jtreg-8+2.zip", environment_name: "JT_HOME", environment_path: input.get("jtreg", "home_path") + "/bin", configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"), diff -Nru openjdk-25-25.0.1+8/make/conf/version-numbers.conf openjdk-25-25.0.2+10/make/conf/version-numbers.conf --- openjdk-25-25.0.1+8/make/conf/version-numbers.conf 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/conf/version-numbers.conf 2025-12-18 08:04:02.000000000 +0000 @@ -28,12 +28,12 @@ DEFAULT_VERSION_FEATURE=25 DEFAULT_VERSION_INTERIM=0 -DEFAULT_VERSION_UPDATE=1 +DEFAULT_VERSION_UPDATE=2 DEFAULT_VERSION_PATCH=0 DEFAULT_VERSION_EXTRA1=0 DEFAULT_VERSION_EXTRA2=0 DEFAULT_VERSION_EXTRA3=0 -DEFAULT_VERSION_DATE=2025-10-21 +DEFAULT_VERSION_DATE=2026-01-20 DEFAULT_VERSION_CLASSFILE_MAJOR=69 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" DEFAULT_VERSION_CLASSFILE_MINOR=0 DEFAULT_VERSION_DOCS_API_SINCE=11 diff -Nru openjdk-25-25.0.1+8/make/data/ubsan/ubsan_default_options.c openjdk-25-25.0.2+10/make/data/ubsan/ubsan_default_options.c --- openjdk-25-25.0.1+8/make/data/ubsan/ubsan_default_options.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/data/ubsan/ubsan_default_options.c 2025-12-18 08:04:02.000000000 +0000 @@ -62,5 +62,8 @@ // thread so it is easier to track down. You can override these options by setting the environment // variable UBSAN_OPTIONS. ATTRIBUTE_DEFAULT_VISIBILITY ATTRIBUTE_USED const char* __ubsan_default_options() { - return "halt_on_error=1,print_stacktrace=1" _LLVM_SYMBOLIZER(LLVM_SYMBOLIZER); + return "halt_on_error=1," + "handle_segv=0," + "handle_sigbus=0," + "print_stacktrace=1" _LLVM_SYMBOLIZER(LLVM_SYMBOLIZER); } diff -Nru openjdk-25-25.0.1+8/make/ide/vscode/hotspot/CreateVSCodeProject.gmk openjdk-25-25.0.2+10/make/ide/vscode/hotspot/CreateVSCodeProject.gmk --- openjdk-25-25.0.1+8/make/ide/vscode/hotspot/CreateVSCodeProject.gmk 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/ide/vscode/hotspot/CreateVSCodeProject.gmk 2025-12-18 08:04:02.000000000 +0000 @@ -84,6 +84,8 @@ $(SED) -e 's!{{TOPDIR}}!$(call SedEscape,$(call FixPath,$(TOPDIR)))!g' \ -e 's!{{TOPDIR_RELATIVE}}!$(call SedEscape,$(call FixPath,$(strip \ $(call RelativePath,$(OUTPUTDIR),$(TOPDIR)))))!g' \ + -e 's!{{TOPDIR_BASE}}!$(notdir $(TOPDIR))!g' \ + -e 's!{{OUTPUT_BASE}}!$(notdir $(OUTPUTDIR))!g' \ -e 's!{{WORKSPACE_ROOT}}!$(call SedEscape,$(call FixPath,$(WORKSPACE_ROOT)))!g' \ -e 's!{{OUTPUTDIR}}!$(call SedEscape,$(call FixPath,$(OUTPUTDIR)))!g' \ -e 's!{{CONF_NAME}}!$(CONF_NAME)!g' \ diff -Nru openjdk-25-25.0.1+8/make/ide/vscode/hotspot/template-workspace.jsonc openjdk-25-25.0.2+10/make/ide/vscode/hotspot/template-workspace.jsonc --- openjdk-25-25.0.1+8/make/ide/vscode/hotspot/template-workspace.jsonc 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/ide/vscode/hotspot/template-workspace.jsonc 2025-12-18 08:04:02.000000000 +0000 @@ -1,12 +1,12 @@ { "folders": [ { - "name": "Source root", + "name": "Source root ({{TOPDIR_BASE}})", "path": "{{TOPDIR}}" }, // {{EXTRA_WORKSPACE_ROOT}} { - "name": "Build artifacts", + "name": "Build artifacts ({{OUTPUT_BASE}})", "path": "{{OUTPUTDIR}}" } ], diff -Nru openjdk-25-25.0.1+8/make/modules/java.desktop/lib/ClientLibraries.gmk openjdk-25-25.0.2+10/make/modules/java.desktop/lib/ClientLibraries.gmk --- openjdk-25-25.0.1+8/make/modules/java.desktop/lib/ClientLibraries.gmk 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/modules/java.desktop/lib/ClientLibraries.gmk 2025-12-18 08:04:02.000000000 +0000 @@ -177,7 +177,8 @@ endif LIBSPLASHSCREEN_CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE \ - -DPNG_ARM_NEON_OPT=0 -DPNG_ARM_NEON_IMPLEMENTATION=0 + -DPNG_ARM_NEON_OPT=0 -DPNG_ARM_NEON_IMPLEMENTATION=0 \ + -DPNG_LOONGARCH_LSX_OPT=0 ifeq ($(call isTargetOs, linux)+$(call isTargetCpuArch, ppc), true+true) LIBSPLASHSCREEN_CFLAGS += -DPNG_POWERPC_VSX_OPT=0 diff -Nru openjdk-25-25.0.1+8/make/modules/jdk.jpackage/Lib.gmk openjdk-25-25.0.2+10/make/modules/jdk.jpackage/Lib.gmk --- openjdk-25-25.0.1+8/make/modules/jdk.jpackage/Lib.gmk 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/modules/jdk.jpackage/Lib.gmk 2025-12-18 08:04:02.000000000 +0000 @@ -68,7 +68,7 @@ -rpath @executable_path/../PlugIns/, \ LIBS_macosx := -framework Cocoa, \ LIBS_windows := msi.lib ole32.lib shell32.lib shlwapi.lib user32.lib, \ - LIBS_linux := $(LIBDL), \ + LIBS_linux := $(LIBDL) $(LIBPTHREAD), \ MANIFEST := $(JAVA_MANIFEST), \ MANIFEST_VERSION := $(VERSION_NUMBER_FOUR_POSITIONS) \ )) @@ -97,7 +97,7 @@ DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \ DISABLED_WARNINGS_clang_tstrings.cpp := format-nonliteral, \ LD_SET_ORIGIN := false, \ - LIBS_linux := $(LIBDL), \ + LIBS_linux := $(LIBDL) $(LIBPTHREAD), \ )) TARGETS += $(BUILD_LIBJPACKAGEAPPLAUNCHERAUX) diff -Nru openjdk-25-25.0.1+8/make/test/JtregNativeJdk.gmk openjdk-25-25.0.2+10/make/test/JtregNativeJdk.gmk --- openjdk-25-25.0.1+8/make/test/JtregNativeJdk.gmk 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/make/test/JtregNativeJdk.gmk 2025-12-18 08:04:02.000000000 +0000 @@ -62,7 +62,8 @@ ifeq ($(call isTargetOs, windows), true) BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c \ libExplicitAttach.c libImplicitAttach.c \ - exelauncher.c + exelauncher.c \ + libChangeSignalDisposition.c exePrintSignalDisposition.c BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerTest := $(LIBCXX) BUILD_JDK_JTREG_EXECUTABLES_LIBS_exerevokeall := advapi32.lib @@ -137,6 +138,7 @@ OUTPUT_DIR := $(BUILD_JDK_JTREG_OUTPUT_DIR), \ EXCLUDE := $(BUILD_JDK_JTREG_EXCLUDE), \ EXTRA_FILES := $(BUILD_JDK_JTREG_EXTRA_FILES), \ + LIBS := $(LIBPTHREAD), \ )) endif diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/aarch64/aarch64.ad openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/aarch64.ad --- openjdk-25-25.0.1+8/src/hotspot/cpu/aarch64/aarch64.ad 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/aarch64.ad 2025-12-18 08:04:02.000000000 +0000 @@ -3454,10 +3454,6 @@ __ mov(dst_reg, (uint64_t)1); %} - enc_class aarch64_enc_mov_byte_map_base(iRegP dst, immByteMapBase src) %{ - __ load_byte_map_base($dst$$Register); - %} - enc_class aarch64_enc_mov_n(iRegN dst, immN src) %{ Register dst_reg = as_Register($dst$$reg); address con = (address)$src$$constant; @@ -4554,20 +4550,6 @@ interface(CONST_INTER); %} -// Card Table Byte Map Base -operand immByteMapBase() -%{ - // Get base of card map - predicate(BarrierSet::barrier_set()->is_a(BarrierSet::CardTableBarrierSet) && - SHENANDOAHGC_ONLY(!BarrierSet::barrier_set()->is_a(BarrierSet::ShenandoahBarrierSet) &&) - (CardTable::CardValue*)n->get_ptr() == ((CardTableBarrierSet*)(BarrierSet::barrier_set()))->card_table()->byte_map_base()); - match(ConP); - - op_cost(0); - format %{ %} - interface(CONST_INTER); -%} - // Float and Double operands // Double Immediate operand immD() @@ -6853,20 +6835,6 @@ ins_pipe(ialu_imm); %} - -// Load Byte Map Base Constant - -instruct loadByteMapBase(iRegPNoSp dst, immByteMapBase con) -%{ - match(Set dst con); - - ins_cost(INSN_COST); - format %{ "adr $dst, $con\t# Byte Map Base" %} - - ins_encode(aarch64_enc_mov_byte_map_base(dst, con)); - - ins_pipe(ialu_imm); -%} // Load Narrow Pointer Constant diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1824,3 +1824,14 @@ add(cache, cache, Array::base_offset_in_bytes()); lea(cache, Address(cache, index)); } + +#ifdef ASSERT +void InterpreterMacroAssembler::verify_field_offset(Register reg) { + // Verify the field offset is not in the header, implicitly checks for 0 + Label L; + subs(zr, reg, oopDesc::base_offset_in_bytes()); + br(Assembler::GE, L); + stop("bad field offset"); + bind(L); +} +#endif diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -319,6 +319,8 @@ void load_resolved_indy_entry(Register cache, Register index); void load_field_entry(Register cache, Register index, int bcp_offset = 1); void load_method_entry(Register cache, Register index, int bcp_offset = 1); + + void verify_field_offset(Register reg) NOT_DEBUG_RETURN; }; #endif // CPU_AARCH64_INTERP_MASM_AARCH64_HPP diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/aarch64/javaFrameAnchor_aarch64.hpp openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/javaFrameAnchor_aarch64.hpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/aarch64/javaFrameAnchor_aarch64.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/javaFrameAnchor_aarch64.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -39,24 +39,22 @@ // 3 - restoring an old state (javaCalls) void clear(void) { + // No hardware barriers are necessary. All members are volatile and the profiler + // is run from a signal handler and only observers the thread its running on. + // clearing _last_Java_sp must be first _last_Java_sp = nullptr; - OrderAccess::release(); _last_Java_fp = nullptr; _last_Java_pc = nullptr; } void copy(JavaFrameAnchor* src) { - // In order to make sure the transition state is valid for "this" + // No hardware barriers are necessary. All members are volatile and the profiler + // is run from a signal handler and only observers the thread its running on. + // We must clear _last_Java_sp before copying the rest of the new data - // - // Hack Alert: Temporary bugfix for 4717480/4721647 - // To act like previous version (pd_cache_state) don't null _last_Java_sp - // unless the value is changing - // if (_last_Java_sp != src->_last_Java_sp) { _last_Java_sp = nullptr; - OrderAccess::release(); } _last_Java_fp = src->_last_Java_fp; _last_Java_pc = src->_last_Java_pc; diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -639,12 +639,13 @@ last_java_sp = esp; } - str(last_java_sp, Address(rthread, JavaThread::last_Java_sp_offset())); - // last_java_fp is optional if (last_java_fp->is_valid()) { str(last_java_fp, Address(rthread, JavaThread::last_Java_fp_offset())); } + + // We must set sp last. + str(last_java_sp, Address(rthread, JavaThread::last_Java_sp_offset())); } void MacroAssembler::set_last_Java_frame(Register last_java_sp, diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/aarch64/templateTable_aarch64.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -168,6 +168,7 @@ Register temp_reg, bool load_bc_into_bc_reg/*=true*/, int byte_no) { + assert_different_registers(bc_reg, temp_reg); if (!RewriteBytecodes) return; Label L_patch_done; @@ -231,9 +232,12 @@ __ stop("patching the wrong bytecode"); __ bind(L_okay); #endif - - // patch bytecode - __ strb(bc_reg, at_bcp(0)); + // Patch bytecode with release store to coordinate with ResolvedFieldEntry loads + // in fast bytecode codelets. load_field_entry has a memory barrier that gains + // the needed ordering, together with control dependency on entering the fast codelet + // itself. + __ lea(temp_reg, at_bcp(0)); + __ stlrb(bc_reg, temp_reg); __ bind(L_patch_done); } @@ -3082,6 +3086,7 @@ // R1: field offset, R2: field holder, R5: flags load_resolved_field_entry(r2, r2, noreg, r1, r5); + __ verify_field_offset(r1); { Label notVolatile; @@ -3171,6 +3176,8 @@ __ load_field_entry(r2, r1); __ load_sized_value(r1, Address(r2, in_bytes(ResolvedFieldEntry::field_offset_offset())), sizeof(int), true /*is_signed*/); + __ verify_field_offset(r1); + __ load_unsigned_byte(r3, Address(r2, in_bytes(ResolvedFieldEntry::flags_offset()))); // r0: object @@ -3237,7 +3244,9 @@ __ ldr(r0, aaddress(0)); // access constant pool cache __ load_field_entry(r2, r3, 2); + __ load_sized_value(r1, Address(r2, in_bytes(ResolvedFieldEntry::field_offset_offset())), sizeof(int), true /*is_signed*/); + __ verify_field_offset(r1); // 8179954: We need to make sure that the code generated for // volatile accesses forms a sequentially-consistent set of diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/ppc/abstractInterpreter_ppc.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/abstractInterpreter_ppc.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/ppc/abstractInterpreter_ppc.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/abstractInterpreter_ppc.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -100,7 +100,7 @@ // It is also guaranteed to be walkable even though it is in a skeletal state // // is_top_frame == true: -// We're processing the *oldest* interpreter frame! +// We're processing the *youngest* interpreter frame on top of stack! // // pop_frame_extra_args: // If this is != 0 we are returning to a deoptimized frame by popping @@ -131,8 +131,9 @@ #ifdef ASSERT if (caller->is_interpreted_frame()) { assert(locals_base <= caller->interpreter_frame_expression_stack(), "bad placement"); - const int caller_abi_bytesize = (is_bottom_frame ? frame::top_ijava_frame_abi_size : frame::parent_ijava_frame_abi_size); - intptr_t* l2 = caller->sp() + method->max_locals() - 1 + (caller_abi_bytesize / Interpreter::stackElementSize); + // If the bottom frame's caller was thawed then it has frame::java_abi (aka parent_ijava_frame_abi). + // With an ordinary i2c call it would keep the larger frame::top_ijava_frame_abi + intptr_t* l2 = caller->sp() + method->max_locals() - 1 + (frame::parent_ijava_frame_abi_size / Interpreter::stackElementSize); assert(locals_base >= l2, "bad placement"); } #endif diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/ppc/interp_masm_ppc.hpp openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/interp_masm_ppc.hpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/ppc/interp_masm_ppc.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/interp_masm_ppc.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -133,8 +133,13 @@ void get_cache_index_at_bcp(Register Rdst, int bcp_offset, size_t index_size); void load_resolved_indy_entry(Register cache, Register index); - void load_field_entry(Register cache, Register index, int bcp_offset = 1); - void load_method_entry(Register cache, Register index, int bcp_offset = 1); + void load_field_or_method_entry(bool is_method, Register cache, Register index, int bcp_offset, bool for_fast_bytecode); + void load_field_entry(Register cache, Register index, int bcp_offset = 1, bool for_fast_bytecode = false) { + load_field_or_method_entry(false, cache, index, bcp_offset, for_fast_bytecode); + } + void load_method_entry(Register cache, Register index, int bcp_offset = 1, bool for_fast_bytecode = false) { + load_field_or_method_entry(true, cache, index, bcp_offset, for_fast_bytecode); + } void get_u4(Register Rdst, Register Rsrc, int offset, signedOrNot is_signed); diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -468,33 +468,33 @@ add(cache, cache, index); } -void InterpreterMacroAssembler::load_field_entry(Register cache, Register index, int bcp_offset) { +void InterpreterMacroAssembler::load_field_or_method_entry(bool is_method, Register cache, Register index, int bcp_offset, bool for_fast_bytecode) { + const int entry_size = is_method ? sizeof(ResolvedMethodEntry) : sizeof(ResolvedFieldEntry), + base_offset = is_method ? Array::base_offset_in_bytes() : Array::base_offset_in_bytes(), + entries_offset = is_method ? in_bytes(ConstantPoolCache::method_entries_offset()) : in_bytes(ConstantPoolCache::field_entries_offset()); + // Get index out of bytecode pointer get_cache_index_at_bcp(index, bcp_offset, sizeof(u2)); // Take shortcut if the size is a power of 2 - if (is_power_of_2(sizeof(ResolvedFieldEntry))) { + if (is_power_of_2(entry_size)) { // Scale index by power of 2 - sldi(index, index, log2i_exact(sizeof(ResolvedFieldEntry))); + sldi(index, index, log2i_exact(entry_size)); } else { // Scale the index to be the entry index * sizeof(ResolvedFieldEntry) - mulli(index, index, sizeof(ResolvedFieldEntry)); + mulli(index, index, entry_size); } // Get address of field entries array - ld_ptr(cache, in_bytes(ConstantPoolCache::field_entries_offset()), R27_constPoolCache); - addi(cache, cache, Array::base_offset_in_bytes()); + ld_ptr(cache, entries_offset, R27_constPoolCache); + addi(cache, cache, base_offset); add(cache, cache, index); -} -void InterpreterMacroAssembler::load_method_entry(Register cache, Register index, int bcp_offset) { - // Get index out of bytecode pointer - get_cache_index_at_bcp(index, bcp_offset, sizeof(u2)); - // Scale the index to be the entry index * sizeof(ResolvedMethodEntry) - mulli(index, index, sizeof(ResolvedMethodEntry)); - - // Get address of field entries array - ld_ptr(cache, ConstantPoolCache::method_entries_offset(), R27_constPoolCache); - addi(cache, cache, Array::base_offset_in_bytes()); - add(cache, cache, index); // method_entries + base_offset + scaled index + if (for_fast_bytecode) { + // Prevent speculative loading from ResolvedFieldEntry/ResolvedMethodEntry as it can miss the info written by another thread. + // TemplateTable::patch_bytecode uses release-store. + // We reached here via control dependency (Bytecode dispatch has used the rewritten Bytecode). + // So, we can use control-isync based ordering. + isync(); + } } // Load object from cpool->resolved_references(index). diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/templateTable_ppc_64.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -148,7 +148,9 @@ __ bind(L_fast_patch); } - // Patch bytecode. + // Patch bytecode with release store to coordinate with ResolvedFieldEntry + // and ResolvedMethodEntry loads in fast bytecode codelets. + __ release(); __ stb(Rnew_bc, 0, R14_bcp); __ bind(L_patch_done); @@ -312,6 +314,7 @@ // We are resolved if the resolved reference cache entry contains a // non-null object (CallSite, etc.) __ get_cache_index_at_bcp(R31, 1, index_size); // Load index. + // Only rewritten during link time. So, no need for memory barriers for accessing resolved info. __ load_resolved_reference_at_index(R17_tos, R31, R11_scratch1, R12_scratch2, &is_null); // Convert null sentinel to null @@ -3109,7 +3112,7 @@ const ConditionRegister CR_is_vol = CR2; // Non-volatile condition register (survives runtime call in do_oop_store). // Constant pool already resolved => Load flags and offset of field. - __ load_field_entry(Rcache, Rscratch); + __ load_field_entry(Rcache, Rscratch, 1, /* for_fast_bytecode */ true); jvmti_post_field_mod(Rcache, Rscratch, false /* not static */); load_resolved_field_entry(noreg, Rcache, noreg, Roffset, Rflags, false); // Uses R11, R12 @@ -3190,7 +3193,7 @@ // R12_scratch2 used by load_field_cp_cache_entry // Constant pool already resolved. Get the field offset. - __ load_field_entry(Rcache, Rscratch); + __ load_field_entry(Rcache, Rscratch, 1, /* for_fast_bytecode */ true); load_resolved_field_entry(noreg, Rcache, noreg, Roffset, Rflags, false); // Uses R11, R12 // JVMTI support @@ -3329,7 +3332,7 @@ __ ld(Rclass_or_obj, 0, R18_locals); // Constant pool already resolved. Get the field offset. - __ load_field_entry(Rcache, Rscratch, 2); + __ load_field_entry(Rcache, Rscratch, 2, /* for_fast_bytecode */ true); load_resolved_field_entry(noreg, Rcache, noreg, Roffset, Rflags, false); // Uses R11, R12 // JVMTI support not needed, since we switch back to single bytecode as soon as debugger attaches. @@ -3490,7 +3493,7 @@ assert(byte_no == f2_byte, "use this argument"); Register Rcache = R31; - __ load_method_entry(Rcache, R11_scratch1); + __ load_method_entry(Rcache, R11_scratch1, 1, /* for_fast_bytecode */ true); invokevfinal_helper(Rcache, R11_scratch1, R12_scratch2, R22_tmp2, R23_tmp3); } diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/ppc/vm_version_ppc.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/vm_version_ppc.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/ppc/vm_version_ppc.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/ppc/vm_version_ppc.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -97,6 +97,10 @@ FLAG_SET_ERGO(TrapBasedRangeChecks, false); } + if (FLAG_IS_DEFAULT(UsePopCountInstruction)) { + FLAG_SET_ERGO(UsePopCountInstruction, true); + } + if (PowerArchitecturePPC64 >= 9) { // Performance is good since Power9. if (FLAG_IS_DEFAULT(SuperwordUseVSX)) { diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/assembler_riscv.hpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/assembler_riscv.hpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/assembler_riscv.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/assembler_riscv.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -912,6 +912,43 @@ emit(insn); } + public: + + static uint32_t encode_csrrw(Register Rd, const uint32_t csr, Register Rs1) { + guarantee(is_uimm12(csr), "csr is invalid"); + uint32_t insn = 0; + patch((address)&insn, 6, 0, 0b1110011); + patch((address)&insn, 14, 12, 0b001); + patch_reg((address)&insn, 7, Rd); + patch_reg((address)&insn, 15, Rs1); + patch((address)&insn, 31, 20, csr); + return insn; + } + + static uint32_t encode_jal(Register Rd, const int32_t offset) { + guarantee(is_simm21(offset) && ((offset % 2) == 0), "offset is invalid."); + uint32_t insn = 0; + patch((address)&insn, 6, 0, 0b1101111); + patch_reg((address)&insn, 7, Rd); + patch((address)&insn, 19, 12, (uint32_t)((offset >> 12) & 0xff)); + patch((address)&insn, 20, (uint32_t)((offset >> 11) & 0x1)); + patch((address)&insn, 30, 21, (uint32_t)((offset >> 1) & 0x3ff)); + patch((address)&insn, 31, (uint32_t)((offset >> 20) & 0x1)); + return insn; + } + + static uint32_t encode_jalr(Register Rd, Register Rs, const int32_t offset) { + guarantee(is_simm12(offset), "offset is invalid."); + uint32_t insn = 0; + patch((address)&insn, 6, 0, 0b1100111); + patch_reg((address)&insn, 7, Rd); + patch((address)&insn, 14, 12, 0b000); + patch_reg((address)&insn, 15, Rs); + int32_t val = offset & 0xfff; + patch((address)&insn, 31, 20, val); + return insn; + } + protected: enum barrier { @@ -1988,6 +2025,7 @@ // Vector Narrowing Integer Right Shift Instructions INSN(vnsra_wi, 0b1010111, 0b011, 0b101101); + INSN(vnsrl_wi, 0b1010111, 0b011, 0b101100); #undef INSN @@ -3666,19 +3704,15 @@ // -------------------------- // Upper Immediate Instruction // -------------------------- -#define INSN(NAME) \ - void NAME(Register Rd, int32_t imm) { \ - /* lui -> c.lui */ \ - if (do_compress() && (Rd != x0 && Rd != x2 && imm != 0 && is_simm18(imm))) { \ - c_lui(Rd, imm); \ - return; \ - } \ - _lui(Rd, imm); \ + void lui(Register Rd, int32_t imm) { + /* lui -> c.lui */ + if (do_compress() && (Rd != x0 && Rd != x2 && imm != 0 && is_simm18(imm))) { + c_lui(Rd, imm); + return; + } + _lui(Rd, imm); } - INSN(lui); - -#undef INSN // Cache Management Operations // These instruction may be turned off for user space. diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -401,7 +401,7 @@ code_stub->set_safepoint_offset(__ offset()); __ relocate(relocInfo::poll_return_type); - __ safepoint_poll(*code_stub->entry(), true /* at_return */, false /* acquire */, true /* in_nmethod */); + __ safepoint_poll(*code_stub->entry(), true /* at_return */, true /* in_nmethod */); __ ret(); } @@ -1354,6 +1354,7 @@ } void LIR_Assembler::call(LIR_OpJavaCall* op, relocInfo::relocType rtype) { + Assembler::IncompressibleScope scope(_masm); address call = __ reloc_call(Address(op->addr(), rtype)); if (call == nullptr) { bailout("reloc call address stub overflow"); @@ -1364,6 +1365,7 @@ } void LIR_Assembler::ic_call(LIR_OpJavaCall* op) { + Assembler::IncompressibleScope scope(_masm); address call = __ ic_call(op->addr()); if (call == nullptr) { bailout("reloc call address stub overflow"); @@ -1856,6 +1858,10 @@ void LIR_Assembler::rt_call(LIR_Opr result, address dest, const LIR_OprList* args, LIR_Opr tmp, CodeEmitInfo* info) { assert(!tmp->is_valid(), "don't need temporary"); + Assembler::IncompressibleScope scope(_masm); + // Post call nops must be natural aligned due to cmodx rules. + align_call(lir_rtcall); + __ rt_call(dest); if (info != nullptr) { diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/c1_LIRGenerator_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -772,7 +772,7 @@ ciArrayKlass* expected_type = nullptr; arraycopy_helper(x, &flags, &expected_type); if (x->check_flag(Instruction::OmitChecksFlag)) { - flags = 0; + flags = (flags & LIR_OpArrayCopy::get_initial_copy_flags()); } __ arraycopy(src.result(), src_pos.result(), dst.result(), dst_pos.result(), length.result(), tmp, diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1952,16 +1952,15 @@ mv(pow31_3, 29791); // [31^^3] mv(pow31_2, 961); // [31^^2] - slli(chunks_end, chunks, chunks_end_shift); - add(chunks_end, ary, chunks_end); + shadd(chunks_end, chunks, ary, t0, chunks_end_shift); andi(cnt, cnt, stride - 1); // don't forget about tail! bind(WIDE_LOOP); - mulw(result, result, pow31_4); // 31^^4 * h arrays_hashcode_elload(t0, Address(ary, 0 * elsize), eltype); arrays_hashcode_elload(t1, Address(ary, 1 * elsize), eltype); arrays_hashcode_elload(tmp5, Address(ary, 2 * elsize), eltype); arrays_hashcode_elload(tmp6, Address(ary, 3 * elsize), eltype); + mulw(result, result, pow31_4); // 31^^4 * h mulw(t0, t0, pow31_3); // 31^^3 * ary[i+0] addw(result, result, t0); mulw(t1, t1, pow31_2); // 31^^2 * ary[i+1] @@ -1976,8 +1975,7 @@ beqz(cnt, DONE); bind(TAIL); - slli(chunks_end, cnt, chunks_end_shift); - add(chunks_end, ary, chunks_end); + shadd(chunks_end, cnt, ary, t0, chunks_end_shift); bind(TAIL_LOOP); arrays_hashcode_elload(t0, Address(ary), eltype); @@ -2393,18 +2391,7 @@ Register tmp = stub.data<2>(); __ bind(stub.entry()); - __ fmv_x_w(dst, src); - - // preserve the payloads of non-canonical NaNs. - __ srai(dst, dst, 13); - // preserve the sign bit. - __ srai(tmp, dst, 13); - __ slli(tmp, tmp, 10); - __ mv(t0, 0x3ff); - __ orr(tmp, tmp, t0); - - // get the result by merging sign bit and payloads of preserved non-canonical NaNs. - __ andr(dst, dst, tmp); + __ float_to_float16_NaN(dst, src, t0, tmp); __ j(stub.continuation()); #undef __ @@ -2412,7 +2399,7 @@ // j.l.Float.floatToFloat16 void C2_MacroAssembler::float_to_float16(Register dst, FloatRegister src, FloatRegister ftmp, Register xtmp) { - auto stub = C2CodeStub::make(dst, src, xtmp, 130, float_to_float16_slow_path); + auto stub = C2CodeStub::make(dst, src, xtmp, 64, float_to_float16_slow_path); // On riscv, NaN needs a special process as fcvt does not work in that case. @@ -2491,41 +2478,80 @@ #define __ masm. VectorRegister dst = stub.data<0>(); VectorRegister src = stub.data<1>(); - VectorRegister tmp = stub.data<2>(); + VectorRegister vtmp = stub.data<2>(); + assert_different_registers(dst, src, vtmp); + __ bind(stub.entry()); + // Active elements (NaNs) are marked in v0 mask register. // mul is already set to mf2 in float_to_float16_v. - // preserve the payloads of non-canonical NaNs. - __ vnsra_wi(dst, src, 13, Assembler::v0_t); - - // preserve the sign bit. - __ vnsra_wi(tmp, src, 26, Assembler::v0_t); - __ vsll_vi(tmp, tmp, 10, Assembler::v0_t); - __ mv(t0, 0x3ff); - __ vor_vx(tmp, tmp, t0, Assembler::v0_t); - - // get the result by merging sign bit and payloads of preserved non-canonical NaNs. - __ vand_vv(dst, dst, tmp, Assembler::v0_t); + // Float (32 bits) + // Bit: 31 30 to 23 22 to 0 + // +---+------------------+-----------------------------+ + // | S | Exponent | Mantissa (Fraction) | + // +---+------------------+-----------------------------+ + // 1 bit 8 bits 23 bits + // + // Float (16 bits) + // Bit: 15 14 to 10 9 to 0 + // +---+----------------+------------------+ + // | S | Exponent | Mantissa | + // +---+----------------+------------------+ + // 1 bit 5 bits 10 bits + const int fp_sign_bits = 1; + const int fp32_bits = 32; + const int fp32_mantissa_2nd_part_bits = 9; + const int fp32_mantissa_3rd_part_bits = 4; + const int fp16_exponent_bits = 5; + const int fp16_mantissa_bits = 10; + + // preserve the sign bit and exponent, clear mantissa. + __ vnsra_wi(dst, src, fp32_bits - fp_sign_bits - fp16_exponent_bits, Assembler::v0_t); + __ vsll_vi(dst, dst, fp16_mantissa_bits, Assembler::v0_t); + + // Preserve high order bit of float NaN in the + // binary16 result NaN (tenth bit); OR in remaining + // bits into lower 9 bits of binary 16 significand. + // | (doppel & 0x007f_e000) >> 13 // 10 bits + // | (doppel & 0x0000_1ff0) >> 4 // 9 bits + // | (doppel & 0x0000_000f)); // 4 bits + // + // Check j.l.Float.floatToFloat16 for more information. + // 10 bits + __ vnsrl_wi(vtmp, src, fp32_mantissa_2nd_part_bits + fp32_mantissa_3rd_part_bits, Assembler::v0_t); + __ mv(t0, 0x3ff); // retain first part of mantissa in a float 32 + __ vand_vx(vtmp, vtmp, t0, Assembler::v0_t); + __ vor_vv(dst, dst, vtmp, Assembler::v0_t); + // 9 bits + __ vnsrl_wi(vtmp, src, fp32_mantissa_3rd_part_bits, Assembler::v0_t); + __ mv(t0, 0x1ff); // retain second part of mantissa in a float 32 + __ vand_vx(vtmp, vtmp, t0, Assembler::v0_t); + __ vor_vv(dst, dst, vtmp, Assembler::v0_t); + // 4 bits + // Narrow shift is necessary to move data from 32 bits element to 16 bits element in vector register. + __ vnsrl_wi(vtmp, src, 0, Assembler::v0_t); + __ vand_vi(vtmp, vtmp, 0xf, Assembler::v0_t); + __ vor_vv(dst, dst, vtmp, Assembler::v0_t); __ j(stub.continuation()); #undef __ } // j.l.Float.float16ToFloat -void C2_MacroAssembler::float_to_float16_v(VectorRegister dst, VectorRegister src, VectorRegister vtmp, - Register tmp, uint vector_length) { +void C2_MacroAssembler::float_to_float16_v(VectorRegister dst, VectorRegister src, + VectorRegister vtmp, Register tmp, uint vector_length) { assert_different_registers(dst, src, vtmp); auto stub = C2CodeStub::make - (dst, src, vtmp, 28, float_to_float16_v_slow_path); + (dst, src, vtmp, 56, float_to_float16_v_slow_path); // On riscv, NaN needs a special process as vfncvt_f_f_w does not work in that case. vsetvli_helper(BasicType::T_FLOAT, vector_length, Assembler::m1); // check whether there is a NaN. - // replace v_fclass with vmseq_vv as performance optimization. + // replace v_fclass with vmfne_vv as performance optimization. vmfne_vv(v0, src, src); vcpop_m(t0, v0); diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/downcallLinker_riscv.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/downcallLinker_riscv.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/downcallLinker_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/downcallLinker_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -287,7 +287,7 @@ __ membar(MacroAssembler::AnyAny); } - __ safepoint_poll(L_safepoint_poll_slow_path, true /* at_return */, true /* acquire */, false /* in_nmethod */); + __ safepoint_poll(L_safepoint_poll_slow_path, true /* at_return */, false /* in_nmethod */); __ lwu(t0, Address(xthread, JavaThread::suspend_flags_offset())); __ bnez(t0, L_safepoint_poll_slow_path); diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/interp_masm_riscv.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/interp_masm_riscv.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/interp_masm_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/interp_masm_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -645,7 +645,7 @@ // the stack, will call InterpreterRuntime::at_unwind. Label slow_path; Label fast_path; - safepoint_poll(slow_path, true /* at_return */, false /* acquire */, false /* in_nmethod */); + safepoint_poll(slow_path, true /* at_return */, false /* in_nmethod */); j(fast_path); bind(slow_path); @@ -1937,6 +1937,15 @@ } #ifdef ASSERT +void InterpreterMacroAssembler::verify_field_offset(Register reg) { + // Verify the field offset is not in the header, implicitly checks for 0 + Label L; + mv(t0, oopDesc::base_offset_in_bytes()); + bge(reg, t0, L); + stop("bad field offset"); + bind(L); +} + void InterpreterMacroAssembler::verify_access_flags(Register access_flags, uint32_t flag, const char* msg, bool stop_by_hit) { Label L; diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/interp_masm_riscv.hpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/interp_masm_riscv.hpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/interp_masm_riscv.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/interp_masm_riscv.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -300,6 +300,8 @@ void load_field_entry(Register cache, Register index, int bcp_offset = 1); void load_method_entry(Register cache, Register index, int bcp_offset = 1); + void verify_field_offset(Register reg) NOT_DEBUG_RETURN; + #ifdef ASSERT void verify_access_flags(Register access_flags, uint32_t flag, const char* msg, bool stop_by_hit = true); diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/javaFrameAnchor_riscv.hpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/javaFrameAnchor_riscv.hpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/javaFrameAnchor_riscv.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/javaFrameAnchor_riscv.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -39,25 +39,23 @@ // 3 - restoring an old state (javaCalls) void clear(void) { + // No hardware barriers are necessary. All members are volatile and the profiler + // is run from a signal handler and the only observer is the thread its running on. + // clearing _last_Java_sp must be first _last_Java_sp = nullptr; - OrderAccess::release(); _last_Java_fp = nullptr; _last_Java_pc = nullptr; } void copy(JavaFrameAnchor* src) { - // In order to make sure the transition state is valid for "this" + // No hardware barriers are necessary. All members are volatile and the profiler + // is run from a signal handler and the only observer is the thread its running on. + // We must clear _last_Java_sp before copying the rest of the new data - // - // Hack Alert: Temporary bugfix for 4717480/4721647 - // To act like previous version (pd_cache_state) don't null _last_Java_sp - // unless the value is changing - // assert(src != nullptr, "Src should not be null."); if (_last_Java_sp != src->_last_Java_sp) { _last_Java_sp = nullptr; - OrderAccess::release(); } _last_Java_fp = src->_last_Java_fp; _last_Java_pc = src->_last_Java_pc; diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -97,52 +97,52 @@ // auipc + load // auipc + fload_load return (is_auipc_at(instr)) && - (is_addi_at(instr + instruction_size) || - is_jalr_at(instr + instruction_size) || - is_load_at(instr + instruction_size) || - is_float_load_at(instr + instruction_size)) && + (is_addi_at(instr + MacroAssembler::instruction_size) || + is_jalr_at(instr + MacroAssembler::instruction_size) || + is_load_at(instr + MacroAssembler::instruction_size) || + is_float_load_at(instr + MacroAssembler::instruction_size)) && check_pc_relative_data_dependency(instr); } // ie:ld(Rd, Label) bool MacroAssembler::is_load_pc_relative_at(address instr) { return is_auipc_at(instr) && // auipc - is_ld_at(instr + instruction_size) && // ld + is_ld_at(instr + MacroAssembler::instruction_size) && // ld check_load_pc_relative_data_dependency(instr); } bool MacroAssembler::is_movptr1_at(address instr) { return is_lui_at(instr) && // Lui - is_addi_at(instr + instruction_size) && // Addi - is_slli_shift_at(instr + instruction_size * 2, 11) && // Slli Rd, Rs, 11 - is_addi_at(instr + instruction_size * 3) && // Addi - is_slli_shift_at(instr + instruction_size * 4, 6) && // Slli Rd, Rs, 6 - (is_addi_at(instr + instruction_size * 5) || - is_jalr_at(instr + instruction_size * 5) || - is_load_at(instr + instruction_size * 5)) && // Addi/Jalr/Load + is_addi_at(instr + MacroAssembler::instruction_size) && // Addi + is_slli_shift_at(instr + MacroAssembler::instruction_size * 2, 11) && // Slli Rd, Rs, 11 + is_addi_at(instr + MacroAssembler::instruction_size * 3) && // Addi + is_slli_shift_at(instr + MacroAssembler::instruction_size * 4, 6) && // Slli Rd, Rs, 6 + (is_addi_at(instr + MacroAssembler::instruction_size * 5) || + is_jalr_at(instr + MacroAssembler::instruction_size * 5) || + is_load_at(instr + MacroAssembler::instruction_size * 5)) && // Addi/Jalr/Load check_movptr1_data_dependency(instr); } bool MacroAssembler::is_movptr2_at(address instr) { return is_lui_at(instr) && // lui - is_lui_at(instr + instruction_size) && // lui - is_slli_shift_at(instr + instruction_size * 2, 18) && // slli Rd, Rs, 18 - is_add_at(instr + instruction_size * 3) && - (is_addi_at(instr + instruction_size * 4) || - is_jalr_at(instr + instruction_size * 4) || - is_load_at(instr + instruction_size * 4)) && // Addi/Jalr/Load + is_lui_at(instr + MacroAssembler::instruction_size) && // lui + is_slli_shift_at(instr + MacroAssembler::instruction_size * 2, 18) && // slli Rd, Rs, 18 + is_add_at(instr + MacroAssembler::instruction_size * 3) && + (is_addi_at(instr + MacroAssembler::instruction_size * 4) || + is_jalr_at(instr + MacroAssembler::instruction_size * 4) || + is_load_at(instr + MacroAssembler::instruction_size * 4)) && // Addi/Jalr/Load check_movptr2_data_dependency(instr); } bool MacroAssembler::is_li16u_at(address instr) { return is_lui_at(instr) && // lui - is_srli_at(instr + instruction_size) && // srli + is_srli_at(instr + MacroAssembler::instruction_size) && // srli check_li16u_data_dependency(instr); } bool MacroAssembler::is_li32_at(address instr) { return is_lui_at(instr) && // lui - is_addiw_at(instr + instruction_size) && // addiw + is_addiw_at(instr + MacroAssembler::instruction_size) && // addiw check_li32_data_dependency(instr); } @@ -355,14 +355,15 @@ } void MacroAssembler::post_call_nop() { + assert(!in_compressible_scope(), "Must be"); + assert_alignment(pc()); if (!Continuations::enabled()) { return; } - relocate(post_call_nop_Relocation::spec(), [&] { - InlineSkippedInstructionsCounter skipCounter(this); - nop(); - li32(zr, 0); - }); + relocate(post_call_nop_Relocation::spec()); + InlineSkippedInstructionsCounter skipCounter(this); + nop(); + li32(zr, 0); } // these are no-ops overridden by InterpreterMacroAssembler @@ -389,12 +390,14 @@ last_java_sp = esp; } - sd(last_java_sp, Address(xthread, JavaThread::last_Java_sp_offset())); - // last_java_fp is optional if (last_java_fp->is_valid()) { sd(last_java_fp, Address(xthread, JavaThread::last_Java_fp_offset())); } + + // We must set sp last. + sd(last_java_sp, Address(xthread, JavaThread::last_Java_sp_offset())); + } void MacroAssembler::set_last_Java_frame(Register last_java_sp, @@ -3402,6 +3405,8 @@ void MacroAssembler::decode_klass_not_null(Register dst, Register src, Register tmp) { assert(UseCompressedClassPointers, "should only be used for compressed headers"); + assert_different_registers(dst, tmp); + assert_different_registers(src, tmp); if (CompressedKlassPointers::base() == nullptr) { if (CompressedKlassPointers::shift() != 0) { @@ -3412,18 +3417,13 @@ return; } - Register xbase = dst; - if (dst == src) { - xbase = tmp; - } + Register xbase = tmp; - assert_different_registers(src, xbase); mv(xbase, (uintptr_t)CompressedKlassPointers::base()); if (CompressedKlassPointers::shift() != 0) { - Register t = src == dst ? dst : t0; - assert_different_registers(t, xbase); - shadd(dst, src, xbase, t, CompressedKlassPointers::shift()); + // dst = (src << shift) + xbase + shadd(dst, src, xbase, dst /* temporary, dst != xbase */, CompressedKlassPointers::shift()); } else { add(dst, xbase, src); } @@ -3773,11 +3773,8 @@ bind(L_failure); } -void MacroAssembler::safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod, Register tmp_reg) { +void MacroAssembler::safepoint_poll(Label& slow_path, bool at_return, bool in_nmethod, Register tmp_reg) { ld(tmp_reg, Address(xthread, JavaThread::polling_word_offset())); - if (acquire) { - membar(MacroAssembler::LoadLoad | MacroAssembler::LoadStore); - } if (at_return) { bgtu(in_nmethod ? sp : fp, tmp_reg, slow_path, /* is_far */ true); } else { @@ -5019,7 +5016,7 @@ address MacroAssembler::ic_call(address entry, jint method_index) { RelocationHolder rh = virtual_call_Relocation::spec(pc(), method_index); - IncompressibleScope scope(this); // relocations + assert(!in_compressible_scope(), "Must be"); movptr(t0, (address)Universe::non_oop_word(), t1); assert_cond(entry != nullptr); return reloc_call(Address(entry, rh)); @@ -5113,7 +5110,7 @@ int MacroAssembler::max_reloc_call_address_stub_size() { // Max stub size: alignment nop, target address. - return 1 * instruction_size + wordSize; + return 1 * MacroAssembler::instruction_size + wordSize; } int MacroAssembler::static_call_stub_size() { @@ -5877,13 +5874,14 @@ // in cnt. // // NOTE: This is intended to be used in the zero_blocks() stub. If -// you want to use it elsewhere, note that cnt must be >= CacheLineSize. +// you want to use it elsewhere, note that cnt must be >= zicboz_block_size. void MacroAssembler::zero_dcache_blocks(Register base, Register cnt, Register tmp1, Register tmp2) { + int zicboz_block_size = VM_Version::zicboz_block_size.value(); Label initial_table_end, loop; // Align base with cache line size. neg(tmp1, base); - andi(tmp1, tmp1, CacheLineSize - 1); + andi(tmp1, tmp1, zicboz_block_size - 1); // tmp1: the number of bytes to be filled to align the base with cache line size. add(base, base, tmp1); @@ -5893,16 +5891,16 @@ la(tmp1, initial_table_end); sub(tmp2, tmp1, tmp2); jr(tmp2); - for (int i = -CacheLineSize + wordSize; i < 0; i += wordSize) { + for (int i = -zicboz_block_size + wordSize; i < 0; i += wordSize) { sd(zr, Address(base, i)); } bind(initial_table_end); - mv(tmp1, CacheLineSize / wordSize); + mv(tmp1, zicboz_block_size / wordSize); bind(loop); cbo_zero(base); sub(cnt, cnt, tmp1); - addi(base, base, CacheLineSize); + addi(base, base, zicboz_block_size); bge(cnt, tmp1, loop); } @@ -5957,6 +5955,62 @@ bind(done); } +// Helper routine processing the slow path of NaN when converting float to float16 +void MacroAssembler::float_to_float16_NaN(Register dst, FloatRegister src, + Register tmp1, Register tmp2) { + fmv_x_w(dst, src); + + // Float (32 bits) + // Bit: 31 30 to 23 22 to 0 + // +---+------------------+-----------------------------+ + // | S | Exponent | Mantissa (Fraction) | + // +---+------------------+-----------------------------+ + // 1 bit 8 bits 23 bits + // + // Float (16 bits) + // Bit: 15 14 to 10 9 to 0 + // +---+----------------+------------------+ + // | S | Exponent | Mantissa | + // +---+----------------+------------------+ + // 1 bit 5 bits 10 bits + const int fp_sign_bits = 1; + const int fp32_bits = 32; + const int fp32_exponent_bits = 8; + const int fp32_mantissa_1st_part_bits = 10; + const int fp32_mantissa_2nd_part_bits = 9; + const int fp32_mantissa_3rd_part_bits = 4; + const int fp16_exponent_bits = 5; + const int fp16_mantissa_bits = 10; + + // preserve the sign bit and exponent, clear mantissa. + srai(tmp2, dst, fp32_bits - fp_sign_bits - fp16_exponent_bits); + slli(tmp2, tmp2, fp16_mantissa_bits); + + // Preserve high order bit of float NaN in the + // binary16 result NaN (tenth bit); OR in remaining + // bits into lower 9 bits of binary 16 significand. + // | (doppel & 0x007f_e000) >> 13 // 10 bits + // | (doppel & 0x0000_1ff0) >> 4 // 9 bits + // | (doppel & 0x0000_000f)); // 4 bits + // + // Check j.l.Float.floatToFloat16 for more information. + // 10 bits + int left_shift = fp_sign_bits + fp32_exponent_bits + 32; + int right_shift = left_shift + fp32_mantissa_2nd_part_bits + fp32_mantissa_3rd_part_bits; + slli(tmp1, dst, left_shift); + srli(tmp1, tmp1, right_shift); + orr(tmp2, tmp2, tmp1); + // 9 bits + left_shift += fp32_mantissa_1st_part_bits; + right_shift = left_shift + fp32_mantissa_3rd_part_bits; + slli(tmp1, dst, left_shift); + srli(tmp1, tmp1, right_shift); + orr(tmp2, tmp2, tmp1); + // 4 bits + andi(tmp1, dst, 0xf); + orr(dst, tmp2, tmp1); +} + #define FCVT_SAFE(FLOATCVT, FLOATSIG) \ void MacroAssembler::FLOATCVT##_safe(Register dst, FloatRegister src, Register tmp) { \ Label done; \ diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/macroAssembler_riscv.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -44,7 +44,7 @@ MacroAssembler(CodeBuffer* code) : Assembler(code) {} - void safepoint_poll(Label& slow_path, bool at_return, bool acquire, bool in_nmethod, Register tmp_reg = t0); + void safepoint_poll(Label& slow_path, bool at_return, bool in_nmethod, Register tmp_reg = t0); // Alignment int align(int modulus, int extra_offset = 0); @@ -1240,7 +1240,7 @@ void far_jump(const Address &entry, Register tmp = t1); static int far_branch_size() { - return 2 * 4; // auipc + jalr, see far_call() & far_jump() + return 2 * MacroAssembler::instruction_size; // auipc + jalr, see far_call() & far_jump() } void load_byte_map_base(Register reg); @@ -1431,6 +1431,9 @@ void java_round_float(Register dst, FloatRegister src, FloatRegister ftmp); void java_round_double(Register dst, FloatRegister src, FloatRegister ftmp); + // Helper routine processing the slow path of NaN when converting float to float16 + void float_to_float16_NaN(Register dst, FloatRegister src, Register tmp1, Register tmp2); + // vector load/store unit-stride instructions void vlex_v(VectorRegister vd, Register base, Assembler::SEW sew, VectorMask vm = unmasked) { switch (sew) { @@ -1644,9 +1647,9 @@ public: enum { // movptr - movptr1_instruction_size = 6 * instruction_size, // lui, addi, slli, addi, slli, addi. See movptr1(). - movptr2_instruction_size = 5 * instruction_size, // lui, lui, slli, add, addi. See movptr2(). - load_pc_relative_instruction_size = 2 * instruction_size // auipc, ld + movptr1_instruction_size = 6 * MacroAssembler::instruction_size, // lui, addi, slli, addi, slli, addi. See movptr1(). + movptr2_instruction_size = 5 * MacroAssembler::instruction_size, // lui, lui, slli, add, addi. See movptr2(). + load_pc_relative_instruction_size = 2 * MacroAssembler::instruction_size // auipc, ld }; static bool is_load_pc_relative_at(address branch); @@ -1701,11 +1704,11 @@ // addi/jalr/load static bool check_movptr1_data_dependency(address instr) { address lui = instr; - address addi1 = lui + instruction_size; - address slli1 = addi1 + instruction_size; - address addi2 = slli1 + instruction_size; - address slli2 = addi2 + instruction_size; - address last_instr = slli2 + instruction_size; + address addi1 = lui + MacroAssembler::instruction_size; + address slli1 = addi1 + MacroAssembler::instruction_size; + address addi2 = slli1 + MacroAssembler::instruction_size; + address slli2 = addi2 + MacroAssembler::instruction_size; + address last_instr = slli2 + MacroAssembler::instruction_size; return extract_rs1(addi1) == extract_rd(lui) && extract_rs1(addi1) == extract_rd(addi1) && extract_rs1(slli1) == extract_rd(addi1) && @@ -1725,10 +1728,10 @@ // addi/jalr/load static bool check_movptr2_data_dependency(address instr) { address lui1 = instr; - address lui2 = lui1 + instruction_size; - address slli = lui2 + instruction_size; - address add = slli + instruction_size; - address last_instr = add + instruction_size; + address lui2 = lui1 + MacroAssembler::instruction_size; + address slli = lui2 + MacroAssembler::instruction_size; + address add = slli + MacroAssembler::instruction_size; + address last_instr = add + MacroAssembler::instruction_size; return extract_rd(add) == extract_rd(lui2) && extract_rs1(add) == extract_rd(lui2) && extract_rs2(add) == extract_rd(slli) && @@ -1742,7 +1745,7 @@ // srli static bool check_li16u_data_dependency(address instr) { address lui = instr; - address srli = lui + instruction_size; + address srli = lui + MacroAssembler::instruction_size; return extract_rs1(srli) == extract_rd(lui) && extract_rs1(srli) == extract_rd(srli); @@ -1753,7 +1756,7 @@ // addiw static bool check_li32_data_dependency(address instr) { address lui = instr; - address addiw = lui + instruction_size; + address addiw = lui + MacroAssembler::instruction_size; return extract_rs1(addiw) == extract_rd(lui) && extract_rs1(addiw) == extract_rd(addiw); @@ -1764,7 +1767,7 @@ // jalr/addi/load/float_load static bool check_pc_relative_data_dependency(address instr) { address auipc = instr; - address last_instr = auipc + instruction_size; + address last_instr = auipc + MacroAssembler::instruction_size; return extract_rs1(last_instr) == extract_rd(auipc); } @@ -1774,7 +1777,7 @@ // load static bool check_load_pc_relative_data_dependency(address instr) { address auipc = instr; - address load = auipc + instruction_size; + address load = auipc + MacroAssembler::instruction_size; return extract_rd(load) == extract_rd(auipc) && extract_rs1(load) == extract_rd(load); diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/nativeInst_riscv.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/nativeInst_riscv.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/nativeInst_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/nativeInst_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -33,6 +33,7 @@ #include "runtime/safepoint.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubRoutines.hpp" +#include "utilities/align.hpp" #include "utilities/ostream.hpp" #ifdef COMPILER1 #include "c1/c1_Runtime1.hpp" @@ -46,128 +47,111 @@ } //----------------------------------------------------------------------------- -// NativeFarCall -// -// Implements direct far calling loading an address from the stub section version of reloc call. - -class NativeFarCall: public NativeInstruction { - public: - enum RISCV_specific_constants { - return_address_offset = 3 * NativeInstruction::instruction_size, // auipc + ld + jalr - }; - - address instruction_address() const { return addr_at(0); } - address next_instruction_address() const { return addr_at(return_address_offset); } - address return_address() const { return addr_at(return_address_offset); } - address destination() const; - address reloc_destination(address orig_address); - - void set_destination(address dest); - void verify(); - void print(); - - bool set_destination_mt_safe(address dest, bool assert_lock = true); - bool reloc_set_destination(address dest); - - private: - address stub_address(); - - static void set_stub_address_destination_at(address dest, address value); - static address stub_address_destination_at(address src); - public: - - static NativeFarCall* at(address addr); - static bool is_at(address addr); - static bool is_call_before(address return_address); -}; +// NativeCall -address NativeFarCall::destination() const { +address NativeCall::destination() const { address addr = instruction_address(); - assert(NativeFarCall::is_at(addr), "unexpected code at call site"); + assert(NativeCall::is_at(addr), "unexpected code at call site"); - address destination = MacroAssembler::target_addr_for_insn(addr); + address stub_addr = MacroAssembler::target_addr_for_insn(addr); CodeBlob* cb = CodeCache::find_blob(addr); - assert(cb && cb->is_nmethod(), "sanity"); + assert(cb != nullptr && cb->is_nmethod(), "nmethod expected"); nmethod *nm = (nmethod *)cb; - assert(nm != nullptr, "Sanity"); - assert(nm->stub_contains(destination), "Sanity"); - assert(destination != nullptr, "Sanity"); - return stub_address_destination_at(destination); + assert(nm->stub_contains(stub_addr), "Sanity"); + assert(stub_addr != nullptr, "Sanity"); + + return stub_address_destination_at(stub_addr); } -address NativeFarCall::reloc_destination(address orig_address) { +address NativeCall::reloc_destination() { address call_addr = instruction_address(); + assert(NativeCall::is_at(call_addr), "unexpected code at call site"); CodeBlob *code = CodeCache::find_blob(call_addr); assert(code != nullptr, "Could not find the containing code blob"); address stub_addr = nullptr; - if (code != nullptr && code->is_nmethod()) { - stub_addr = trampoline_stub_Relocation::get_trampoline_for(call_addr, (nmethod*)code); + if (code->is_nmethod()) { + // TODO: Need to revisit this when porting the AOT features. + stub_addr = trampoline_stub_Relocation::get_trampoline_for(call_addr, code->as_nmethod()); + assert(stub_addr != nullptr, "Sanity"); } - if (stub_addr != nullptr) { - stub_addr = MacroAssembler::target_addr_for_insn(call_addr); - } return stub_addr; } -void NativeFarCall::set_destination(address dest) { - address addr = instruction_address(); - assert(NativeFarCall::is_at(addr), "unexpected code at call site"); - Unimplemented(); +void NativeCall::verify() { + assert(NativeCall::is_at(instruction_address()), "unexpected code at call site"); } -void NativeFarCall::verify() { - assert(NativeFarCall::is_at(instruction_address()), "unexpected code at call site"); +void NativeCall::print() { + assert(NativeCall::is_at(instruction_address()), "unexpected code at call site"); + tty->print_cr(PTR_FORMAT ": auipc,ld,jalr x1, offset/reg, ", p2i(instruction_address())); } -void NativeFarCall::print() { - assert(NativeFarCall::is_at(instruction_address()), "unexpected code at call site"); - tty->print_cr(PTR_FORMAT ": auipc,ld,jalr x1, offset/reg, ", p2i(addr_at(0))); +void NativeCall::optimize_call(address dest, bool mt_safe) { + // Skip over auipc + ld + address jmp_ins_pc = instruction_address() + 2 * NativeInstruction::instruction_size; + // Rutime calls may be unaligned, but they are never changed after relocation. + assert(!mt_safe || is_aligned(jmp_ins_pc, NativeInstruction::instruction_size), "Must be naturally aligned: %p", jmp_ins_pc); + // If reachable use JAL + if (Assembler::reachable_from_branch_at(jmp_ins_pc, dest)) { + int64_t distance = dest - jmp_ins_pc; + uint32_t new_jal = Assembler::encode_jal(ra, distance); + Atomic::store((uint32_t *)jmp_ins_pc, new_jal); + } else if (!MacroAssembler::is_jalr_at(jmp_ins_pc)) { // The jalr is always identical: jalr ra, 0(t1) + uint32_t new_jalr = Assembler::encode_jalr(ra, t1, 0); + Atomic::store((uint32_t *)jmp_ins_pc, new_jalr); + } else { + // No change to instruction stream + return; + } + // We changed instruction stream + if (mt_safe) { + // IC invalidate provides a leading full fence, it thus happens after we changed the instruction stream. + ICache::invalidate_range(jmp_ins_pc, NativeInstruction::instruction_size); + } } -bool NativeFarCall::set_destination_mt_safe(address dest, bool assert_lock) { - assert(NativeFarCall::is_at(addr_at(0)), "unexpected code at call site"); - assert(!assert_lock || - (CodeCache_lock->is_locked() || SafepointSynchronize::is_at_safepoint()) || - CompiledICLocker::is_safe(addr_at(0)), +bool NativeCall::set_destination_mt_safe(address dest) { + assert(NativeCall::is_at(instruction_address()), "unexpected code at call site"); + assert((CodeCache_lock->is_locked() || SafepointSynchronize::is_at_safepoint()) || + CompiledICLocker::is_safe(instruction_address()), "concurrent code patching"); - address call_addr = addr_at(0); - assert(NativeFarCall::is_at(call_addr), "unexpected code at call site"); - address stub_addr = stub_address(); + assert(stub_addr != nullptr, "No stub?"); + set_stub_address_destination_at(stub_addr, dest); // release + // optimize_call happens after we stored new address in addr stub. + // patches jalr -> jal/jal -> jalr depending on dest + optimize_call(dest, true); - if (stub_addr != nullptr) { - set_stub_address_destination_at(stub_addr, dest); - return true; - } - - return false; + return true; } -bool NativeFarCall::reloc_set_destination(address dest) { - address call_addr = addr_at(0); - assert(NativeFarCall::is_at(call_addr), "unexpected code at call site"); +// The argument passed in is the address to the stub containing the destination +bool NativeCall::reloc_set_destination(address stub_addr) { + address call_addr = instruction_address(); + assert(NativeCall::is_at(call_addr), "unexpected code at call site"); CodeBlob *code = CodeCache::find_blob(call_addr); assert(code != nullptr, "Could not find the containing code blob"); - address stub_addr = nullptr; - if (code != nullptr && code->is_nmethod()) { - stub_addr = trampoline_stub_Relocation::get_trampoline_for(call_addr, (nmethod*)code); - } + if (code->is_nmethod()) { + // TODO: Need to revisit this when porting the AOT features. + assert(stub_addr != nullptr, "Sanity"); + assert(stub_addr == trampoline_stub_Relocation::get_trampoline_for(call_addr, code->as_nmethod()), "Sanity"); + MacroAssembler::pd_patch_instruction_size(call_addr, stub_addr); // patches auipc + ld to stub_addr - if (stub_addr != nullptr) { - MacroAssembler::pd_patch_instruction_size(call_addr, stub_addr); + address dest = stub_address_destination_at(stub_addr); + optimize_call(dest, false); // patches jalr -> jal/jal -> jalr depending on dest } return true; } -void NativeFarCall::set_stub_address_destination_at(address dest, address value) { +void NativeCall::set_stub_address_destination_at(address dest, address value) { assert_cond(dest != nullptr); assert_cond(value != nullptr); @@ -175,31 +159,24 @@ OrderAccess::release(); } -address NativeFarCall::stub_address_destination_at(address src) { +address NativeCall::stub_address_destination_at(address src) { assert_cond(src != nullptr); address dest = (address)get_data64_at(src); return dest; } -address NativeFarCall::stub_address() { - address call_addr = addr_at(0); +address NativeCall::stub_address() { + address call_addr = instruction_address(); CodeBlob *code = CodeCache::find_blob(call_addr); assert(code != nullptr, "Could not find the containing code blob"); - address dest = MacroAssembler::pd_call_destination(call_addr); - assert(code->contains(dest), "Sanity"); - return dest; -} - -NativeFarCall* NativeFarCall::at(address addr) { - assert_cond(addr != nullptr); - assert(NativeFarCall::is_at(addr), "unexpected code at call site: %p", addr); - NativeFarCall* call = (NativeFarCall*)(addr); - return call; + address stub_addr = MacroAssembler::target_addr_for_insn(call_addr); + assert(code->contains(stub_addr), "Sanity"); + return stub_addr; } -bool NativeFarCall::is_at(address addr) { +bool NativeCall::is_at(address addr) { assert_cond(addr != nullptr); const int instr_size = NativeInstruction::instruction_size; if (MacroAssembler::is_auipc_at(addr) && @@ -209,65 +186,23 @@ (MacroAssembler::extract_rd(addr + instr_size) == x6) && (MacroAssembler::extract_rs1(addr + instr_size) == x6) && (MacroAssembler::extract_rs1(addr + 2 * instr_size) == x6) && - (MacroAssembler::extract_rd(addr + 2 * instr_size) == x1)) { + (MacroAssembler::extract_rd(addr + 2 * instr_size) == x1)) { + return true; + } + if (MacroAssembler::is_auipc_at(addr) && + MacroAssembler::is_ld_at(addr + instr_size) && + MacroAssembler::is_jal_at(addr + 2 * instr_size) && + (MacroAssembler::extract_rd(addr) == x6) && + (MacroAssembler::extract_rd(addr + instr_size) == x6) && + (MacroAssembler::extract_rs1(addr + instr_size) == x6) && + (MacroAssembler::extract_rd(addr + 2 * instr_size) == x1)) { return true; } return false; } -bool NativeFarCall::is_call_before(address return_address) { - return NativeFarCall::is_at(return_address - return_address_offset); -} - -//----------------------------------------------------------------------------- -// NativeCall - -address NativeCall::instruction_address() const { - return NativeFarCall::at(addr_at(0))->instruction_address(); -} - -address NativeCall::next_instruction_address() const { - return NativeFarCall::at(addr_at(0))->next_instruction_address(); -} - -address NativeCall::return_address() const { - return NativeFarCall::at(addr_at(0))->return_address(); -} - -address NativeCall::destination() const { - return NativeFarCall::at(addr_at(0))->destination(); -} - -address NativeCall::reloc_destination(address orig_address) { - return NativeFarCall::at(addr_at(0))->reloc_destination(orig_address); -} - -void NativeCall::set_destination(address dest) { - NativeFarCall::at(addr_at(0))->set_destination(dest); -} - -void NativeCall::verify() { - NativeFarCall::at(addr_at(0))->verify();; -} - -void NativeCall::print() { - NativeFarCall::at(addr_at(0))->print();; -} - -bool NativeCall::set_destination_mt_safe(address dest, bool assert_lock) { - return NativeFarCall::at(addr_at(0))->set_destination_mt_safe(dest, assert_lock); -} - -bool NativeCall::reloc_set_destination(address dest) { - return NativeFarCall::at(addr_at(0))->reloc_set_destination(dest); -} - -bool NativeCall::is_at(address addr) { - return NativeFarCall::is_at(addr); -} - bool NativeCall::is_call_before(address return_address) { - return NativeFarCall::is_call_before(return_address); + return NativeCall::is_at(return_address - NativeCall::instruction_size); } NativeCall* nativeCall_at(address addr) { @@ -280,7 +215,7 @@ NativeCall* nativeCall_before(address return_address) { assert_cond(return_address != nullptr); NativeCall* call = nullptr; - call = (NativeCall*)(return_address - NativeFarCall::return_address_offset); + call = (NativeCall*)(return_address - NativeCall::instruction_size); DEBUG_ONLY(call->verify()); return call; } @@ -432,7 +367,9 @@ } bool NativeInstruction::is_stop() { - return uint_at(0) == 0xc0101073; // an illegal instruction, 'csrrw x0, time, x0' + // an illegal instruction, 'csrrw x0, time, x0' + uint32_t encoded = Assembler::encode_csrrw(x0, Assembler::time, x0); + return uint_at(0) == encoded; } //------------------------------------------------------------------- @@ -481,6 +418,8 @@ MacroAssembler a(&cb); Assembler::IncompressibleScope scope(&a); // Fixed length: see NativeGeneralJump::get_instruction_size() + MacroAssembler::assert_alignment(code_pos); + int32_t offset = 0; a.movptr(t1, entry, offset, t0); // lui, lui, slli, add a.jr(t1, offset); // jalr @@ -512,6 +451,7 @@ } bool NativePostCallNop::patch(int32_t oopmap_slot, int32_t cb_offset) { + MacroAssembler::assert_alignment(addr_at(4)); if (((oopmap_slot & 0xff) != oopmap_slot) || ((cb_offset & 0xffffff) != cb_offset)) { return false; // cannot encode } @@ -523,14 +463,17 @@ return true; // successfully encoded } -void NativeDeoptInstruction::verify() { +bool NativeDeoptInstruction::is_deopt_at(address instr) { + assert(instr != nullptr, "Must be"); + uint32_t value = Assembler::ld_instr(instr); + uint32_t encoded = Assembler::encode_csrrw(x0, Assembler::instret, x0); + return value == encoded; } // Inserts an undefined instruction at a given pc void NativeDeoptInstruction::insert(address code_pos) { - // 0xc0201073 encodes CSRRW x0, instret, x0 - uint32_t insn = 0xc0201073; - uint32_t *pos = (uint32_t *) code_pos; - *pos = insn; + MacroAssembler::assert_alignment(code_pos); + uint32_t encoded = Assembler::encode_csrrw(x0, Assembler::instret, x0); + Assembler::sd_instr(code_pos, encoded); ICache::invalidate_range(code_pos, 4); } diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/nativeInst_riscv.hpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/nativeInst_riscv.hpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/nativeInst_riscv.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/nativeInst_riscv.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -94,7 +94,6 @@ static uint64_t get_data64_at(address src) { return Bytes::get_native_u8(src); } public: - inline friend NativeInstruction* nativeInstruction_at(address addr); static bool maybe_cpool_ref(address instr) { @@ -112,6 +111,7 @@ // The NativeCall is an abstraction for accessing/manipulating native // call instructions (used to manipulate inline caches, primitive & // DSO calls, etc.). +// NativeCall is reloc call on RISC-V. See MacroAssembler::reloc_call. class NativeCall: private NativeInstruction { // private: when common code is using byte_size() private: @@ -119,34 +119,48 @@ // Use byte_size() as it can be changed in runtime // Since instruction_size exists on NativeInstruction we need // to overload and hide it. - instruction_size = 3 * Assembler::instruction_size // auipc + ld + jalr + instruction_size = 3 * NativeInstruction::instruction_size // auipc + ld + jalr }; - public: + public: static int byte_size() { - return 3 * NativeInstruction::instruction_size; // auipc + ld + jalr + return NativeCall::instruction_size; // auipc + ld + jalr } // Creation friend NativeCall* nativeCall_at(address addr); friend NativeCall* nativeCall_before(address return_address); - address instruction_address() const; - address next_instruction_address() const; - address return_address() const; + address instruction_address() const { return addr_at(0); } + address next_instruction_address() const { return addr_at(NativeCall::instruction_size); } + address return_address() const { return addr_at(NativeCall::instruction_size); } address destination() const; - address reloc_destination(address orig_address); + address reloc_destination(); void verify_alignment() {} // do nothing on riscv void verify(); void print(); - void set_destination(address dest); - bool set_destination_mt_safe(address dest, bool assert_lock = true); + void set_destination(address dest) { Unimplemented(); } + // patch stub to target address of the reloc call + bool set_destination_mt_safe(address dest); + // patch reloc call to stub address bool reloc_set_destination(address dest); static bool is_at(address addr); static bool is_call_before(address return_address); + + private: + // return stub address, without checking stub address in locs + address stub_address(); + // set target address at stub + static void set_stub_address_destination_at(address dest, address value); + // return target address at stub + static address stub_address_destination_at(address src); + // We either have a jalr or jal depending on distance to old destination. + // This method emits a new jal if new destination is within jal reach. + // Otherwise restores the jalr which can reach any destination. + void optimize_call(address dest, bool mt_safe = true); }; // An interface for accessing/manipulating native mov reg, imm instructions. @@ -363,14 +377,7 @@ address instruction_address() const { return addr_at(instruction_offset); } address next_instruction_address() const { return addr_at(instruction_size); } - void verify(); - - static bool is_deopt_at(address instr) { - assert(instr != nullptr, ""); - uint32_t value = Assembler::ld_instr(instr); - // 0xc0201073 encodes CSRRW x0, instret, x0 - return value == 0xc0201073; - } + static bool is_deopt_at(address instr); // MT-safe patching static void insert(address code_pos); diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/relocInfo_riscv.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/relocInfo_riscv.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/relocInfo_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/relocInfo_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -72,13 +72,12 @@ } address Relocation::pd_call_destination(address orig_addr) { - assert(is_call(), "should be an address instruction here"); + assert(is_call(), "should be a call here"); if (NativeCall::is_at(addr())) { - return nativeCall_at(addr())->reloc_destination(orig_addr); + return nativeCall_at(addr())->reloc_destination(); } - // Non call reloc + if (orig_addr != nullptr) { - // the extracted address from the instructions in address orig_addr address new_addr = MacroAssembler::pd_call_destination(orig_addr); // If call is branch to self, don't try to relocate it, just leave it // as branch to self. This happens during code generation if the code @@ -87,20 +86,19 @@ new_addr = (new_addr == orig_addr) ? addr() : new_addr; return new_addr; } + return MacroAssembler::pd_call_destination(addr()); } void Relocation::pd_set_call_destination(address x) { - assert(is_call(), "should be an address instruction here"); + assert(is_call(), "should be a call here"); if (NativeCall::is_at(addr())) { - NativeCall* nc = nativeCall_at(addr()); - if (nc->reloc_set_destination(x)) { - return; - } + NativeCall* call = nativeCall_at(addr()); + call->reloc_set_destination(x); + } else { + MacroAssembler::pd_patch_instruction_size(addr(), x); + assert(pd_call_destination(addr()) == x, "fail in reloc"); } - MacroAssembler::pd_patch_instruction_size(addr(), x); - address pd_call = pd_call_destination(addr()); - assert(pd_call == x, "fail in reloc"); } address* Relocation::pd_address_in_code() { diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/riscv.ad openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/riscv.ad --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/riscv.ad 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/riscv.ad 2025-12-18 08:04:02.000000000 +0000 @@ -1269,6 +1269,26 @@ return align_up(current_offset, alignment_required()) - current_offset; } +int CallRuntimeDirectNode::compute_padding(int current_offset) const +{ + return align_up(current_offset, alignment_required()) - current_offset; +} + +int CallLeafDirectNode::compute_padding(int current_offset) const +{ + return align_up(current_offset, alignment_required()) - current_offset; +} + +int CallLeafDirectVectorNode::compute_padding(int current_offset) const +{ + return align_up(current_offset, alignment_required()) - current_offset; +} + +int CallLeafNoFPDirectNode::compute_padding(int current_offset) const +{ + return align_up(current_offset, alignment_required()) - current_offset; +} + //============================================================================= #ifndef PRODUCT @@ -1493,7 +1513,7 @@ code_stub = &stub->entry(); } __ relocate(relocInfo::poll_return_type); - __ safepoint_poll(*code_stub, true /* at_return */, false /* acquire */, true /* in_nmethod */); + __ safepoint_poll(*code_stub, true /* at_return */, true /* in_nmethod */); } } @@ -2271,10 +2291,6 @@ __ mv(dst_reg, 1); %} - enc_class riscv_enc_mov_byte_map_base(iRegP dst) %{ - __ load_byte_map_base($dst$$Register); - %} - enc_class riscv_enc_mov_n(iRegN dst, immN src) %{ Register dst_reg = as_Register($dst$$reg); address con = (address)$src$$constant; @@ -2825,21 +2841,6 @@ interface(CONST_INTER); %} -// Card Table Byte Map Base -operand immByteMapBase() -%{ - // Get base of card map - predicate(BarrierSet::barrier_set()->is_a(BarrierSet::CardTableBarrierSet) && - SHENANDOAHGC_ONLY(!BarrierSet::barrier_set()->is_a(BarrierSet::ShenandoahBarrierSet) &&) - (CardTable::CardValue*)n->get_ptr() == - ((CardTableBarrierSet*)(BarrierSet::barrier_set()))->card_table()->byte_map_base()); - match(ConP); - - op_cost(0); - format %{ %} - interface(CONST_INTER); -%} - // Int Immediate: low 16-bit mask operand immI_16bits() %{ @@ -3843,13 +3844,18 @@ pipeline %{ attributes %{ - // RISC-V instructions are of fixed length - fixed_size_instructions; // Fixed size instructions TODO does - max_instructions_per_bundle = 2; // Generic RISC-V 1, Sifive Series 7 2 - // RISC-V instructions come in 32-bit word units - instruction_unit_size = 4; // An instruction is 4 bytes long - instruction_fetch_unit_size = 64; // The processor fetches one line - instruction_fetch_units = 1; // of 64 bytes + // RISC-V instructions are of length 2 or 4 bytes. + variable_size_instructions; + instruction_unit_size = 2; + + // Up to 4 instructions per bundle + max_instructions_per_bundle = 4; + + // The RISC-V processor fetches 64 bytes... + instruction_fetch_unit_size = 64; + + // ...in one line. + instruction_fetch_units = 1; // List of nop instructions nops( MachNop ); @@ -4799,18 +4805,6 @@ ins_pipe(ialu_imm); %} -// Load Byte Map Base Constant -instruct loadByteMapBase(iRegPNoSp dst, immByteMapBase con) -%{ - match(Set dst con); - ins_cost(ALU_COST); - format %{ "mv $dst, $con\t# Byte Map Base, #@loadByteMapBase" %} - - ins_encode(riscv_enc_mov_byte_map_base(dst)); - - ins_pipe(ialu_imm); -%} - // Load Narrow Pointer Constant instruct loadConN(iRegNNoSp dst, immN con) %{ @@ -8195,7 +8189,7 @@ ins_cost(0); size(0); - + format %{ "#@unnecessary_membar_volatile_rvtso (unnecessary so empty encoding)" %} ins_encode %{ __ block_comment("unnecessary_membar_volatile_rvtso"); @@ -8576,7 +8570,7 @@ instruct reinterpretS2HF(fRegF dst, iRegI src) %{ match(Set dst (ReinterpretS2HF src)); - format %{ "fmv.h.x $dst, $src" %} + format %{ "fmv.h.x $dst, $src\t# reinterpretS2HF" %} ins_encode %{ __ fmv_h_x($dst$$FloatRegister, $src$$Register); %} @@ -8596,7 +8590,7 @@ instruct reinterpretHF2S(iRegINoSp dst, fRegF src) %{ match(Set dst (ReinterpretHF2S src)); - format %{ "fmv.x.h $dst, $src" %} + format %{ "fmv.x.h $dst, $src\t# reinterpretHF2S" %} ins_encode %{ __ fmv_x_h($dst$$Register, $src$$FloatRegister); %} @@ -8958,7 +8952,7 @@ instruct decodeKlass_not_null(iRegPNoSp dst, iRegN src, iRegPNoSp tmp) %{ match(Set dst (DecodeNKlass src)); - effect(TEMP tmp); + effect(TEMP_DEF dst, TEMP tmp); ins_cost(ALU_COST); format %{ "decode_klass_not_null $dst, $src\t#@decodeKlass_not_null" %} @@ -10529,6 +10523,7 @@ ins_encode(riscv_enc_java_to_runtime(meth)); ins_pipe(pipe_class_call); + ins_alignment(4); %} // Call Runtime Instruction @@ -10546,6 +10541,7 @@ ins_encode(riscv_enc_java_to_runtime(meth)); ins_pipe(pipe_class_call); + ins_alignment(4); %} // Call Runtime Instruction without safepoint and with vector arguments @@ -10563,6 +10559,7 @@ ins_encode(riscv_enc_java_to_runtime(meth)); ins_pipe(pipe_class_call); + ins_alignment(4); %} // Call Runtime Instruction @@ -10580,6 +10577,7 @@ ins_encode(riscv_enc_java_to_runtime(meth)); ins_pipe(pipe_class_call); + ins_alignment(4); %} // ============================================================================ diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/riscv_v.ad openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/riscv_v.ad --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/riscv_v.ad 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/riscv_v.ad 2025-12-18 08:04:02.000000000 +0000 @@ -110,6 +110,7 @@ if (vlen < 4) { return false; } + break; case Op_VectorCastHF2F: case Op_VectorCastF2HF: case Op_AddVHF: diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1004,20 +1004,23 @@ __ bnez(c_rarg2, call_thaw); - // Make sure the call is patchable - __ align(NativeInstruction::instruction_size); + address call_pc; + { + Assembler::IncompressibleScope scope(masm); + // Make sure the call is patchable + __ align(NativeInstruction::instruction_size); + + call_pc = __ reloc_call(resolve); + if (call_pc == nullptr) { + fatal("CodeCache is full at gen_continuation_enter"); + } - const address tr_call = __ reloc_call(resolve); - if (tr_call == nullptr) { - fatal("CodeCache is full at gen_continuation_enter"); + oop_maps->add_gc_map(__ pc() - start, map); + __ post_call_nop(); } - - oop_maps->add_gc_map(__ pc() - start, map); - __ post_call_nop(); - __ j(exit); - address stub = CompiledDirectCall::emit_to_interp_stub(masm, tr_call); + address stub = CompiledDirectCall::emit_to_interp_stub(masm, call_pc); if (stub == nullptr) { fatal("CodeCache is full at gen_continuation_enter"); } @@ -1036,26 +1039,36 @@ __ bnez(c_rarg2, call_thaw); - // Make sure the call is patchable - __ align(NativeInstruction::instruction_size); + address call_pc; + { + Assembler::IncompressibleScope scope(masm); + // Make sure the call is patchable + __ align(NativeInstruction::instruction_size); - const address tr_call = __ reloc_call(resolve); - if (tr_call == nullptr) { - fatal("CodeCache is full at gen_continuation_enter"); - } + call_pc = __ reloc_call(resolve); + if (call_pc == nullptr) { + fatal("CodeCache is full at gen_continuation_enter"); + } - oop_maps->add_gc_map(__ pc() - start, map); - __ post_call_nop(); + oop_maps->add_gc_map(__ pc() - start, map); + __ post_call_nop(); + } __ j(exit); __ bind(call_thaw); - ContinuationEntry::_thaw_call_pc_offset = __ pc() - start; - __ rt_call(CAST_FROM_FN_PTR(address, StubRoutines::cont_thaw())); - oop_maps->add_gc_map(__ pc() - start, map->deep_copy()); - ContinuationEntry::_return_pc_offset = __ pc() - start; - __ post_call_nop(); + // Post call nops must be natural aligned due to cmodx rules. + { + Assembler::IncompressibleScope scope(masm); + __ align(NativeInstruction::instruction_size); + + ContinuationEntry::_thaw_call_pc_offset = __ pc() - start; + __ rt_call(CAST_FROM_FN_PTR(address, StubRoutines::cont_thaw())); + oop_maps->add_gc_map(__ pc() - start, map->deep_copy()); + ContinuationEntry::_return_pc_offset = __ pc() - start; + __ post_call_nop(); + } __ bind(exit); ContinuationEntry::_cleanup_offset = __ pc() - start; @@ -1084,7 +1097,7 @@ __ jr(x11); // the exception handler } - address stub = CompiledDirectCall::emit_to_interp_stub(masm, tr_call); + address stub = CompiledDirectCall::emit_to_interp_stub(masm, call_pc); if (stub == nullptr) { fatal("CodeCache is full at gen_continuation_enter"); } @@ -1117,10 +1130,16 @@ __ mv(c_rarg1, sp); + // Post call nops must be natural aligned due to cmodx rules. + __ align(NativeInstruction::instruction_size); + frame_complete = __ pc() - start; address the_pc = __ pc(); - __ post_call_nop(); // this must be exactly after the pc value that is pushed into the frame info, we use this nop for fast CodeBlob lookup + { + Assembler::IncompressibleScope scope(masm); + __ post_call_nop(); // this must be exactly after the pc value that is pushed into the frame info, we use this nop for fast CodeBlob lookup + } __ mv(c_rarg0, xthread); __ set_last_Java_frame(sp, fp, the_pc, t0); @@ -1777,15 +1796,7 @@ // check for safepoint operation in progress and/or pending suspend requests { - // We need an acquire here to ensure that any subsequent load of the - // global SafepointSynchronize::_state flag is ordered after this load - // of the thread-local polling word. We don't want this poll to - // return false (i.e. not safepointing) and a later poll of the global - // SafepointSynchronize::_state spuriously to return true. - // This is to avoid a race when we're in a native->Java transition - // racing the code which wakes up from a safepoint. - - __ safepoint_poll(safepoint_in_progress, true /* at_return */, true /* acquire */, false /* in_nmethod */); + __ safepoint_poll(safepoint_in_progress, true /* at_return */, false /* in_nmethod */); __ lwu(t0, Address(xthread, JavaThread::suspend_flags_offset())); __ bnez(t0, safepoint_in_progress); __ bind(safepoint_in_progress_done); diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -683,10 +683,11 @@ address start = __ pc(); if (UseBlockZeroing) { - // Ensure count >= 2*CacheLineSize so that it still deserves a cbo.zero - // after alignment. + int zicboz_block_size = VM_Version::zicboz_block_size.value(); + // Ensure count >= 2 * zicboz_block_size so that it still deserves + // a cbo.zero after alignment. Label small; - int low_limit = MAX2(2 * CacheLineSize, BlockZeroingLowLimit) / wordSize; + int low_limit = MAX2(2 * zicboz_block_size, (int)BlockZeroingLowLimit) / wordSize; __ mv(tmp1, low_limit); __ blt(cnt, tmp1, small); __ zero_dcache_blocks(base, cnt, tmp1, tmp2); @@ -6354,18 +6355,8 @@ __ ret(); __ bind(NaN_SLOW); - __ fmv_x_w(dst, src); - // preserve the payloads of non-canonical NaNs. - __ srai(dst, dst, 13); - // preserve the sign bit. - __ srai(t1, dst, 13); - __ slli(t1, t1, 10); - __ mv(t0, 0x3ff); - __ orr(t1, t1, t0); - - // get the result by merging sign bit and payloads of preserved non-canonical NaNs. - __ andr(dst, dst, t1); + __ float_to_float16_NaN(dst, src, t0, t1); __ ret(); return entry; diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1229,15 +1229,7 @@ { Label L, Continue; - // We need an acquire here to ensure that any subsequent load of the - // global SafepointSynchronize::_state flag is ordered after this load - // of the thread-local polling word. We don't want this poll to - // return false (i.e. not safepointing) and a later poll of the global - // SafepointSynchronize::_state spuriously to return true. - // - // This is to avoid a race when we're in a native->Java transition - // racing the code which wakes up from a safepoint. - __ safepoint_poll(L, true /* at_return */, true /* acquire */, false /* in_nmethod */); + __ safepoint_poll(L, true /* at_return */, false /* in_nmethod */); __ lwu(t1, Address(xthread, JavaThread::suspend_flags_offset())); __ beqz(t1, Continue); __ bind(L); @@ -1388,7 +1380,7 @@ Label slow_path; Label fast_path; - __ safepoint_poll(slow_path, true /* at_return */, false /* acquire */, false /* in_nmethod */); + __ safepoint_poll(slow_path, true /* at_return */, false /* in_nmethod */); __ j(fast_path); __ bind(slow_path); diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/templateTable_riscv.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/templateTable_riscv.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/templateTable_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/templateTable_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -133,6 +133,7 @@ void TemplateTable::patch_bytecode(Bytecodes::Code bc, Register bc_reg, Register temp_reg, bool load_bc_into_bc_reg /*=true*/, int byte_no) { + assert_different_registers(bc_reg, temp_reg); if (!RewriteBytecodes) { return; } Label L_patch_done; @@ -196,7 +197,11 @@ __ bind(L_okay); #endif - // patch bytecode + // Patch bytecode with release store to coordinate with ResolvedFieldEntry loads + // in fast bytecode codelets. load_field_entry has a memory barrier that gains + // the needed ordering, together with control dependency on entering the fast codelet + // itself. + __ membar(MacroAssembler::LoadStore | MacroAssembler::StoreStore); __ sb(bc_reg, at_bcp(0)); __ bind(L_patch_done); } @@ -3017,6 +3022,7 @@ // X11: field offset, X12: field holder, X13: flags load_resolved_field_entry(x12, x12, noreg, x11, x13); + __ verify_field_offset(x11); { Label notVolatile; @@ -3104,6 +3110,8 @@ __ load_field_entry(x12, x11); __ load_sized_value(x11, Address(x12, in_bytes(ResolvedFieldEntry::field_offset_offset())), sizeof(int), true /*is_signed*/); + __ verify_field_offset(x11); + __ load_unsigned_byte(x13, Address(x12, in_bytes(ResolvedFieldEntry::flags_offset()))); // x10: object @@ -3159,7 +3167,9 @@ __ ld(x10, aaddress(0)); // access constant pool cache __ load_field_entry(x12, x13, 2); + __ load_sized_value(x11, Address(x12, in_bytes(ResolvedFieldEntry::field_offset_offset())), sizeof(int), true /*is_signed*/); + __ verify_field_offset(x11); // make sure exception is reported in correct bcp range (getfield is // next instruction) diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/vm_version_riscv.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/vm_version_riscv.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/vm_version_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/vm_version_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -147,7 +147,7 @@ if (FLAG_IS_DEFAULT(AvoidUnalignedAccesses)) { FLAG_SET_DEFAULT(AvoidUnalignedAccesses, - unaligned_access.value() != MISALIGNED_FAST); + unaligned_scalar.value() != MISALIGNED_SCALAR_FAST); } if (!AvoidUnalignedAccesses) { @@ -162,7 +162,12 @@ // This machine has fast unaligned memory accesses if (FLAG_IS_DEFAULT(UseUnalignedAccesses)) { FLAG_SET_DEFAULT(UseUnalignedAccesses, - unaligned_access.value() == MISALIGNED_FAST); + (unaligned_scalar.value() == MISALIGNED_SCALAR_FAST)); + } + + if (FLAG_IS_DEFAULT(AlignVector)) { + FLAG_SET_DEFAULT(AlignVector, + unaligned_vector.value() != MISALIGNED_VECTOR_FAST); } #ifdef __riscv_ztso @@ -181,12 +186,13 @@ FLAG_SET_DEFAULT(UsePopCountInstruction, false); } - if (UseZicboz) { + if (UseZicboz && zicboz_block_size.enabled() && zicboz_block_size.value() > 0) { + assert(is_power_of_2(zicboz_block_size.value()), "Sanity"); if (FLAG_IS_DEFAULT(UseBlockZeroing)) { FLAG_SET_DEFAULT(UseBlockZeroing, true); } if (FLAG_IS_DEFAULT(BlockZeroingLowLimit)) { - FLAG_SET_DEFAULT(BlockZeroingLowLimit, 2 * CacheLineSize); + FLAG_SET_DEFAULT(BlockZeroingLowLimit, 4 * zicboz_block_size.value()); } } else if (UseBlockZeroing) { warning("Block zeroing is not available"); @@ -194,13 +200,8 @@ } if (UseRVV) { - if (!ext_V.enabled() && FLAG_IS_DEFAULT(UseRVV)) { - warning("RVV is not supported on this CPU"); - FLAG_SET_DEFAULT(UseRVV, false); - } else { - // read vector length from vector CSR vlenb - _initial_vector_length = cpu_vector_length(); - } + // read vector length from vector CSR vlenb + _initial_vector_length = cpu_vector_length(); } // Misc Intrinsics that could depend on RVV. @@ -476,10 +477,6 @@ warning("AES/CTR intrinsics are not available on this CPU"); FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false); } - - if (FLAG_IS_DEFAULT(AlignVector)) { - FLAG_SET_DEFAULT(AlignVector, AvoidUnalignedAccesses); - } } #endif // COMPILER2 diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/vm_version_riscv.hpp openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/vm_version_riscv.hpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/riscv/vm_version_riscv.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/riscv/vm_version_riscv.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -86,25 +86,27 @@ } \ } \ - #define UPDATE_DEFAULT_DEP(flag, dep) \ - void update_flag() { \ - assert(enabled(), "Must be."); \ - /* dep must be declared before */ \ - assert((uintptr_t)(this) > \ - (uintptr_t)(&dep), "Invalid");\ - if (FLAG_IS_DEFAULT(flag)) { \ - if (dep.enabled()) { \ - FLAG_SET_DEFAULT(flag, true); \ - } else { \ - FLAG_SET_DEFAULT(flag, false); \ - } \ - } else { \ - /* Sync CPU features with flags */ \ - if (!flag) { \ - disable_feature(); \ - } \ - } \ - } \ + #define UPDATE_DEFAULT_DEP(flag, dep) \ + void update_flag() { \ + assert(enabled(), "Must be."); \ + /* dep must be declared before */ \ + assert((uintptr_t)(this) > \ + (uintptr_t)(&dep), "Invalid"); \ + if (FLAG_IS_DEFAULT(flag)) { \ + if (dep.enabled()) { \ + FLAG_SET_DEFAULT(flag, true); \ + } else { \ + FLAG_SET_DEFAULT(flag, false); \ + /* Sync CPU features with flags */ \ + disable_feature(); \ + } \ + } else { \ + /* Sync CPU features with flags */ \ + if (!flag) { \ + disable_feature(); \ + } \ + } \ + } \ #define NO_UPDATE_DEFAULT \ void update_flag() {} \ @@ -151,7 +153,8 @@ // mvendorid Manufactory JEDEC id encoded, ISA vol 2 3.1.2.. // marchid Id for microarch. Mvendorid plus marchid uniquely identify the microarch. // mimpid A unique encoding of the version of the processor implementation. - // unaligned_access Unaligned memory accesses (unknown, unspported, emulated, slow, firmware, fast) + // unaligned_scalar Performance of misaligned scalar accesses (unknown, emulated, slow, fast, unsupported) + // unaligned_vector Performance of misaligned vector accesses (unknown, unspported, slow, fast) // satp mode SATP bits (number of virtual addr bits) mbare, sv39, sv48, sv57, sv64 public: @@ -160,45 +163,47 @@ // Note: the order matters, depender should be after their dependee. E.g. ext_V before ext_Zvbb. // declaration name , extension name, bit pos ,in str, mapped flag) - #define RV_FEATURE_FLAGS(decl) \ - decl(ext_I , "i" , ('I' - 'A'), true , NO_UPDATE_DEFAULT) \ - decl(ext_M , "m" , ('M' - 'A'), true , NO_UPDATE_DEFAULT) \ - decl(ext_A , "a" , ('A' - 'A'), true , NO_UPDATE_DEFAULT) \ - decl(ext_F , "f" , ('F' - 'A'), true , NO_UPDATE_DEFAULT) \ - decl(ext_D , "d" , ('D' - 'A'), true , NO_UPDATE_DEFAULT) \ - decl(ext_C , "c" , ('C' - 'A'), true , UPDATE_DEFAULT(UseRVC)) \ - decl(ext_Q , "q" , ('Q' - 'A'), true , NO_UPDATE_DEFAULT) \ - decl(ext_H , "h" , ('H' - 'A'), true , NO_UPDATE_DEFAULT) \ - decl(ext_V , "v" , ('V' - 'A'), true , UPDATE_DEFAULT(UseRVV)) \ - decl(ext_Zicbom , "Zicbom" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicbom)) \ - decl(ext_Zicboz , "Zicboz" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicboz)) \ - decl(ext_Zicbop , "Zicbop" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicbop)) \ - decl(ext_Zba , "Zba" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZba)) \ - decl(ext_Zbb , "Zbb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZbb)) \ - decl(ext_Zbc , "Zbc" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \ - decl(ext_Zbs , "Zbs" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZbs)) \ - decl(ext_Zbkb , "Zbkb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZbkb)) \ - decl(ext_Zcb , "Zcb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZcb)) \ - decl(ext_Zfa , "Zfa" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZfa)) \ - decl(ext_Zfh , "Zfh" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZfh)) \ - decl(ext_Zfhmin , "Zfhmin" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZfhmin)) \ - decl(ext_Zicsr , "Zicsr" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \ - decl(ext_Zicntr , "Zicntr" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \ - decl(ext_Zifencei , "Zifencei" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \ - decl(ext_Zic64b , "Zic64b" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZic64b)) \ - decl(ext_Ztso , "Ztso" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZtso)) \ - decl(ext_Zihintpause , "Zihintpause" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZihintpause)) \ - decl(ext_Zacas , "Zacas" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZacas)) \ - decl(ext_Zvbb , "Zvbb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvbb, ext_V)) \ - decl(ext_Zvbc , "Zvbc" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvbc, ext_V)) \ - decl(ext_Zvfh , "Zvfh" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvfh, ext_V)) \ - decl(ext_Zvkn , "Zvkn" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvkn, ext_V)) \ - decl(ext_Zicond , "Zicond" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicond)) \ - decl(mvendorid , "VendorId" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \ - decl(marchid , "ArchId" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \ - decl(mimpid , "ImpId" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \ - decl(unaligned_access, "Unaligned" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \ - decl(satp_mode , "SATP" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \ + #define RV_FEATURE_FLAGS(decl) \ + decl(ext_I , "i" , ('I' - 'A'), true , NO_UPDATE_DEFAULT) \ + decl(ext_M , "m" , ('M' - 'A'), true , NO_UPDATE_DEFAULT) \ + decl(ext_A , "a" , ('A' - 'A'), true , NO_UPDATE_DEFAULT) \ + decl(ext_F , "f" , ('F' - 'A'), true , NO_UPDATE_DEFAULT) \ + decl(ext_D , "d" , ('D' - 'A'), true , NO_UPDATE_DEFAULT) \ + decl(ext_C , "c" , ('C' - 'A'), true , UPDATE_DEFAULT(UseRVC)) \ + decl(ext_Q , "q" , ('Q' - 'A'), true , NO_UPDATE_DEFAULT) \ + decl(ext_H , "h" , ('H' - 'A'), true , NO_UPDATE_DEFAULT) \ + decl(ext_V , "v" , ('V' - 'A'), true , UPDATE_DEFAULT(UseRVV)) \ + decl(ext_Zicbom , "Zicbom" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicbom)) \ + decl(ext_Zicboz , "Zicboz" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicboz)) \ + decl(ext_Zicbop , "Zicbop" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicbop)) \ + decl(ext_Zba , "Zba" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZba)) \ + decl(ext_Zbb , "Zbb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZbb)) \ + decl(ext_Zbc , "Zbc" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \ + decl(ext_Zbs , "Zbs" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZbs)) \ + decl(ext_Zbkb , "Zbkb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZbkb)) \ + decl(ext_Zcb , "Zcb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZcb)) \ + decl(ext_Zfa , "Zfa" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZfa)) \ + decl(ext_Zfh , "Zfh" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZfh)) \ + decl(ext_Zfhmin , "Zfhmin" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZfhmin)) \ + decl(ext_Zicsr , "Zicsr" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \ + decl(ext_Zicntr , "Zicntr" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \ + decl(ext_Zifencei , "Zifencei" , RV_NO_FLAG_BIT, true , NO_UPDATE_DEFAULT) \ + decl(ext_Zic64b , "Zic64b" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZic64b)) \ + decl(ext_Ztso , "Ztso" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZtso)) \ + decl(ext_Zihintpause , "Zihintpause" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZihintpause)) \ + decl(ext_Zacas , "Zacas" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZacas)) \ + decl(ext_Zvbb , "Zvbb" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvbb, ext_V)) \ + decl(ext_Zvbc , "Zvbc" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvbc, ext_V)) \ + decl(ext_Zvfh , "Zvfh" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvfh, ext_V)) \ + decl(ext_Zvkn , "Zvkn" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT_DEP(UseZvkn, ext_V)) \ + decl(ext_Zicond , "Zicond" , RV_NO_FLAG_BIT, true , UPDATE_DEFAULT(UseZicond)) \ + decl(mvendorid , "VendorId" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \ + decl(marchid , "ArchId" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \ + decl(mimpid , "ImpId" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \ + decl(satp_mode , "SATP" , RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \ + decl(unaligned_scalar , "UnalignedScalar", RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \ + decl(unaligned_vector , "UnalignedVector", RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \ + decl(zicboz_block_size, "ZicbozBlockSize", RV_NO_FLAG_BIT, false, NO_UPDATE_DEFAULT) \ #define DECLARE_RV_FEATURE(NAME, PRETTY, BIT, FSTRING, FLAGF) \ struct NAME##RVFeatureValue : public RVFeatureValue { \ @@ -273,12 +278,19 @@ static VM_MODE parse_satp_mode(const char* vm_mode); // Values from riscv_hwprobe() - enum UNALIGNED_ACCESS : int { - MISALIGNED_UNKNOWN = 0, - MISALIGNED_EMULATED = 1, - MISALIGNED_SLOW = 2, - MISALIGNED_FAST = 3, - MISALIGNED_UNSUPPORTED = 4 + enum UNALIGNED_SCALAR_ACCESS : int { + MISALIGNED_SCALAR_UNKNOWN = 0, + MISALIGNED_SCALAR_EMULATED = 1, + MISALIGNED_SCALAR_SLOW = 2, + MISALIGNED_SCALAR_FAST = 3, + MISALIGNED_SCALAR_UNSUPPORTED = 4 + }; + + enum UNALIGNED_VECTOR_ACCESS : int { + MISALIGNED_VECTOR_UNKNOWN = 0, + MISALIGNED_VECTOR_SLOW = 2, + MISALIGNED_VECTOR_FAST = 3, + MISALIGNED_VECTOR_UNSUPPORTED = 4 }; // Null terminated list diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/s390/gc/g1/g1_s390.ad openjdk-25-25.0.2+10/src/hotspot/cpu/s390/gc/g1/g1_s390.ad --- openjdk-25-25.0.1+8/src/hotspot/cpu/s390/gc/g1/g1_s390.ad 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/s390/gc/g1/g1_s390.ad 2025-12-18 08:04:02.000000000 +0000 @@ -356,7 +356,7 @@ __ 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 -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/x86/assembler_x86.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/x86/assembler_x86.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/x86/assembler_x86.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/x86/assembler_x86.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1398,11 +1398,7 @@ void Assembler::eaddl(Register dst, Address src1, Register src2, bool no_flags) { InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit); - eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); - emit_int8(0x01); - emit_operand(src2, src1, 0); + emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x01, no_flags, false /* is_map1 */, true /* is_commutative */); } void Assembler::addl(Register dst, int32_t imm32) { @@ -1432,11 +1428,7 @@ } void Assembler::eaddl(Register dst, Register src1, Register src2, bool no_flags) { - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - // NDD shares its encoding bits with NDS bits for regular EVEX instruction. - // Therefore, DST is passed as the second argument to minimize changes in the leaf level routine. - (void)emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); - emit_arith(0x03, 0xC0, src1, src2); + emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x03, 0xC0, no_flags, true /* is_commutative */); } void Assembler::addr_nop_4() { @@ -1657,17 +1649,18 @@ emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x23, no_flags); } +void Assembler::eandl(Register dst, Address src1, Register src2, bool no_flags) { + InstructionMark im(this); + emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x21, no_flags, false /* is_map1 */, true /* is_commutative */); +} + void Assembler::andl(Register dst, Register src) { (void) prefix_and_encode(dst->encoding(), src->encoding()); emit_arith(0x23, 0xC0, dst, src); } void Assembler::eandl(Register dst, Register src1, Register src2, bool no_flags) { - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - // NDD shares its encoding bits with NDS bits for regular EVEX instruction. - // Therefore, DST is passed as the second argument to minimize changes in the leaf level routine. - (void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); - emit_arith(0x23, 0xC0, src1, src2); + emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x23, 0xC0, no_flags, true /* is_commutative */); } void Assembler::andnl(Register dst, Register src1, Register src2) { @@ -2519,7 +2512,7 @@ } void Assembler::eimull(Register dst, Register src1, Register src2, bool no_flags) { - emit_eevex_or_demote(dst->encoding(), src1->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0xAF, no_flags, true /* is_map1 */, true /* swap */); + emit_eevex_or_demote(dst->encoding(), src1->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0xAF, no_flags, true /* is_map1 */, true /* swap */, true /* is_commutative */); } void Assembler::imull(Register dst, Address src, int32_t value) { @@ -4419,11 +4412,7 @@ } void Assembler::eorw(Register dst, Register src1, Register src2, bool no_flags) { - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - // NDD shares its encoding bits with NDS bits for regular EVEX instruction. - // Therefore, DST is passed as the second argument to minimize changes in the leaf level routine. - (void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); - emit_arith(0x0B, 0xC0, src1, src2); + emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_66, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_16bit, 0x0B, 0xC0, no_flags, true /* is_commutative */); } void Assembler::orl(Address dst, int32_t imm32) { @@ -4467,11 +4456,7 @@ } void Assembler::eorl(Register dst, Register src1, Register src2, bool no_flags) { - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - // NDD shares its encoding bits with NDS bits for regular EVEX instruction. - // Therefore, DST is passed as the second argument to minimize changes in the leaf level routine. - (void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); - emit_arith(0x0B, 0xC0, src1, src2); + emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x0B, 0xC0, no_flags, true /* is_commutative */); } void Assembler::orl(Address dst, Register src) { @@ -4483,11 +4468,7 @@ void Assembler::eorl(Register dst, Address src1, Register src2, bool no_flags) { InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit); - eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); - emit_int8(0x09); - emit_operand(src2, src1, 0); + emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x09, no_flags, false /* is_map1 */, true /* is_commutative */); } void Assembler::orb(Address dst, int imm8) { @@ -4517,11 +4498,7 @@ void Assembler::eorb(Register dst, Address src1, Register src2, bool no_flags) { InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_8bit); - eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); - emit_int8(0x08); - emit_operand(src2, src1, 0); + emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_8bit, 0x08, no_flags, false /* is_map1 */, true /* is_commutative */); } void Assembler::packsswb(XMMRegister dst, XMMRegister src) { @@ -7323,11 +7300,7 @@ } void Assembler::exorl(Register dst, Register src1, Register src2, bool no_flags) { - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - // NDD shares its encoding bits with NDS bits for regular EVEX instruction. - // Therefore, DST is passed as the second argument to minimize changes in the leaf level routine. - (void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); - emit_arith(0x33, 0xC0, src1, src2); + emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x33, 0xC0, no_flags, true /* is_commutative */); } void Assembler::xorl(Address dst, Register src) { @@ -7339,11 +7312,7 @@ void Assembler::exorl(Register dst, Address src1, Register src2, bool no_flags) { InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit); - eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); - emit_int8(0x31); - emit_operand(src2, src1, 0); + emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_32bit, 0x31, no_flags, false /* is_map1 */, true /* is_commutative */); } void Assembler::xorb(Register dst, Address src) { @@ -7367,11 +7336,7 @@ void Assembler::exorb(Register dst, Address src1, Register src2, bool no_flags) { InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_8bit); - eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); - emit_int8(0x30); - emit_operand(src2, src1, 0); + emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_8bit, 0x30, no_flags, false /* is_map1 */, true /* is_commutative */); } void Assembler::xorw(Register dst, Address src) { @@ -12891,6 +12856,31 @@ vex_prefix(adr, ndd_enc, xreg_enc, pre, opc, attributes, /* nds_is_ndd */ true, no_flags); } +void Assembler::emit_eevex_or_demote(Register dst, Address src1, Register src2, VexSimdPrefix pre, VexOpcode opc, + int size, int opcode_byte, bool no_flags, bool is_map1, bool is_commutative) { + if (is_commutative && is_demotable(no_flags, dst->encoding(), src2->encoding())) { + // Opcode byte adjustment due to mismatch between NDD and equivalent demotable variant + opcode_byte += 2; + if (size == EVEX_64bit) { + emit_prefix_and_int8(get_prefixq(src1, dst, is_map1), opcode_byte); + } else { + // For 32-bit, 16-bit and 8-bit + if (size == EVEX_16bit) { + emit_int8(0x66); + } + prefix(src1, dst, false, is_map1); + emit_int8(opcode_byte); + } + } else { + bool vex_w = (size == EVEX_64bit) ? true : false; + InstructionAttr attributes(AVX_128bit, vex_w, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); + attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, size); + eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), pre, opc, &attributes, no_flags); + emit_int8(opcode_byte); + } + emit_operand(src2, src1, 0); +} + void Assembler::emit_eevex_or_demote(Register dst, Register src1, Address src2, VexSimdPrefix pre, VexOpcode opc, int size, int opcode_byte, bool no_flags, bool is_map1) { if (is_demotable(no_flags, dst->encoding(), src1->encoding())) { @@ -12991,18 +12981,20 @@ } void Assembler::emit_eevex_or_demote(int dst_enc, int nds_enc, int src_enc, VexSimdPrefix pre, VexOpcode opc, - int size, int opcode_byte, bool no_flags, bool is_map1, bool swap) { + int size, int opcode_byte, bool no_flags, bool is_map1, bool swap, bool is_commutative) { int encode; bool is_prefixq = (size == EVEX_64bit) ? true : false; - if (is_demotable(no_flags, dst_enc, nds_enc)) { + bool first_operand_demotable = is_demotable(no_flags, dst_enc, nds_enc); + bool second_operand_demotable = is_commutative && is_demotable(no_flags, dst_enc, src_enc); + if (first_operand_demotable || second_operand_demotable) { if (size == EVEX_16bit) { emit_int8(0x66); } - + int src = first_operand_demotable ? src_enc : nds_enc; if (swap) { - encode = is_prefixq ? prefixq_and_encode(dst_enc, src_enc, is_map1) : prefix_and_encode(dst_enc, src_enc, is_map1); + encode = is_prefixq ? prefixq_and_encode(dst_enc, src, is_map1) : prefix_and_encode(dst_enc, src, is_map1); } else { - encode = is_prefixq ? prefixq_and_encode(src_enc, dst_enc, is_map1) : prefix_and_encode(src_enc, dst_enc, is_map1); + encode = is_prefixq ? prefixq_and_encode(src, dst_enc, is_map1) : prefix_and_encode(src, dst_enc, is_map1); } emit_opcode_prefix_and_encoding((unsigned char)opcode_byte, 0xC0, encode); } else { @@ -13050,6 +13042,26 @@ return vex_prefix_and_encode(dst_enc, nds_enc, src_enc, pre, opc, attributes, /* src_is_gpr */ true, /* nds_is_ndd */ false, no_flags); } +void Assembler::emit_eevex_prefix_or_demote_arith_ndd(Register dst, Register src1, Register src2, VexSimdPrefix pre, VexOpcode opc, + int size, int op1, int op2, bool no_flags, bool is_commutative) { + bool demotable = is_demotable(no_flags, dst->encoding(), src1->encoding()); + if (!demotable && is_commutative) { + if (is_demotable(no_flags, dst->encoding(), src2->encoding())) { + // swap src1 and src2 + Register tmp = src1; + src1 = src2; + src2 = tmp; + } + } + bool vex_w = (size == EVEX_64bit) ? true : false; + bool use_prefixq = vex_w; + InstructionAttr attributes(AVX_128bit, vex_w, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); + // NDD shares its encoding bits with NDS bits for regular EVEX instruction. + // Therefore, DST is passed as the second argument to minimize changes in the leaf level routine. + (void)emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), pre, opc, &attributes, no_flags, use_prefixq); + emit_arith(op1, op2, src1, src2); +} + void Assembler::emit_eevex_prefix_or_demote_arith_ndd(Register dst, Register nds, int32_t imm32, VexSimdPrefix pre, VexOpcode opc, int size, int op1, int op2, bool no_flags) { int dst_enc = dst->encoding(); @@ -13060,7 +13072,6 @@ } else { bool vex_w = (size == EVEX_64bit) ? true : false; InstructionAttr attributes(AVX_128bit, vex_w, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - //attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, size); attributes.set_is_evex_instruction(); vex_prefix_and_encode(0, dst_enc, nds_enc, pre, opc, &attributes, /* src_is_gpr */ true, /* nds_is_ndd */ true, no_flags); @@ -13689,7 +13700,7 @@ void Assembler::sarxl(Register dst, Register src1, Register src2) { assert(VM_Version::supports_bmi2(), ""); - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); + InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src1->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F_38, &attributes, true); emit_int16((unsigned char)0xF7, (0xC0 | encode)); } @@ -13697,7 +13708,7 @@ void Assembler::sarxl(Register dst, Address src1, Register src2) { assert(VM_Version::supports_bmi2(), ""); InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); + InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit); vex_prefix(src1, src2->encoding(), dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F_38, &attributes); emit_int8((unsigned char)0xF7); @@ -13706,7 +13717,7 @@ void Assembler::sarxq(Register dst, Register src1, Register src2) { assert(VM_Version::supports_bmi2(), ""); - InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); + InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src1->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F_38, &attributes, true); emit_int16((unsigned char)0xF7, (0xC0 | encode)); } @@ -13714,7 +13725,7 @@ void Assembler::sarxq(Register dst, Address src1, Register src2) { assert(VM_Version::supports_bmi2(), ""); InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); + InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit); vex_prefix(src1, src2->encoding(), dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F_38, &attributes); emit_int8((unsigned char)0xF7); @@ -13723,7 +13734,7 @@ void Assembler::shlxl(Register dst, Register src1, Register src2) { assert(VM_Version::supports_bmi2(), ""); - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); + InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src1->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes, true); emit_int16((unsigned char)0xF7, (0xC0 | encode)); } @@ -13731,7 +13742,7 @@ void Assembler::shlxl(Register dst, Address src1, Register src2) { assert(VM_Version::supports_bmi2(), ""); InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); + InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit); vex_prefix(src1, src2->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes); emit_int8((unsigned char)0xF7); @@ -13740,7 +13751,7 @@ void Assembler::shlxq(Register dst, Register src1, Register src2) { assert(VM_Version::supports_bmi2(), ""); - InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); + InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src1->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes, true); emit_int16((unsigned char)0xF7, (0xC0 | encode)); } @@ -13748,7 +13759,7 @@ void Assembler::shlxq(Register dst, Address src1, Register src2) { assert(VM_Version::supports_bmi2(), ""); InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); + InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit); vex_prefix(src1, src2->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes); emit_int8((unsigned char)0xF7); @@ -13757,7 +13768,7 @@ void Assembler::shrxl(Register dst, Register src1, Register src2) { assert(VM_Version::supports_bmi2(), ""); - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); + InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src1->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F_38, &attributes, true); emit_int16((unsigned char)0xF7, (0xC0 | encode)); } @@ -13765,7 +13776,7 @@ void Assembler::shrxl(Register dst, Address src1, Register src2) { assert(VM_Version::supports_bmi2(), ""); InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); + InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_32bit); vex_prefix(src1, src2->encoding(), dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F_38, &attributes); emit_int8((unsigned char)0xF7); @@ -13774,7 +13785,7 @@ void Assembler::shrxq(Register dst, Register src1, Register src2) { assert(VM_Version::supports_bmi2(), ""); - InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); + InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); int encode = vex_prefix_and_encode(dst->encoding(), src2->encoding(), src1->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F_38, &attributes, true); emit_int16((unsigned char)0xF7, (0xC0 | encode)); } @@ -13782,7 +13793,7 @@ void Assembler::shrxq(Register dst, Address src1, Register src2) { assert(VM_Version::supports_bmi2(), ""); InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); + InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit); vex_prefix(src1, src2->encoding(), dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F_38, &attributes); emit_int8((unsigned char)0xF7); @@ -14543,11 +14554,7 @@ void Assembler::eaddq(Register dst, Address src1, Register src2, bool no_flags) { InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit); - eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); - emit_int8(0x01); - emit_operand(src2, src1, 0); + emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x01, no_flags, false /* is_map1 */, true /* is_commutative */); } void Assembler::addq(Register dst, int32_t imm32) { @@ -14576,11 +14583,7 @@ } void Assembler::eaddq(Register dst, Register src1, Register src2, bool no_flags) { - InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - // NDD shares its encoding bits with NDS bits for regular EVEX instruction. - // Therefore, DST is passed as the second argument to minimize changes in the leaf level routine. - (void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags, true /* use_prefixq */); - emit_arith(0x03, 0xC0, src1, src2); + emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x03, 0xC0, no_flags, true /* is_commutative */); } void Assembler::adcxq(Register dst, Register src) { @@ -14673,11 +14676,7 @@ } void Assembler::eandq(Register dst, Register src1, Register src2, bool no_flags) { - InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - // NDD shares its encoding bits with NDS bits for regular EVEX instruction. - // Therefore, DST is passed as the second argument to minimize changes in the leaf level routine. - (void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags, true /* use_prefixq */); - emit_arith(0x23, 0xC0, src1, src2); + emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x23, 0xC0, no_flags, true /* is_commutative */); } void Assembler::andq(Address dst, Register src) { @@ -14688,11 +14687,7 @@ void Assembler::eandq(Register dst, Address src1, Register src2, bool no_flags) { InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit); - eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); - emit_int8(0x21); - emit_operand(src2, src1, 0); + emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x21, no_flags, false /* is_map1 */, true /* is_commutative */); } void Assembler::andnq(Register dst, Register src1, Register src2) { @@ -15038,7 +15033,7 @@ } void Assembler::eimulq(Register dst, Register src1, Register src2, bool no_flags) { - emit_eevex_or_demote(dst->encoding(), src1->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0xAF, no_flags, true /* is_map1 */, true /* swap */); + emit_eevex_or_demote(dst->encoding(), src1->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0xAF, no_flags, true /* is_map1 */, true /* swap */, true /* is_commutative */); } void Assembler::imulq(Register src) { @@ -15500,11 +15495,7 @@ void Assembler::eorq(Register dst, Address src1, Register src2, bool no_flags) { InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit); - eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); - emit_int8(0x09); - emit_operand(src2, src1, 0); + emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x09, no_flags, false /* is_map1 */, true /* is_commutative */); } void Assembler::orq(Register dst, int32_t imm32) { @@ -15544,13 +15535,8 @@ } void Assembler::eorq(Register dst, Register src1, Register src2, bool no_flags) { - InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - // NDD shares its encoding bits with NDS bits for regular EVEX instruction. - // Therefore, DST is passed as the second argument to minimize changes in the leaf level routine. - (void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags, true /* use_prefixq */); - emit_arith(0x0B, 0xC0, src1, src2); + emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x0B, 0xC0, no_flags, true /* is_commutative */); } - void Assembler::popcntq(Register dst, Address src) { assert(VM_Version::supports_popcnt(), "must support"); InstructionMark im(this); @@ -16292,11 +16278,7 @@ } void Assembler::exorq(Register dst, Register src1, Register src2, bool no_flags) { - InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - // NDD shares its encoding bits with NDS bits for regular EVEX instruction. - // Therefore, DST is passed as the second argument to minimize changes in the leaf level routine. - (void) emit_eevex_prefix_or_demote_ndd(src1->encoding(), dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags, true /* use_prefixq */); - emit_arith(0x33, 0xC0, src1, src2); + emit_eevex_prefix_or_demote_arith_ndd(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x33, 0xC0, no_flags, true /* is_commutative */); } void Assembler::xorq(Register dst, Address src) { @@ -16350,11 +16332,7 @@ void Assembler::exorq(Register dst, Address src1, Register src2, bool no_flags) { InstructionMark im(this); - InstructionAttr attributes(AVX_128bit, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); - attributes.set_address_attributes(/* tuple_type */ EVEX_NOSCALE, /* input_size_in_bits */ EVEX_64bit); - eevex_prefix_ndd(src1, dst->encoding(), src2->encoding(), VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, &attributes, no_flags); - emit_int8(0x31); - emit_operand(src2, src1, 0); + emit_eevex_or_demote(dst, src1, src2, VEX_SIMD_NONE, VEX_OPCODE_0F_3C /* MAP4 */, EVEX_64bit, 0x31, no_flags, false /* is_map1 */, true /* is_commutative */); } void InstructionAttr::set_address_attributes(int tuple_type, int input_size_in_bits) { diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/x86/assembler_x86.hpp openjdk-25-25.0.2+10/src/hotspot/cpu/x86/assembler_x86.hpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/x86/assembler_x86.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/x86/assembler_x86.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -796,14 +796,20 @@ int emit_eevex_prefix_or_demote_ndd(int dst_enc, int nds_enc, VexSimdPrefix pre, VexOpcode opc, InstructionAttr *attributes, bool no_flags = false, bool use_prefixq = false); + void emit_eevex_prefix_or_demote_arith_ndd(Register dst, Register src1, Register src2, VexSimdPrefix pre, VexOpcode opc, + int size, int op1, int op2, bool no_flags = false, bool is_commutative = false); + void emit_eevex_prefix_or_demote_arith_ndd(Register dst, Register nds, int32_t imm32, VexSimdPrefix pre, VexOpcode opc, int size, int op1, int op2, bool no_flags); void emit_eevex_or_demote(Register dst, Register src1, Address src2, VexSimdPrefix pre, VexOpcode opc, int size, int opcode_byte, bool no_flags = false, bool is_map1 = false); + void emit_eevex_or_demote(Register dst, Address src1, Register src2, VexSimdPrefix pre, VexOpcode opc, + int size, int opcode_byte, bool no_flags = false, bool is_map1 = false, bool is_commutative = false); + void emit_eevex_or_demote(int dst_enc, int nds_enc, int src_enc, VexSimdPrefix pre, VexOpcode opc, - int size, int opcode_byte, bool no_flags, bool is_map1 = false, bool swap = false); + int size, int opcode_byte, bool no_flags, bool is_map1 = false, bool swap = false, bool is_commutative = false); void emit_eevex_or_demote(int dst_enc, int nds_enc, int src_enc, int8_t imm8, VexSimdPrefix pre, VexOpcode opc, int size, int opcode_byte, bool no_flags, bool is_map1 = false); @@ -1138,6 +1144,7 @@ void eandl(Register dst, Register src, int32_t imm32, bool no_flags); void andl(Register dst, Address src); void eandl(Register dst, Register src1, Address src2, bool no_flags); + void eandl(Register dst, Address src1, Register src2, bool no_flags); void andl(Register dst, Register src); void eandl(Register dst, Register src1, Register src2, bool no_flags); void andl(Address dst, Register src); diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/x86/methodHandles_x86.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/x86/methodHandles_x86.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/x86/methodHandles_x86.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/x86/methodHandles_x86.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -137,7 +137,7 @@ case vmIntrinsicID::_invokeBasic: // Require compiled LambdaForm class to be fully initialized. __ cmpb(Address(method_holder, InstanceKlass::init_state_offset()), InstanceKlass::fully_initialized); - __ jccb(Assembler::equal, L_ok); + __ jcc(Assembler::equal, L_ok); break; case vmIntrinsicID::_linkToStatic: @@ -154,7 +154,7 @@ // init_state check failed, but it may be an abstract interface method __ load_unsigned_short(temp, Address(method, Method::access_flags_offset())); __ testl(temp, JVM_ACC_ABSTRACT); - __ jccb(Assembler::notZero, L_ok); + __ jcc(Assembler::notZero, L_ok); break; default: diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/x86/stubGenerator_x86_64.hpp openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64.hpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/x86/stubGenerator_x86_64.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -393,6 +393,8 @@ XMMRegister xmm5, XMMRegister xmm6, XMMRegister xmm7, XMMRegister xmm8); void ghash_last_8_avx2(Register subkeyHtbl); + void check_key_offset(Register key, int offset, int load_size); + // Load key and shuffle operation void ev_load_key(XMMRegister xmmdst, Register key, int offset, XMMRegister xmm_shuf_mask); void ev_load_key(XMMRegister xmmdst, Register key, int offset, Register rscratch); diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64_aes.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1759,25 +1759,43 @@ __ vaesdeclast(xmm8, xmm8, xmm_reg, Assembler::AVX_512bit); } +// Check incoming byte offset against the int[] len. key is the pointer to the int[0]. +// This check happens often, so it is important for it to be very compact. +void StubGenerator::check_key_offset(Register key, int offset, int load_size) { +#ifdef ASSERT + Address key_length(key, arrayOopDesc::length_offset_in_bytes() - arrayOopDesc::base_offset_in_bytes(T_INT)); + assert((offset + load_size) % 4 == 0, "Alignment is good: %d + %d", offset, load_size); + int end_offset = (offset + load_size) / 4; + Label L_good; + __ cmpl(key_length, end_offset); + __ jccb(Assembler::greaterEqual, L_good); + __ hlt(); + __ bind(L_good); +#endif +} // Utility routine for loading a 128-bit key word in little endian format void StubGenerator::load_key(XMMRegister xmmdst, Register key, int offset, XMMRegister xmm_shuf_mask) { + check_key_offset(key, offset, 16); __ movdqu(xmmdst, Address(key, offset)); __ pshufb(xmmdst, xmm_shuf_mask); } void StubGenerator::load_key(XMMRegister xmmdst, Register key, int offset, Register rscratch) { + check_key_offset(key, offset, 16); __ movdqu(xmmdst, Address(key, offset)); __ pshufb(xmmdst, ExternalAddress(key_shuffle_mask_addr()), rscratch); } void StubGenerator::ev_load_key(XMMRegister xmmdst, Register key, int offset, XMMRegister xmm_shuf_mask) { + check_key_offset(key, offset, 16); __ movdqu(xmmdst, Address(key, offset)); __ pshufb(xmmdst, xmm_shuf_mask); __ evshufi64x2(xmmdst, xmmdst, xmmdst, 0x0, Assembler::AVX_512bit); } void StubGenerator::ev_load_key(XMMRegister xmmdst, Register key, int offset, Register rscratch) { + check_key_offset(key, offset, 16); __ movdqu(xmmdst, Address(key, offset)); __ pshufb(xmmdst, ExternalAddress(key_shuffle_mask_addr()), rscratch); __ evshufi64x2(xmmdst, xmmdst, xmmdst, 0x0, Assembler::AVX_512bit); @@ -3205,12 +3223,12 @@ //AES round 9 roundEncode(AESKEY2, B00_03, B04_07, B08_11, B12_15); - ev_load_key(AESKEY2, key, 11 * 16, rbx); //AES rounds up to 11 (AES192) or 13 (AES256) //AES128 is done __ cmpl(NROUNDS, 52); __ jcc(Assembler::less, last_aes_rnd); __ bind(aes_192); + ev_load_key(AESKEY2, key, 11 * 16, rbx); roundEncode(AESKEY1, B00_03, B04_07, B08_11, B12_15); ev_load_key(AESKEY1, key, 12 * 16, rbx); roundEncode(AESKEY2, B00_03, B04_07, B08_11, B12_15); diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/x86/stubGenerator_x86_64_exp.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64_exp.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/x86/stubGenerator_x86_64_exp.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64_exp.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2016, 2024, Intel Corporation. All rights reserved. -* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. +* Copyright (C) 2021, Tencent. All rights reserved. * Intel Math Library (LIBM) Source Code * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/x86/stubGenerator_x86_64_log.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64_log.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/x86/stubGenerator_x86_64_log.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64_log.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2016, 2024, Intel Corporation. All rights reserved. -* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. +* Copyright (C) 2021, Tencent. All rights reserved. * Intel Math Library (LIBM) Source Code * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/x86/stubGenerator_x86_64_pow.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64_pow.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/x86/stubGenerator_x86_64_pow.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/x86/stubGenerator_x86_64_pow.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2016, 2024, Intel Corporation. All rights reserved. -* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. +* Copyright (C) 2021, Tencent. All rights reserved. * Intel Math Library (LIBM) Source Code * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/x86/templateInterpreterGenerator_x86_64.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/x86/templateInterpreterGenerator_x86_64.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/x86/templateInterpreterGenerator_x86_64.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/x86/templateInterpreterGenerator_x86_64.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -465,13 +465,19 @@ __ call_VM_leaf0(CAST_FROM_FN_PTR(address, SharedRuntime::dtan)); } } else if (kind == Interpreter::java_lang_math_tanh) { - assert(StubRoutines::dtanh() != nullptr, "not initialized"); + if (StubRoutines::dtanh() != nullptr) { __ movdbl(xmm0, Address(rsp, wordSize)); __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dtanh()))); + } else { + return nullptr; // Fallback to default implementation + } } else if (kind == Interpreter::java_lang_math_cbrt) { - assert(StubRoutines::dcbrt() != nullptr, "not initialized"); - __ movdbl(xmm0, Address(rsp, wordSize)); - __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dcbrt()))); + if (StubRoutines::dcbrt() != nullptr) { + __ movdbl(xmm0, Address(rsp, wordSize)); + __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, StubRoutines::dcbrt()))); + } else { + return nullptr; // Fallback to default implementation + } } else if (kind == Interpreter::java_lang_math_abs) { assert(StubRoutines::x86::double_sign_mask() != nullptr, "not initialized"); __ movdbl(xmm0, Address(rsp, wordSize)); diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/x86/vm_version_x86.cpp openjdk-25-25.0.2+10/src/hotspot/cpu/x86/vm_version_x86.cpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/x86/vm_version_x86.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/x86/vm_version_x86.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -138,7 +138,7 @@ const uint32_t CPU_FAMILY_486 = (4 << CPU_FAMILY_SHIFT); bool use_evex = FLAG_IS_DEFAULT(UseAVX) || (UseAVX > 2); - Label detect_486, cpu486, detect_586, std_cpuid1, std_cpuid4, std_cpuid24; + Label detect_486, cpu486, detect_586, std_cpuid1, std_cpuid4, std_cpuid24, std_cpuid29; Label sef_cpuid, sefsl1_cpuid, ext_cpuid, ext_cpuid1, ext_cpuid5, ext_cpuid7; Label ext_cpuid8, done, wrapup, vector_save_restore, apx_save_restore_warning; Label legacy_setup, save_restore_except, legacy_save_restore, start_simd_check; @@ -338,6 +338,16 @@ __ movl(Address(rsi, 4), rdx); // + // cpuid(0x29) APX NCI NDD NF (EAX = 29H, ECX = 0). + // + __ bind(std_cpuid29); + __ movl(rax, 0x29); + __ movl(rcx, 0); + __ cpuid(); + __ lea(rsi, Address(rbp, in_bytes(VM_Version::std_cpuid29_offset()))); + __ movl(Address(rsi, 0), rbx); + + // // cpuid(0x24) Converged Vector ISA Main Leaf (EAX = 24H, ECX = 0). // __ bind(std_cpuid24); @@ -1015,16 +1025,6 @@ _features.clear_feature(CPU_AVX10_2); } - // Currently APX support is only enabled for targets supporting AVX512VL feature. - bool apx_supported = os_supports_apx_egprs() && supports_apx_f() && supports_avx512vl(); - if (UseAPX && !apx_supported) { - warning("UseAPX is not supported on this CPU, setting it to false"); - FLAG_SET_DEFAULT(UseAPX, false); - } - - if (!UseAPX) { - _features.clear_feature(CPU_APX_F); - } if (UseAVX < 2) { _features.clear_feature(CPU_AVX2); @@ -1048,6 +1048,7 @@ _features.clear_feature(CPU_VZEROUPPER); _features.clear_feature(CPU_AVX512BW); _features.clear_feature(CPU_AVX512VL); + _features.clear_feature(CPU_APX_F); _features.clear_feature(CPU_AVX512DQ); _features.clear_feature(CPU_AVX512_VNNI); _features.clear_feature(CPU_AVX512_VAES); @@ -1067,8 +1068,20 @@ } } + // Currently APX support is only enabled for targets supporting AVX512VL feature. + bool apx_supported = os_supports_apx_egprs() && supports_apx_f() && supports_avx512vl(); + if (UseAPX && !apx_supported) { + warning("UseAPX is not supported on this CPU, setting it to false"); + FLAG_SET_DEFAULT(UseAPX, false); + } + + if (!UseAPX) { + _features.clear_feature(CPU_APX_F); + } + if (FLAG_IS_DEFAULT(IntelJccErratumMitigation)) { _has_intel_jcc_erratum = compute_has_intel_jcc_erratum(); + FLAG_SET_ERGO(IntelJccErratumMitigation, _has_intel_jcc_erratum); } else { _has_intel_jcc_erratum = IntelJccErratumMitigation; } @@ -2932,7 +2945,8 @@ if (std_cpuid1_ecx.bits.popcnt != 0) vm_features.set_feature(CPU_POPCNT); if (sefsl1_cpuid7_edx.bits.apx_f != 0 && - xem_xcr0_eax.bits.apx_f != 0) { + xem_xcr0_eax.bits.apx_f != 0 && + std_cpuid29_ebx.bits.apx_nci_ndd_nf != 0) { vm_features.set_feature(CPU_APX_F); } if (std_cpuid1_ecx.bits.avx != 0 && diff -Nru openjdk-25-25.0.1+8/src/hotspot/cpu/x86/vm_version_x86.hpp openjdk-25-25.0.2+10/src/hotspot/cpu/x86/vm_version_x86.hpp --- openjdk-25-25.0.1+8/src/hotspot/cpu/x86/vm_version_x86.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/cpu/x86/vm_version_x86.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -303,6 +303,14 @@ } bits; }; + union StdCpuidEax29Ecx0 { + uint32_t value; + struct { + uint32_t apx_nci_ndd_nf : 1, + : 31; + } bits; + }; + union StdCpuid24MainLeafEax { uint32_t value; struct { @@ -587,6 +595,10 @@ StdCpuid24MainLeafEax std_cpuid24_eax; StdCpuid24MainLeafEbx std_cpuid24_ebx; + // cpuid function 0x29 APX Advanced Performance Extensions Leaf + // eax = 0x29, ecx = 0 + StdCpuidEax29Ecx0 std_cpuid29_ebx; + // cpuid function 0xB (processor topology) // ecx = 0 uint32_t tpl_cpuidB0_eax; @@ -707,6 +719,7 @@ static ByteSize std_cpuid0_offset() { return byte_offset_of(CpuidInfo, std_max_function); } static ByteSize std_cpuid1_offset() { return byte_offset_of(CpuidInfo, std_cpuid1_eax); } static ByteSize std_cpuid24_offset() { return byte_offset_of(CpuidInfo, std_cpuid24_eax); } + static ByteSize std_cpuid29_offset() { return byte_offset_of(CpuidInfo, std_cpuid29_ebx); } static ByteSize dcp_cpuid4_offset() { return byte_offset_of(CpuidInfo, dcp_cpuid4_eax); } static ByteSize sef_cpuid7_offset() { return byte_offset_of(CpuidInfo, sef_cpuid7_eax); } static ByteSize sefsl1_cpuid7_offset() { return byte_offset_of(CpuidInfo, sefsl1_cpuid7_eax); } @@ -756,7 +769,9 @@ _features.set_feature(CPU_SSE2); _features.set_feature(CPU_VZEROUPPER); } - static void set_apx_cpuFeatures() { _features.set_feature(CPU_APX_F); } + static void set_apx_cpuFeatures() { + _features.set_feature(CPU_APX_F); + } static void set_bmi_cpuFeatures() { _features.set_feature(CPU_BMI1); _features.set_feature(CPU_BMI2); diff -Nru openjdk-25-25.0.1+8/src/hotspot/os/aix/os_aix.cpp openjdk-25-25.0.2+10/src/hotspot/os/aix/os_aix.cpp --- openjdk-25-25.0.1+8/src/hotspot/os/aix/os_aix.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/os/aix/os_aix.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -2504,7 +2504,7 @@ dummy, &dummy_size) == 0) { tid = pinfo.__pi_tid; } else { - tty->print_cr("pthread_getthrds_np failed."); + tty->print_cr("pthread_getthrds_np failed, errno: %d.", errno); error = true; } @@ -2515,7 +2515,7 @@ sys_time = thrdentry.ti_ru.ru_stime.tv_sec * 1000000000LL + thrdentry.ti_ru.ru_stime.tv_usec * 1000LL; user_time = thrdentry.ti_ru.ru_utime.tv_sec * 1000000000LL + thrdentry.ti_ru.ru_utime.tv_usec * 1000LL; } else { - tty->print_cr("pthread_getthrds_np failed."); + tty->print_cr("getthrds64 failed, errno: %d.", errno); error = true; } } diff -Nru openjdk-25-25.0.1+8/src/hotspot/os/linux/os_linux.cpp openjdk-25-25.0.2+10/src/hotspot/os/linux/os_linux.cpp --- openjdk-25-25.0.1+8/src/hotspot/os/linux/os_linux.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/os/linux/os_linux.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -349,11 +349,20 @@ return phys_mem; } +// Returns the resident set size (RSS) of the process. +// Falls back to using VmRSS from /proc/self/status if /proc/self/smaps_rollup is unavailable. +// Note: On kernels with memory cgroups or shared memory, VmRSS may underreport RSS. +// Users requiring accurate RSS values should be aware of this limitation. size_t os::rss() { size_t size = 0; - os::Linux::meminfo_t info; - if (os::Linux::query_process_memory_info(&info)) { - size = info.vmrss * K; + os::Linux::accurate_meminfo_t accurate_info; + if (os::Linux::query_accurate_process_memory_info(&accurate_info) && accurate_info.rss != -1) { + size = accurate_info.rss * K; + } else { + os::Linux::meminfo_t info; + if (os::Linux::query_process_memory_info(&info)) { + size = info.vmrss * K; + } } return size; } @@ -2346,6 +2355,37 @@ return false; } +// Accurate memory information need Linux 4.14 or newer +bool os::Linux::query_accurate_process_memory_info(os::Linux::accurate_meminfo_t* info) { + FILE* f = os::fopen("/proc/self/smaps_rollup", "r"); + if (f == nullptr) { + return false; + } + + const size_t num_values = sizeof(os::Linux::accurate_meminfo_t) / sizeof(size_t); + size_t num_found = 0; + char buf[256]; + info->rss = info->pss = info->pssdirty = info->pssanon = + info->pssfile = info->pssshmem = info->swap = info->swappss = -1; + + while (::fgets(buf, sizeof(buf), f) != nullptr && num_found < num_values) { + if ( (info->rss == -1 && sscanf(buf, "Rss: %zd kB", &info->rss) == 1) || + (info->pss == -1 && sscanf(buf, "Pss: %zd kB", &info->pss) == 1) || + (info->pssdirty == -1 && sscanf(buf, "Pss_Dirty: %zd kB", &info->pssdirty) == 1) || + (info->pssanon == -1 && sscanf(buf, "Pss_Anon: %zd kB", &info->pssanon) == 1) || + (info->pssfile == -1 && sscanf(buf, "Pss_File: %zd kB", &info->pssfile) == 1) || + (info->pssshmem == -1 && sscanf(buf, "Pss_Shmem: %zd kB", &info->pssshmem) == 1) || + (info->swap == -1 && sscanf(buf, "Swap: %zd kB", &info->swap) == 1) || + (info->swappss == -1 && sscanf(buf, "SwapPss: %zd kB", &info->swappss) == 1) + ) + { + num_found ++; + } + } + fclose(f); + return true; +} + #ifdef __GLIBC__ // For Glibc, print a one-liner with the malloc tunables. // Most important and popular is MALLOC_ARENA_MAX, but we are diff -Nru openjdk-25-25.0.1+8/src/hotspot/os/linux/os_linux.hpp openjdk-25-25.0.2+10/src/hotspot/os/linux/os_linux.hpp --- openjdk-25-25.0.1+8/src/hotspot/os/linux/os_linux.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/os/linux/os_linux.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -181,6 +181,23 @@ // fields will contain -1. static bool query_process_memory_info(meminfo_t* info); + // Output structure for query_accurate_process_memory_info() (all values in KB) + struct accurate_meminfo_t { + ssize_t rss; // current resident set size + ssize_t pss; // current proportional set size + ssize_t pssdirty; // proportional set size (dirty) + ssize_t pssanon; // proportional set size (anonymous mappings) + ssize_t pssfile; // proportional set size (file mappings) + ssize_t pssshmem; // proportional set size (shared mappings) + ssize_t swap; // swapped out + ssize_t swappss; // proportional set size (swapped out) + }; + + // Attempts to query accurate memory information from /proc/self/smaps_rollup and return it in the output structure. + // May fail (returns false) or succeed (returns true) but not all output fields are available; unavailable + // fields will contain -1. + static bool query_accurate_process_memory_info(accurate_meminfo_t* info); + // Tells if the user asked for transparent huge pages. static bool _thp_requested; diff -Nru openjdk-25-25.0.1+8/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp openjdk-25-25.0.2+10/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp --- openjdk-25-25.0.1+8/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -209,8 +209,16 @@ } intptr_t* os::fetch_bcp_from_context(const void* ucVoid) { - Unimplemented(); - return nullptr; + assert(ucVoid != nullptr, "invariant"); + const ucontext_t* uc = (const ucontext_t*)ucVoid; + assert(os::Posix::ucontext_is_interpreter(uc), "invariant"); +#if (FP_REG_NUM == 11) + assert(Rbcp == R7, "expected FP=R11, Rbcp=R7"); + return (intptr_t*)uc->uc_mcontext.arm_r7; +#else + assert(Rbcp == R11, "expected FP=R7, Rbcp=R11"); + return (intptr_t*)uc->uc_mcontext.arm_fp; // r11 +#endif } frame os::get_sender_for_C_frame(frame* fr) { diff -Nru openjdk-25-25.0.1+8/src/hotspot/os_cpu/linux_riscv/riscv_hwprobe.cpp openjdk-25-25.0.2+10/src/hotspot/os_cpu/linux_riscv/riscv_hwprobe.cpp --- openjdk-25-25.0.1+8/src/hotspot/os_cpu/linux_riscv/riscv_hwprobe.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/os_cpu/linux_riscv/riscv_hwprobe.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -89,6 +89,25 @@ #define RISCV_HWPROBE_MISALIGNED_UNSUPPORTED (4 << 0) #define RISCV_HWPROBE_MISALIGNED_MASK (7 << 0) +#define RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE 6 + +#define RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS 7 + +#define RISCV_HWPROBE_KEY_TIME_CSR_FREQ 8 + +#define RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF 9 +#define RISCV_HWPROBE_MISALIGNED_SCALAR_UNKNOWN 0 +#define RISCV_HWPROBE_MISALIGNED_SCALAR_EMULATED 1 +#define RISCV_HWPROBE_MISALIGNED_SCALAR_SLOW 2 +#define RISCV_HWPROBE_MISALIGNED_SCALAR_FAST 3 +#define RISCV_HWPROBE_MISALIGNED_SCALAR_UNSUPPORTED 4 + +#define RISCV_HWPROBE_KEY_MISALIGNED_VECTOR_PERF 10 +#define RISCV_HWPROBE_MISALIGNED_VECTOR_UNKNOWN 0 +#define RISCV_HWPROBE_MISALIGNED_VECTOR_SLOW 2 +#define RISCV_HWPROBE_MISALIGNED_VECTOR_FAST 3 +#define RISCV_HWPROBE_MISALIGNED_VECTOR_UNSUPPORTED 4 + #ifndef NR_riscv_hwprobe #ifndef NR_arch_specific_syscall #define NR_arch_specific_syscall 244 @@ -114,7 +133,12 @@ {RISCV_HWPROBE_KEY_MIMPID, 0}, {RISCV_HWPROBE_KEY_BASE_BEHAVIOR, 0}, {RISCV_HWPROBE_KEY_IMA_EXT_0, 0}, - {RISCV_HWPROBE_KEY_CPUPERF_0, 0}}; + {RISCV_HWPROBE_KEY_CPUPERF_0, 0}, + {RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE, 0}, + {RISCV_HWPROBE_KEY_HIGHEST_VIRT_ADDRESS, 0}, + {RISCV_HWPROBE_KEY_TIME_CSR_FREQ, 0}, + {RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF, 0}, + {RISCV_HWPROBE_KEY_MISALIGNED_VECTOR_PERF, 0}}; bool RiscvHwprobe::probe_features() { assert(!rw_hwprobe_completed, "Called twice."); @@ -188,6 +212,9 @@ VM_Version::ext_Zbs.enable_feature(); } #ifndef PRODUCT + if (is_set(RISCV_HWPROBE_KEY_IMA_EXT_0, RISCV_HWPROBE_EXT_ZICBOZ)) { + VM_Version::ext_Zicboz.enable_feature(); + } if (is_set(RISCV_HWPROBE_KEY_IMA_EXT_0, RISCV_HWPROBE_EXT_ZBKB)) { VM_Version::ext_Zbkb.enable_feature(); } @@ -240,8 +267,22 @@ VM_Version::ext_Zicond.enable_feature(); } #endif + // RISCV_HWPROBE_KEY_CPUPERF_0 is deprecated and returns similar values + // to RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF. Keep it there for backward + // compatibility with old kernels. if (is_valid(RISCV_HWPROBE_KEY_CPUPERF_0)) { - VM_Version::unaligned_access.enable_feature( + VM_Version::unaligned_scalar.enable_feature( query[RISCV_HWPROBE_KEY_CPUPERF_0].value & RISCV_HWPROBE_MISALIGNED_MASK); + } else if (is_valid(RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF)) { + VM_Version::unaligned_scalar.enable_feature( + query[RISCV_HWPROBE_KEY_MISALIGNED_SCALAR_PERF].value); + } + + if (is_valid(RISCV_HWPROBE_KEY_MISALIGNED_VECTOR_PERF)) { + VM_Version::unaligned_vector.enable_feature( + query[RISCV_HWPROBE_KEY_MISALIGNED_VECTOR_PERF].value); + } + if (is_valid(RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE)) { + VM_Version::zicboz_block_size.enable_feature(query[RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE].value); } } diff -Nru openjdk-25-25.0.1+8/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp openjdk-25-25.0.2+10/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp --- openjdk-25-25.0.1+8/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -100,7 +100,6 @@ #endif uint32_t VM_Version::cpu_vector_length() { - assert(ext_V.enabled(), "should not call this"); return (uint32_t)read_csr(CSR_VLENB); } @@ -303,7 +302,7 @@ ext_Zvfh.enable_feature(); - unaligned_access.enable_feature(MISALIGNED_FAST); + unaligned_scalar.enable_feature(MISALIGNED_SCALAR_FAST); satp_mode.enable_feature(VM_SV48); // Features dependent on march/mimpid. diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/c1/c1_Compiler.cpp openjdk-25-25.0.2+10/src/hotspot/share/c1/c1_Compiler.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/c1/c1_Compiler.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/c1/c1_Compiler.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -238,7 +238,7 @@ case vmIntrinsics::_counterTime: #endif case vmIntrinsics::_getObjectSize: -#if defined(X86) || defined(AARCH64) || defined(S390) || defined(RISCV) || defined(PPC64) +#if defined(X86) || defined(AARCH64) || defined(S390) || defined(RISCV64) || defined(PPC64) case vmIntrinsics::_clone: #endif break; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/c1/c1_LIR.cpp openjdk-25-25.0.2+10/src/hotspot/share/c1/c1_LIR.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/c1/c1_LIR.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/c1/c1_LIR.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -350,8 +350,9 @@ , _tmp(tmp) , _expected_type(expected_type) , _flags(flags) { -#if defined(X86) || defined(AARCH64) || defined(S390) || defined(RISCV) || defined(PPC64) - if (expected_type != nullptr && flags == 0) { +#if defined(X86) || defined(AARCH64) || defined(S390) || defined(RISCV64) || defined(PPC64) + if (expected_type != nullptr && + ((flags & ~LIR_OpArrayCopy::get_initial_copy_flags()) == 0)) { _stub = nullptr; } else { _stub = new ArrayCopyStub(this); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/c1/c1_LIR.hpp openjdk-25-25.0.2+10/src/hotspot/share/c1/c1_LIR.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/c1/c1_LIR.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/c1/c1_LIR.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -1282,6 +1282,8 @@ int flags() const { return _flags; } ciArrayKlass* expected_type() const { return _expected_type; } ArrayCopyStub* stub() const { return _stub; } + static int get_initial_copy_flags() { return LIR_OpArrayCopy::unaligned | + LIR_OpArrayCopy::overlapping; } virtual void emit_code(LIR_Assembler* masm); virtual LIR_OpArrayCopy* as_OpArrayCopy() { return this; } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/c1/c1_Runtime1.cpp openjdk-25-25.0.2+10/src/hotspot/share/c1/c1_Runtime1.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/c1/c1_Runtime1.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/c1/c1_Runtime1.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -818,7 +818,7 @@ Deoptimization::DeoptReason reason = Deoptimization::trap_request_reason(trap_request); if (action == Deoptimization::Action_make_not_entrant) { - if (nm->make_not_entrant("C1 deoptimize")) { + if (nm->make_not_entrant(nmethod::ChangeReason::C1_deoptimize)) { if (reason == Deoptimization::Reason_tenured) { MethodData* trap_mdo = Deoptimization::get_method_data(current, method, true /*create_if_missing*/); if (trap_mdo != nullptr) { @@ -1110,7 +1110,7 @@ // safepoint, but if it's still alive then make it not_entrant. nmethod* nm = CodeCache::find_nmethod(caller_frame.pc()); if (nm != nullptr) { - nm->make_not_entrant("C1 code patch"); + nm->make_not_entrant(nmethod::ChangeReason::C1_codepatch); } Deoptimization::deoptimize_frame(current, caller_frame.id()); @@ -1358,7 +1358,7 @@ // Make sure the nmethod is invalidated, i.e. made not entrant. nmethod* nm = CodeCache::find_nmethod(caller_frame.pc()); if (nm != nullptr) { - nm->make_not_entrant("C1 deoptimize for patching"); + nm->make_not_entrant(nmethod::ChangeReason::C1_deoptimize_for_patching); } } @@ -1486,7 +1486,7 @@ nmethod* nm = CodeCache::find_nmethod(caller_frame.pc()); assert (nm != nullptr, "no more nmethod?"); - nm->make_not_entrant("C1 predicate failed trap"); + nm->make_not_entrant(nmethod::ChangeReason::C1_predicate_failed_trap); methodHandle m(current, nm->method()); MethodData* mdo = m->method_data(); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/cds/cds_globals.hpp openjdk-25-25.0.2+10/src/hotspot/share/cds/cds_globals.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/cds/cds_globals.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/cds/cds_globals.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -121,6 +121,7 @@ \ product(ccstr, AOTCacheOutput, nullptr, \ "Specifies the file name for writing the AOT cache") \ + constraint(AOTCacheOutputConstraintFunc, AtParse) \ \ product(bool, AOTInvokeDynamicLinking, false, DIAGNOSTIC, \ "AOT-link JVM_CONSTANT_InvokeDynamic entries in cached " \ diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/cds/metaspaceShared.cpp openjdk-25-25.0.2+10/src/hotspot/share/cds/metaspaceShared.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/cds/metaspaceShared.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/cds/metaspaceShared.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1270,7 +1270,7 @@ } else if (CDSConfig::new_aot_flags_used()) { vm_exit_during_initialization("Unable to use AOT cache.", nullptr); } else { - vm_exit_during_initialization("Unable to use shared archive.", nullptr); + vm_exit_during_initialization("Unable to use shared archive. Unrecoverable archive loading error (run with -Xlog:aot,cds for details)", message); } } @@ -1394,6 +1394,7 @@ FileMapInfo* mapinfo = new FileMapInfo(static_archive, true); if (!mapinfo->open_as_input()) { delete(mapinfo); + log_info(cds)("Opening of static archive %s failed", static_archive); return nullptr; } return mapinfo; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/ci/ciClassList.hpp openjdk-25-25.0.2+10/src/hotspot/share/ci/ciClassList.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/ci/ciClassList.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/ci/ciClassList.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -80,6 +80,7 @@ // Any more access must be given explicitly. #define CI_PACKAGE_ACCESS_TO \ friend class ciObjectFactory; \ +friend class VMStructs; \ friend class ciCallSite; \ friend class ciConstantPoolCache; \ friend class ciField; \ diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/ci/ciKlass.hpp openjdk-25-25.0.2+10/src/hotspot/share/ci/ciKlass.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/ci/ciKlass.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/ci/ciKlass.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -107,7 +107,7 @@ bool is_in_encoding_range() { Klass* k = get_Klass(); bool is_in_encoding_range = CompressedKlassPointers::is_encodable(k); - assert(is_in_encoding_range || k->is_interface() || k->is_abstract(), "sanity"); + assert(is_in_encoding_range, "sanity"); return is_in_encoding_range; } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/ci/ciReplay.cpp openjdk-25-25.0.2+10/src/hotspot/share/ci/ciReplay.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/ci/ciReplay.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/ci/ciReplay.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -802,7 +802,7 @@ // Make sure the existence of a prior compile doesn't stop this one nmethod* nm = (entry_bci != InvocationEntryBci) ? method->lookup_osr_nmethod_for(entry_bci, comp_level, true) : method->code(); if (nm != nullptr) { - nm->make_not_entrant("CI replay"); + nm->make_not_entrant(nmethod::ChangeReason::CI_replay); } replay_state = this; CompileBroker::compile_method(methodHandle(THREAD, method), entry_bci, comp_level, diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/classfile/classFileParser.cpp openjdk-25-25.0.2+10/src/hotspot/share/classfile/classFileParser.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/classfile/classFileParser.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/classfile/classFileParser.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -5841,15 +5841,6 @@ return _super_klass->reference_type() != REF_NONE; } -// Returns true if the future Klass will need to be addressable with a narrow Klass ID. -bool ClassFileParser::klass_needs_narrow_id() const { - // Classes that are never instantiated need no narrow Klass Id, since the - // only point of having a narrow id is to put it into an object header. Keeping - // never instantiated classes out of class space lessens the class space pressure. - // For more details, see JDK-8338526. - return !is_interface() && !is_abstract(); -} - // ---------------------------------------------------------------------------- // debugging diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/classfile/classFileParser.hpp openjdk-25-25.0.2+10/src/hotspot/share/classfile/classFileParser.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/classfile/classFileParser.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/classfile/classFileParser.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -513,11 +513,6 @@ bool is_hidden() const { return _is_hidden; } bool is_interface() const { return _access_flags.is_interface(); } - bool is_abstract() const { return _access_flags.is_abstract(); } - - // Returns true if the Klass to be generated will need to be addressable - // with a narrow Klass ID. - bool klass_needs_narrow_id() const; ClassLoaderData* loader_data() const { return _loader_data; } const Symbol* class_name() const { return _class_name; } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/classfile/systemDictionaryShared.cpp openjdk-25-25.0.2+10/src/hotspot/share/classfile/systemDictionaryShared.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/classfile/systemDictionaryShared.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/classfile/systemDictionaryShared.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -90,7 +90,7 @@ #ifdef ASSERT static void check_klass_after_loading(const Klass* k) { #ifdef _LP64 - if (k != nullptr && UseCompressedClassPointers && k->needs_narrow_id()) { + if (k != nullptr && UseCompressedClassPointers) { CompressedKlassPointers::check_encodable(k); } #endif diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/classfile/verifier.cpp openjdk-25-25.0.2+10/src/hotspot/share/classfile/verifier.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/classfile/verifier.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/classfile/verifier.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -2436,217 +2436,6 @@ } } -// Look at the method's handlers. If the bci is in the handler's try block -// then check if the handler_pc is already on the stack. If not, push it -// unless the handler has already been scanned. -void ClassVerifier::push_handlers(ExceptionTable* exhandlers, - GrowableArray* handler_list, - GrowableArray* handler_stack, - u4 bci) { - int exlength = exhandlers->length(); - for(int x = 0; x < exlength; x++) { - if (bci >= exhandlers->start_pc(x) && bci < exhandlers->end_pc(x)) { - u4 exhandler_pc = exhandlers->handler_pc(x); - if (!handler_list->contains(exhandler_pc)) { - handler_stack->append_if_missing(exhandler_pc); - handler_list->append(exhandler_pc); - } - } - } -} - -// Return TRUE if all code paths starting with start_bc_offset end in -// bytecode athrow or loop. -bool ClassVerifier::ends_in_athrow(u4 start_bc_offset) { - ResourceMark rm; - // Create bytecode stream. - RawBytecodeStream bcs(method()); - int code_length = method()->code_size(); - bcs.set_start(start_bc_offset); - - // Create stack for storing bytecode start offsets for if* and *switch. - GrowableArray* bci_stack = new GrowableArray(30); - // Create stack for handlers for try blocks containing this handler. - GrowableArray* handler_stack = new GrowableArray(30); - // Create list of handlers that have been pushed onto the handler_stack - // so that handlers embedded inside of their own TRY blocks only get - // scanned once. - GrowableArray* handler_list = new GrowableArray(30); - // Create list of visited branch opcodes (goto* and if*). - GrowableArray* visited_branches = new GrowableArray(30); - ExceptionTable exhandlers(_method()); - - while (true) { - if (bcs.is_last_bytecode()) { - // if no more starting offsets to parse or if at the end of the - // method then return false. - if ((bci_stack->is_empty()) || (bcs.end_bci() == code_length)) - return false; - // Pop a bytecode starting offset and scan from there. - bcs.set_start(bci_stack->pop()); - } - Bytecodes::Code opcode = bcs.raw_next(); - int bci = bcs.bci(); - - // If the bytecode is in a TRY block, push its handlers so they - // will get parsed. - push_handlers(&exhandlers, handler_list, handler_stack, bci); - - switch (opcode) { - case Bytecodes::_if_icmpeq: - case Bytecodes::_if_icmpne: - case Bytecodes::_if_icmplt: - case Bytecodes::_if_icmpge: - case Bytecodes::_if_icmpgt: - case Bytecodes::_if_icmple: - case Bytecodes::_ifeq: - case Bytecodes::_ifne: - case Bytecodes::_iflt: - case Bytecodes::_ifge: - case Bytecodes::_ifgt: - case Bytecodes::_ifle: - case Bytecodes::_if_acmpeq: - case Bytecodes::_if_acmpne: - case Bytecodes::_ifnull: - case Bytecodes::_ifnonnull: { - int target = bcs.dest(); - if (visited_branches->contains(bci)) { - if (bci_stack->is_empty()) { - if (handler_stack->is_empty()) { - return true; - } else { - // Parse the catch handlers for try blocks containing athrow. - bcs.set_start(handler_stack->pop()); - } - } else { - // Pop a bytecode starting offset and scan from there. - bcs.set_start(bci_stack->pop()); - } - } else { - if (target > bci) { // forward branch - if (target >= code_length) return false; - // Push the branch target onto the stack. - bci_stack->push(target); - // then, scan bytecodes starting with next. - bcs.set_start(bcs.next_bci()); - } else { // backward branch - // Push bytecode offset following backward branch onto the stack. - bci_stack->push(bcs.next_bci()); - // Check bytecodes starting with branch target. - bcs.set_start(target); - } - // Record target so we don't branch here again. - visited_branches->append(bci); - } - break; - } - - case Bytecodes::_goto: - case Bytecodes::_goto_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()) { - return true; - } else { - // Parse the catch handlers for try blocks containing athrow. - bcs.set_start(handler_stack->pop()); - } - } else { - // Been here before, pop new starting offset from stack. - bcs.set_start(bci_stack->pop()); - } - } else { - if (target >= code_length) return false; - // Continue scanning from the target onward. - bcs.set_start(target); - // Record target so we don't branch here again. - visited_branches->append(bci); - } - break; - } - - // Check that all switch alternatives end in 'athrow' bytecodes. Since it - // is difficult to determine where each switch alternative ends, parse - // each switch alternative until either hit a 'return', 'athrow', or reach - // the end of the method's bytecodes. This is gross but should be okay - // because: - // 1. tableswitch and lookupswitch byte codes in handlers for ctor explicit - // constructor invocations should be rare. - // 2. if each switch alternative ends in an athrow then the parsing should be - // short. If there is no athrow then it is bogus code, anyway. - case Bytecodes::_lookupswitch: - case Bytecodes::_tableswitch: - { - address aligned_bcp = align_up(bcs.bcp() + 1, jintSize); - int default_offset = Bytes::get_Java_u4(aligned_bcp) + bci; - int keys, delta; - if (opcode == Bytecodes::_tableswitch) { - jint low = (jint)Bytes::get_Java_u4(aligned_bcp + jintSize); - jint high = (jint)Bytes::get_Java_u4(aligned_bcp + 2*jintSize); - // This is invalid, but let the regular bytecode verifier - // report this because the user will get a better error message. - if (low > high) return true; - keys = high - low + 1; - delta = 1; - } else { - keys = (int)Bytes::get_Java_u4(aligned_bcp + jintSize); - delta = 2; - } - // Invalid, let the regular bytecode verifier deal with it. - if (keys < 0) return true; - - // Push the offset of the next bytecode onto the stack. - bci_stack->push(bcs.next_bci()); - - // Push the switch alternatives onto the stack. - for (int i = 0; i < keys; i++) { - 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); - } - - // Start bytecode parsing for the switch at the default alternative. - if (default_offset > code_length) return false; - bcs.set_start(default_offset); - break; - } - - case Bytecodes::_return: - return false; - - case Bytecodes::_athrow: - { - if (bci_stack->is_empty()) { - if (handler_stack->is_empty()) { - return true; - } else { - // Parse the catch handlers for try blocks containing athrow. - bcs.set_start(handler_stack->pop()); - } - } else { - // Pop a bytecode offset and starting scanning from there. - bcs.set_start(bci_stack->pop()); - } - } - break; - - default: - ; - } // end switch - } // end while loop - - return false; -} - void ClassVerifier::verify_invoke_init( RawBytecodeStream* bcs, u2 ref_class_index, VerificationType ref_class_type, StackMapFrame* current_frame, u4 code_length, bool in_try_block, @@ -2671,25 +2460,6 @@ // sure that all catch clause paths end in a throw. Otherwise, this can // result in returning an incomplete object. if (in_try_block) { - ExceptionTable exhandlers(_method()); - int exlength = exhandlers.length(); - for(int i = 0; i < exlength; i++) { - u2 start_pc = exhandlers.start_pc(i); - u2 end_pc = exhandlers.end_pc(i); - - if (bci >= start_pc && bci < end_pc) { - if (!ends_in_athrow(exhandlers.handler_pc(i))) { - verify_error(ErrorContext::bad_code(bci), - "Bad method call from after the start of a try block"); - return; - } else if (log_is_enabled(Debug, verification)) { - ResourceMark rm(THREAD); - log_debug(verification)("Survived call to ends_in_athrow(): %s", - current_class()->name()->as_C_string()); - } - } - } - // Check the exception handler target stackmaps with the locals from the // incoming stackmap (before initialize_object() changes them to outgoing // state). diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/classfile/verifier.hpp openjdk-25-25.0.2+10/src/hotspot/share/classfile/verifier.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/classfile/verifier.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/classfile/verifier.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2024, 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 @@ -334,17 +334,6 @@ bool* this_uninit, const constantPoolHandle& cp, StackMapTable* stackmap_table, TRAPS); - // Used by ends_in_athrow() to push all handlers that contain bci onto the - // handler_stack, if the handler has not already been pushed on the stack. - void push_handlers(ExceptionTable* exhandlers, - GrowableArray* handler_list, - GrowableArray* handler_stack, - u4 bci); - - // Returns true if all paths starting with start_bc_offset end in athrow - // bytecode or loop. - bool ends_in_athrow(u4 start_bc_offset); - void verify_invoke_instructions( RawBytecodeStream* bcs, u4 code_length, StackMapFrame* current_frame, bool in_try_block, bool* this_uninit, VerificationType return_type, diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/classfile/vmClasses.cpp openjdk-25-25.0.2+10/src/hotspot/share/classfile/vmClasses.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/classfile/vmClasses.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/classfile/vmClasses.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -210,9 +210,11 @@ #endif InstanceStackChunkKlass::init_offset_of_stack(); +#if INCLUDE_CDS if (CDSConfig::is_using_aot_linked_classes()) { AOTLinkedClassBulkLoader::load_javabase_classes(THREAD); } +#endif } #if INCLUDE_CDS diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/classfile/vmIntrinsics.cpp openjdk-25-25.0.2+10/src/hotspot/share/classfile/vmIntrinsics.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/classfile/vmIntrinsics.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/classfile/vmIntrinsics.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -289,8 +289,6 @@ case vmIntrinsics::_dsin: case vmIntrinsics::_dcos: case vmIntrinsics::_dtan: - case vmIntrinsics::_dtanh: - case vmIntrinsics::_dcbrt: case vmIntrinsics::_dlog: case vmIntrinsics::_dexp: case vmIntrinsics::_dpow: @@ -316,6 +314,13 @@ case vmIntrinsics::_fmaF: if (!InlineMathNatives || !UseFMA) return true; break; + case vmIntrinsics::_dtanh: + case vmIntrinsics::_dcbrt: + if (!InlineMathNatives || !InlineIntrinsics) return true; +#if defined(AMD64) && (defined(COMPILER1) || defined(COMPILER2)) + if (!UseLibmIntrinsic) return true; +#endif + break; case vmIntrinsics::_floatToFloat16: case vmIntrinsics::_float16ToFloat: if (!InlineIntrinsics) return true; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/code/aotCodeCache.hpp openjdk-25-25.0.2+10/src/hotspot/share/code/aotCodeCache.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/code/aotCodeCache.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/code/aotCodeCache.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -362,8 +362,8 @@ static void init2() NOT_CDS_RETURN; static void close() NOT_CDS_RETURN; static bool is_on() CDS_ONLY({ return _cache != nullptr && !_cache->closing(); }) NOT_CDS_RETURN_(false); - static bool is_on_for_use() { return is_on() && _cache->for_use(); } - static bool is_on_for_dump() { return is_on() && _cache->for_dump(); } + static bool is_on_for_use() CDS_ONLY({ return is_on() && _cache->for_use(); }) NOT_CDS_RETURN_(false); + static bool is_on_for_dump() CDS_ONLY({ return is_on() && _cache->for_dump(); }) NOT_CDS_RETURN_(false); static bool is_dumping_adapter() NOT_CDS_RETURN_(false); static bool is_using_adapter() NOT_CDS_RETURN_(false); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/code/codeCache.cpp openjdk-25-25.0.2+10/src/hotspot/share/code/codeCache.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/code/codeCache.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/code/codeCache.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -882,6 +882,7 @@ void CodeCache::verify_clean_inline_caches() { #ifdef ASSERT + if (!VerifyInlineCaches) return; NMethodIterator iter(NMethodIterator::not_unloading); while(iter.next()) { nmethod* nm = iter.method(); @@ -1361,7 +1362,7 @@ while(iter.next()) { nmethod* nm = iter.method(); if (nm->is_marked_for_deoptimization() && !nm->has_been_deoptimized() && nm->can_be_deoptimized()) { - nm->make_not_entrant("marked for deoptimization"); + nm->make_not_entrant(nmethod::ChangeReason::marked_for_deoptimization); nm->make_deoptimized(); } } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/code/compiledIC.hpp openjdk-25-25.0.2+10/src/hotspot/share/code/compiledIC.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/code/compiledIC.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/code/compiledIC.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -192,13 +192,13 @@ static inline CompiledDirectCall* before(address return_addr) { CompiledDirectCall* st = new CompiledDirectCall(nativeCall_before(return_addr)); - st->verify(); + if (VerifyInlineCaches) st->verify(); return st; } static inline CompiledDirectCall* at(address native_call) { CompiledDirectCall* st = new CompiledDirectCall(nativeCall_at(native_call)); - st->verify(); + if (VerifyInlineCaches) st->verify(); return st; } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/code/nmethod.cpp openjdk-25-25.0.2+10/src/hotspot/share/code/nmethod.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/code/nmethod.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/code/nmethod.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1970,14 +1970,12 @@ } } -void nmethod::log_state_change(const char* reason) const { - assert(reason != nullptr, "Must provide a reason"); - +void nmethod::log_state_change(ChangeReason change_reason) const { if (LogCompilation) { if (xtty != nullptr) { ttyLocker ttyl; // keep the following output all in one block xtty->begin_elem("make_not_entrant thread='%zu' reason='%s'", - os::current_thread_id(), reason); + os::current_thread_id(), change_reason_to_string(change_reason)); log_identity(xtty); xtty->stamp(); xtty->end_elem(); @@ -1986,7 +1984,7 @@ ResourceMark rm; stringStream ss(NEW_RESOURCE_ARRAY(char, 256), 256); - ss.print("made not entrant: %s", reason); + ss.print("made not entrant: %s", change_reason_to_string(change_reason)); CompileTask::print_ul(this, ss.freeze()); if (PrintCompilation) { @@ -2001,9 +1999,7 @@ } // Invalidate code -bool nmethod::make_not_entrant(const char* reason) { - assert(reason != nullptr, "Must provide a reason"); - +bool nmethod::make_not_entrant(ChangeReason change_reason) { // This can be called while the system is already at a safepoint which is ok NoSafepointVerifier nsv; @@ -2061,7 +2057,7 @@ assert(success, "Transition can't fail"); // Log the transition once - log_state_change(reason); + log_state_change(change_reason); // Remove nmethod from method. unlink_from_method(); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/code/nmethod.hpp openjdk-25-25.0.2+10/src/hotspot/share/code/nmethod.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/code/nmethod.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/code/nmethod.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -471,6 +471,85 @@ void oops_do_set_strong_done(nmethod* old_head); public: + enum class ChangeReason : u1 { + C1_codepatch, + C1_deoptimize, + C1_deoptimize_for_patching, + C1_predicate_failed_trap, + CI_replay, + JVMCI_invalidate_nmethod, + JVMCI_invalidate_nmethod_mirror, + JVMCI_materialize_virtual_object, + JVMCI_new_installation, + JVMCI_register_method, + JVMCI_replacing_with_new_code, + JVMCI_reprofile, + marked_for_deoptimization, + missing_exception_handler, + not_used, + OSR_invalidation_back_branch, + OSR_invalidation_for_compiling_with_C1, + OSR_invalidation_of_lower_level, + set_native_function, + uncommon_trap, + whitebox_deoptimization, + zombie, + }; + + + static const char* change_reason_to_string(ChangeReason change_reason) { + switch (change_reason) { + case ChangeReason::C1_codepatch: + return "C1 code patch"; + case ChangeReason::C1_deoptimize: + return "C1 deoptimized"; + case ChangeReason::C1_deoptimize_for_patching: + return "C1 deoptimize for patching"; + case ChangeReason::C1_predicate_failed_trap: + return "C1 predicate failed trap"; + case ChangeReason::CI_replay: + return "CI replay"; + case ChangeReason::JVMCI_invalidate_nmethod: + return "JVMCI invalidate nmethod"; + case ChangeReason::JVMCI_invalidate_nmethod_mirror: + return "JVMCI invalidate nmethod mirror"; + case ChangeReason::JVMCI_materialize_virtual_object: + return "JVMCI materialize virtual object"; + case ChangeReason::JVMCI_new_installation: + return "JVMCI new installation"; + case ChangeReason::JVMCI_register_method: + return "JVMCI register method"; + case ChangeReason::JVMCI_replacing_with_new_code: + return "JVMCI replacing with new code"; + case ChangeReason::JVMCI_reprofile: + return "JVMCI reprofile"; + case ChangeReason::marked_for_deoptimization: + return "marked for deoptimization"; + case ChangeReason::missing_exception_handler: + return "missing exception handler"; + case ChangeReason::not_used: + return "not used"; + case ChangeReason::OSR_invalidation_back_branch: + return "OSR invalidation back branch"; + case ChangeReason::OSR_invalidation_for_compiling_with_C1: + return "OSR invalidation for compiling with C1"; + case ChangeReason::OSR_invalidation_of_lower_level: + return "OSR invalidation of lower level"; + case ChangeReason::set_native_function: + return "set native function"; + case ChangeReason::uncommon_trap: + return "uncommon trap"; + case ChangeReason::whitebox_deoptimization: + return "whitebox deoptimization"; + case ChangeReason::zombie: + return "zombie"; + default: { + assert(false, "Unhandled reason"); + return "Unknown"; + } + } + } + // create nmethod with entry_bci static nmethod* new_nmethod(const methodHandle& method, int compile_id, @@ -633,8 +712,8 @@ // alive. It is used when an uncommon trap happens. Returns true // if this thread changed the state of the nmethod or false if // another thread performed the transition. - bool make_not_entrant(const char* reason); - bool make_not_used() { return make_not_entrant("not used"); } + bool make_not_entrant(ChangeReason change_reason); + bool make_not_used() { return make_not_entrant(ChangeReason::not_used); } bool is_marked_for_deoptimization() const { return deoptimization_status() != not_marked; } bool has_been_deoptimized() const { return deoptimization_status() == deoptimize_done; } @@ -947,7 +1026,7 @@ // Logging void log_identity(xmlStream* log) const; void log_new_nmethod() const; - void log_state_change(const char* reason) const; + void log_state_change(ChangeReason change_reason) const; // Prints block-level comments, including nmethod specific block labels: void print_nmethod_labels(outputStream* stream, address block_begin, bool print_section_labels=true) const; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/compiler/compilationPolicy.cpp openjdk-25-25.0.2+10/src/hotspot/share/compiler/compilationPolicy.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/compiler/compilationPolicy.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/compiler/compilationPolicy.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -404,7 +404,7 @@ return 1; } -void CompilationPolicy::print_counters(const char* prefix, Method* m) { +void CompilationPolicy::print_counters_on(outputStream* st, const char* prefix, Method* m) { int invocation_count = m->invocation_count(); int backedge_count = m->backedge_count(); MethodData* mdh = m->method_data(); @@ -416,133 +416,140 @@ mdo_invocations_start = mdh->invocation_count_start(); mdo_backedges_start = mdh->backedge_count_start(); } - tty->print(" %stotal=%d,%d %smdo=%d(%d),%d(%d)", prefix, - invocation_count, backedge_count, prefix, - mdo_invocations, mdo_invocations_start, - mdo_backedges, mdo_backedges_start); - tty->print(" %smax levels=%d,%d", prefix, - m->highest_comp_level(), m->highest_osr_comp_level()); + st->print(" %stotal=%d,%d %smdo=%d(%d),%d(%d)", prefix, + invocation_count, backedge_count, prefix, + mdo_invocations, mdo_invocations_start, + mdo_backedges, mdo_backedges_start); + st->print(" %smax levels=%d,%d", prefix, m->highest_comp_level(), m->highest_osr_comp_level()); } -void CompilationPolicy::print_training_data(const char* prefix, Method* method) { +void CompilationPolicy::print_training_data_on(outputStream* st, const char* prefix, Method* method) { methodHandle m(Thread::current(), method); - tty->print(" %smtd: ", prefix); + st->print(" %smtd: ", prefix); MethodTrainingData* mtd = MethodTrainingData::find(m); if (mtd == nullptr) { - tty->print("null"); + st->print("null"); } else { MethodData* md = mtd->final_profile(); - tty->print("mdo="); + st->print("mdo="); if (md == nullptr) { - tty->print("null"); + st->print("null"); } else { int mdo_invocations = md->invocation_count(); int mdo_backedges = md->backedge_count(); int mdo_invocations_start = md->invocation_count_start(); int mdo_backedges_start = md->backedge_count_start(); - tty->print("%d(%d), %d(%d)", mdo_invocations, mdo_invocations_start, mdo_backedges, mdo_backedges_start); + st->print("%d(%d), %d(%d)", mdo_invocations, mdo_invocations_start, mdo_backedges, mdo_backedges_start); } CompileTrainingData* ctd = mtd->last_toplevel_compile(CompLevel_full_optimization); - tty->print(", deps="); + st->print(", deps="); if (ctd == nullptr) { - tty->print("null"); + st->print("null"); } else { - tty->print("%d", ctd->init_deps_left()); + st->print("%d", ctd->init_deps_left()); } } } // Print an event. -void CompilationPolicy::print_event(EventType type, Method* m, Method* im, int bci, CompLevel level) { +void CompilationPolicy::print_event_on(outputStream *st, EventType type, Method* m, Method* im, int bci, CompLevel level) { bool inlinee_event = m != im; - ttyLocker tty_lock; - tty->print("%lf: [", os::elapsedTime()); + st->print("%lf: [", os::elapsedTime()); switch(type) { case CALL: - tty->print("call"); + st->print("call"); break; case LOOP: - tty->print("loop"); + st->print("loop"); break; case COMPILE: - tty->print("compile"); + st->print("compile"); break; case FORCE_COMPILE: - tty->print("force-compile"); + st->print("force-compile"); break; case REMOVE_FROM_QUEUE: - tty->print("remove-from-queue"); + st->print("remove-from-queue"); break; case UPDATE_IN_QUEUE: - tty->print("update-in-queue"); + st->print("update-in-queue"); break; case REPROFILE: - tty->print("reprofile"); + st->print("reprofile"); break; case MAKE_NOT_ENTRANT: - tty->print("make-not-entrant"); + st->print("make-not-entrant"); break; default: - tty->print("unknown"); + st->print("unknown"); } - tty->print(" level=%d ", level); + st->print(" level=%d ", level); ResourceMark rm; char *method_name = m->name_and_sig_as_C_string(); - tty->print("[%s", method_name); + st->print("[%s", method_name); if (inlinee_event) { char *inlinee_name = im->name_and_sig_as_C_string(); - tty->print(" [%s]] ", inlinee_name); + st->print(" [%s]] ", inlinee_name); } - else tty->print("] "); - tty->print("@%d queues=%d,%d", bci, CompileBroker::queue_size(CompLevel_full_profile), - CompileBroker::queue_size(CompLevel_full_optimization)); - - tty->print(" rate="); - if (m->prev_time() == 0) tty->print("n/a"); - else tty->print("%f", m->rate()); + else st->print("] "); + st->print("@%d queues=%d,%d", bci, CompileBroker::queue_size(CompLevel_full_profile), + CompileBroker::queue_size(CompLevel_full_optimization)); + + st->print(" rate="); + if (m->prev_time() == 0) st->print("n/a"); + else st->print("%f", m->rate()); - tty->print(" k=%.2lf,%.2lf", threshold_scale(CompLevel_full_profile, Tier3LoadFeedback), - threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback)); + st->print(" k=%.2lf,%.2lf", threshold_scale(CompLevel_full_profile, Tier3LoadFeedback), + threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback)); if (type != COMPILE) { - print_counters("", m); + print_counters_on(st, "", m); if (inlinee_event) { - print_counters("inlinee ", im); + print_counters_on(st, "inlinee ", im); } - tty->print(" compilable="); + st->print(" compilable="); bool need_comma = false; if (!m->is_not_compilable(CompLevel_full_profile)) { - tty->print("c1"); + st->print("c1"); need_comma = true; } if (!m->is_not_osr_compilable(CompLevel_full_profile)) { - if (need_comma) tty->print(","); - tty->print("c1-osr"); + if (need_comma) st->print(","); + st->print("c1-osr"); need_comma = true; } if (!m->is_not_compilable(CompLevel_full_optimization)) { - if (need_comma) tty->print(","); - tty->print("c2"); + if (need_comma) st->print(","); + st->print("c2"); need_comma = true; } if (!m->is_not_osr_compilable(CompLevel_full_optimization)) { - if (need_comma) tty->print(","); - tty->print("c2-osr"); + if (need_comma) st->print(","); + st->print("c2-osr"); } - tty->print(" status="); + st->print(" status="); if (m->queued_for_compilation()) { - tty->print("in-queue"); - } else tty->print("idle"); - print_training_data("", m); + st->print("in-queue"); + } else st->print("idle"); + + print_training_data_on(st, "", m); if (inlinee_event) { - print_training_data("inlinee ", im); + print_training_data_on(st, "inlinee ", im); } } - tty->print_cr("]"); + st->print_cr("]"); + +} + +void CompilationPolicy::print_event(EventType type, Method* m, Method* im, int bci, CompLevel level) { + stringStream s; + print_event_on(&s, type, m, im, bci, level); + ResourceMark rm; + tty->print("%s", s.as_string()); } void CompilationPolicy::initialize() { @@ -924,7 +931,7 @@ nmethod* osr_nm = mh->lookup_osr_nmethod_for(bci, CompLevel_simple, false); if (osr_nm != nullptr && osr_nm->comp_level() > CompLevel_simple) { // Invalidate the existing OSR nmethod so that a compile at CompLevel_simple is permitted. - osr_nm->make_not_entrant("OSR invalidation for compiling with C1"); + osr_nm->make_not_entrant(nmethod::ChangeReason::OSR_invalidation_for_compiling_with_C1); } compile(mh, bci, CompLevel_simple, THREAD); } @@ -1335,17 +1342,24 @@ return next_level; } +template static inline bool apply_predicate(const methodHandle& method, CompLevel cur_level, int i, int b, bool delay_profiling, double delay_profiling_scale) { + if (delay_profiling) { + return Predicate::apply_scaled(method, cur_level, i, b, delay_profiling_scale); + } else { + return Predicate::apply(method, cur_level, i, b); + } +} + template CompLevel CompilationPolicy::transition_from_none(const methodHandle& method, CompLevel cur_level, bool delay_profiling, bool disable_feedback) { precond(cur_level == CompLevel_none); CompLevel next_level = cur_level; int i = method->invocation_count(); int b = method->backedge_count(); - double scale = delay_profiling ? Tier0ProfileDelayFactor : 1.0; // If we were at full profile level, would we switch to full opt? if (transition_from_full_profile(method, CompLevel_full_profile) == CompLevel_full_optimization) { next_level = CompLevel_full_optimization; - } else if (!CompilationModeFlag::disable_intermediate() && Predicate::apply_scaled(method, cur_level, i, b, scale)) { + } else if (!CompilationModeFlag::disable_intermediate() && apply_predicate(method, cur_level, i, b, delay_profiling, Tier0ProfileDelayFactor)) { // C1-generated fully profiled code is about 30% slower than the limited profile // code that has only invocation and backedge counters. The observation is that // if C2 queue is large enough we can spend too much time in the fully profiled code @@ -1387,13 +1401,12 @@ CompLevel next_level = cur_level; int i = method->invocation_count(); int b = method->backedge_count(); - double scale = delay_profiling ? Tier2ProfileDelayFactor : 1.0; MethodData* mdo = method->method_data(); if (mdo != nullptr) { if (mdo->would_profile()) { if (disable_feedback || (CompileBroker::queue_size(CompLevel_full_optimization) <= Tier3DelayOff * compiler_count(CompLevel_full_optimization) && - Predicate::apply_scaled(method, cur_level, i, b, scale))) { + apply_predicate(method, cur_level, i, b, delay_profiling, Tier2ProfileDelayFactor))) { next_level = CompLevel_full_profile; } } else { @@ -1403,7 +1416,7 @@ // If there is no MDO we need to profile if (disable_feedback || (CompileBroker::queue_size(CompLevel_full_optimization) <= Tier3DelayOff * compiler_count(CompLevel_full_optimization) && - Predicate::apply_scaled(method, cur_level, i, b, scale))) { + apply_predicate(method, cur_level, i, b, delay_profiling, Tier2ProfileDelayFactor))) { next_level = CompLevel_full_profile; } } @@ -1516,7 +1529,7 @@ int osr_bci = nm->is_osr_method() ? nm->osr_entry_bci() : InvocationEntryBci; print_event(MAKE_NOT_ENTRANT, mh(), mh(), osr_bci, level); } - nm->make_not_entrant("OSR invalidation, back branch"); + nm->make_not_entrant(nmethod::ChangeReason::OSR_invalidation_back_branch); } } // Fix up next_level if necessary to avoid deopts diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/compiler/compilationPolicy.hpp openjdk-25-25.0.2+10/src/hotspot/share/compiler/compilationPolicy.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/compiler/compilationPolicy.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/compiler/compilationPolicy.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -287,8 +287,8 @@ // loop_event checks if a method should be OSR compiled at a different // level. static CompLevel loop_event(const methodHandle& method, CompLevel cur_level, JavaThread* THREAD); - static void print_counters(const char* prefix, Method* m); - static void print_training_data(const char* prefix, Method* method); + static void print_counters_on(outputStream* st, const char* prefix, Method* m); + static void print_training_data_on(outputStream* st, const char* prefix, Method* method); // Has a method been long around? // We don't remove old methods from the compile queue even if they have // very low activity (see select_task()). @@ -318,6 +318,7 @@ static void set_c2_count(int x) { _c2_count = x; } enum EventType { CALL, LOOP, COMPILE, FORCE_COMPILE, FORCE_RECOMPILE, REMOVE_FROM_QUEUE, UPDATE_IN_QUEUE, REPROFILE, MAKE_NOT_ENTRANT }; + static void print_event_on(outputStream *st, EventType type, Method* m, Method* im, int bci, CompLevel level); static void print_event(EventType type, Method* m, Method* im, int bci, CompLevel level); // Check if the method can be compiled, change level if necessary static void compile(const methodHandle& mh, int bci, CompLevel level, TRAPS); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/g1/g1CollectedHeap.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectedHeap.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1690,6 +1690,66 @@ #define LOG_COLLECT_CONCURRENTLY_COMPLETE(cause, result) \ LOG_COLLECT_CONCURRENTLY(cause, "complete %s", BOOL_TO_STR(result)) +bool G1CollectedHeap::wait_full_mark_finished(GCCause::Cause cause, + uint old_marking_started_before, + uint old_marking_started_after, + uint old_marking_completed_after) { + // Request is finished if a full collection (concurrent or stw) + // was started after this request and has completed, e.g. + // started_before < completed_after. + if (gc_counter_less_than(old_marking_started_before, + old_marking_completed_after)) { + LOG_COLLECT_CONCURRENTLY_COMPLETE(cause, true); + return true; + } + + if (old_marking_started_after != old_marking_completed_after) { + // If there is an in-progress cycle (possibly started by us), then + // wait for that cycle to complete, e.g. + // while completed_now < started_after. + LOG_COLLECT_CONCURRENTLY(cause, "wait"); + MonitorLocker ml(G1OldGCCount_lock); + while (gc_counter_less_than(_old_marking_cycles_completed, + old_marking_started_after)) { + ml.wait(); + } + // Request is finished if the collection we just waited for was + // started after this request. + if (old_marking_started_before != old_marking_started_after) { + LOG_COLLECT_CONCURRENTLY(cause, "complete after wait"); + return true; + } + } + return false; +} + +// After calling wait_full_mark_finished(), this method determines whether we +// previously failed for ordinary reasons (concurrent cycle in progress, whitebox +// has control). Returns if this has been such an ordinary reason. +static bool should_retry_vm_op(GCCause::Cause cause, + VM_G1TryInitiateConcMark* op) { + if (op->cycle_already_in_progress()) { + // If VMOp failed because a cycle was already in progress, it + // is now complete. But it didn't finish this user-requested + // GC, so try again. + LOG_COLLECT_CONCURRENTLY(cause, "retry after in-progress"); + return true; + } else if (op->whitebox_attached()) { + // If WhiteBox wants control, wait for notification of a state + // change in the controller, then try again. Don't wait for + // release of control, since collections may complete while in + // control. Note: This won't recognize a STW full collection + // while waiting; we can't wait on multiple monitors. + LOG_COLLECT_CONCURRENTLY(cause, "whitebox control stall"); + MonitorLocker ml(ConcurrentGCBreakpoints::monitor()); + if (ConcurrentGCBreakpoints::is_controlled()) { + ml.wait(); + } + return true; + } + return false; +} + bool G1CollectedHeap::try_collect_concurrently(GCCause::Cause cause, uint gc_counter, uint old_marking_started_before) { @@ -1750,7 +1810,45 @@ LOG_COLLECT_CONCURRENTLY(cause, "ignoring STW full GC"); old_marking_started_before = old_marking_started_after; } + } else if (GCCause::is_codecache_requested_gc(cause)) { + // For a CodeCache requested GC, before marking, progress is ensured as the + // following Remark pause unloads code (and signals the requester such). + // Otherwise we must ensure that it is restarted. + // + // For a CodeCache requested GC, a successful GC operation means that + // (1) marking is in progress. I.e. the VMOp started the marking or a + // Remark pause is pending from a different VM op; we will potentially + // abort a mixed phase if needed. + // (2) a new cycle was started (by this thread or some other), or + // (3) a Full GC was performed. + // + // Cases (2) and (3) are detected together by a change to + // _old_marking_cycles_started. + // + // Compared to other "automatic" GCs (see below), we do not consider being + // in whitebox as sufficient too because we might be anywhere within that + // cycle and we need to make progress. + if (op.mark_in_progress() || + (old_marking_started_before != old_marking_started_after)) { + LOG_COLLECT_CONCURRENTLY_COMPLETE(cause, true); + return true; + } + + if (wait_full_mark_finished(cause, + old_marking_started_before, + old_marking_started_after, + old_marking_completed_after)) { + return true; + } + + if (should_retry_vm_op(cause, &op)) { + continue; + } } else if (!GCCause::is_user_requested_gc(cause)) { + assert(cause == GCCause::_g1_humongous_allocation || + cause == GCCause::_g1_periodic_collection, + "Unsupported cause %s", GCCause::to_string(cause)); + // For an "automatic" (not user-requested) collection, we just need to // ensure that progress is made. // @@ -1762,11 +1860,6 @@ // (5) a Full GC was performed. // Cases (4) and (5) are detected together by a change to // _old_marking_cycles_started. - // - // Note that (1) does not imply (4). If we're still in the mixed - // phase of an earlier concurrent collection, the request to make the - // collection a concurrent start won't be honored. If we don't check for - // both conditions we'll spin doing back-to-back collections. if (op.gc_succeeded() || op.cycle_already_in_progress() || op.whitebox_attached() || @@ -1790,56 +1883,20 @@ BOOL_TO_STR(op.gc_succeeded()), old_marking_started_before, old_marking_started_after); - // Request is finished if a full collection (concurrent or stw) - // was started after this request and has completed, e.g. - // started_before < completed_after. - if (gc_counter_less_than(old_marking_started_before, - old_marking_completed_after)) { - LOG_COLLECT_CONCURRENTLY_COMPLETE(cause, true); + if (wait_full_mark_finished(cause, + old_marking_started_before, + old_marking_started_after, + old_marking_completed_after)) { return true; } - if (old_marking_started_after != old_marking_completed_after) { - // If there is an in-progress cycle (possibly started by us), then - // wait for that cycle to complete, e.g. - // while completed_now < started_after. - LOG_COLLECT_CONCURRENTLY(cause, "wait"); - MonitorLocker ml(G1OldGCCount_lock); - while (gc_counter_less_than(_old_marking_cycles_completed, - old_marking_started_after)) { - ml.wait(); - } - // Request is finished if the collection we just waited for was - // started after this request. - if (old_marking_started_before != old_marking_started_after) { - LOG_COLLECT_CONCURRENTLY(cause, "complete after wait"); - return true; - } - } - // If VMOp was successful then it started a new cycle that the above // wait &etc should have recognized as finishing this request. This // differs from a non-user-request, where gc_succeeded does not imply // a new cycle was started. assert(!op.gc_succeeded(), "invariant"); - if (op.cycle_already_in_progress()) { - // If VMOp failed because a cycle was already in progress, it - // is now complete. But it didn't finish this user-requested - // GC, so try again. - LOG_COLLECT_CONCURRENTLY(cause, "retry after in-progress"); - continue; - } else if (op.whitebox_attached()) { - // If WhiteBox wants control, wait for notification of a state - // change in the controller, then try again. Don't wait for - // release of control, since collections may complete while in - // control. Note: This won't recognize a STW full collection - // while waiting; we can't wait on multiple monitors. - LOG_COLLECT_CONCURRENTLY(cause, "whitebox control stall"); - MonitorLocker ml(ConcurrentGCBreakpoints::monitor()); - if (ConcurrentGCBreakpoints::is_controlled()) { - ml.wait(); - } + if (should_retry_vm_op(cause, &op)) { continue; } } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/g1/g1CollectedHeap.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectedHeap.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/g1/g1CollectedHeap.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectedHeap.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -274,6 +274,14 @@ // (e) cause == _g1_periodic_collection and +G1PeriodicGCInvokesConcurrent. bool should_do_concurrent_full_gc(GCCause::Cause cause); + // Wait until a full mark (either currently in progress or one that completed + // after the current request) has finished. Returns whether that full mark started + // after this request. If so, we typically do not need another one. + bool wait_full_mark_finished(GCCause::Cause cause, + uint old_marking_started_before, + uint old_marking_started_after, + uint old_marking_completed_after); + // Attempt to start a concurrent cycle with the indicated cause. // precondition: should_do_concurrent_full_gc(cause) bool try_collect_concurrently(GCCause::Cause cause, diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/g1/g1CollectorState.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectorState.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/g1/g1CollectorState.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1CollectorState.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -60,6 +60,9 @@ // do the concurrent start phase work. volatile bool _initiate_conc_mark_if_possible; + // Marking is in progress. Set from start of the concurrent start pause to the + // end of the Remark pause. + bool _mark_in_progress; // Marking or rebuilding remembered set work is in progress. Set from the end // of the concurrent start pause to the end of the Cleanup pause. bool _mark_or_rebuild_in_progress; @@ -78,6 +81,7 @@ _in_concurrent_start_gc(false), _initiate_conc_mark_if_possible(false), + _mark_in_progress(false), _mark_or_rebuild_in_progress(false), _clearing_bitmap(false), _in_full_gc(false) { } @@ -92,6 +96,7 @@ void set_initiate_conc_mark_if_possible(bool v) { _initiate_conc_mark_if_possible = v; } + void set_mark_in_progress(bool v) { _mark_in_progress = v; } void set_mark_or_rebuild_in_progress(bool v) { _mark_or_rebuild_in_progress = v; } void set_clearing_bitmap(bool v) { _clearing_bitmap = v; } @@ -106,6 +111,7 @@ bool initiate_conc_mark_if_possible() const { return _initiate_conc_mark_if_possible; } + bool mark_in_progress() const { return _mark_in_progress; } bool mark_or_rebuild_in_progress() const { return _mark_or_rebuild_in_progress; } bool clearing_bitmap() const { return _clearing_bitmap; } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/g1/g1Policy.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1Policy.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/g1/g1Policy.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1Policy.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -593,6 +593,7 @@ collector_state()->set_in_young_gc_before_mixed(false); collector_state()->set_initiate_conc_mark_if_possible(need_to_start_conc_mark("end of Full GC")); collector_state()->set_in_concurrent_start_gc(false); + collector_state()->set_mark_in_progress(false); collector_state()->set_mark_or_rebuild_in_progress(false); collector_state()->set_clearing_bitmap(false); @@ -704,6 +705,7 @@ double elapsed_time_ms = (end_time_sec - _mark_remark_start_sec)*1000.0; _analytics->report_concurrent_mark_remark_times_ms(elapsed_time_ms); record_pause(G1GCPauseType::Remark, _mark_remark_start_sec, end_time_sec); + collector_state()->set_mark_in_progress(false); } void G1Policy::record_concurrent_mark_cleanup_start() { @@ -941,6 +943,7 @@ assert(!(G1GCPauseTypeHelper::is_concurrent_start_pause(this_pause) && collector_state()->mark_or_rebuild_in_progress()), "If the last pause has been concurrent start, we should not have been in the marking window"); if (G1GCPauseTypeHelper::is_concurrent_start_pause(this_pause)) { + collector_state()->set_mark_in_progress(concurrent_operation_is_full_mark); collector_state()->set_mark_or_rebuild_in_progress(concurrent_operation_is_full_mark); } @@ -1227,6 +1230,17 @@ collector_state()->set_initiate_conc_mark_if_possible(false); } +static const char* requester_for_mixed_abort(GCCause::Cause cause) { + if (cause == GCCause::_wb_breakpoint) { + return "run_to breakpoint"; + } else if (GCCause::is_codecache_requested_gc(cause)) { + return "codecache"; + } else { + assert(G1CollectedHeap::heap()->is_user_requested_concurrent_full_gc(cause), "must be"); + return "user"; + } +} + void G1Policy::decide_on_concurrent_start_pause() { // We are about to decide on whether this pause will be a // concurrent start pause. @@ -1259,8 +1273,7 @@ initiate_conc_mark(); log_debug(gc, ergo)("Initiate concurrent cycle (concurrent cycle initiation requested)"); } else if (_g1h->is_user_requested_concurrent_full_gc(cause) || - (cause == GCCause::_codecache_GC_threshold) || - (cause == GCCause::_codecache_GC_aggressive) || + GCCause::is_codecache_requested_gc(cause) || (cause == GCCause::_wb_breakpoint)) { // Initiate a concurrent start. A concurrent start must be a young only // GC, so the collector state must be updated to reflect this. @@ -1275,7 +1288,7 @@ abort_time_to_mixed_tracking(); initiate_conc_mark(); log_debug(gc, ergo)("Initiate concurrent cycle (%s requested concurrent cycle)", - (cause == GCCause::_wb_breakpoint) ? "run_to breakpoint" : "user"); + requester_for_mixed_abort(cause)); } else { // The concurrent marking thread is still finishing up the // previous cycle. If we start one right now the two cycles diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/g1/g1VMOperations.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1VMOperations.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/g1/g1VMOperations.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1VMOperations.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -59,6 +59,7 @@ GCCause::Cause gc_cause) : VM_GC_Operation(gc_count_before, gc_cause), _transient_failure(false), + _mark_in_progress(false), _cycle_already_in_progress(false), _whitebox_attached(false), _terminating(false), @@ -83,6 +84,9 @@ // Record for handling by caller. _terminating = g1h->concurrent_mark_is_terminating(); + _mark_in_progress = g1h->collector_state()->mark_in_progress(); + _cycle_already_in_progress = g1h->concurrent_mark()->cm_thread()->in_progress(); + if (_terminating && GCCause::is_user_requested_gc(_gc_cause)) { // When terminating, the request to initiate a concurrent cycle will be // ignored by do_collection_pause_at_safepoint; instead it will just do @@ -91,9 +95,8 @@ // requests the alternative GC might still be needed. } else if (!g1h->policy()->force_concurrent_start_if_outside_cycle(_gc_cause)) { // Failure to force the next GC pause to be a concurrent start indicates - // there is already a concurrent marking cycle in progress. Set flag - // to notify the caller and return immediately. - _cycle_already_in_progress = true; + // there is already a concurrent marking cycle in progress. Flags to indicate + // that were already set, so return immediately. } else if ((_gc_cause != GCCause::_wb_breakpoint) && ConcurrentGCBreakpoints::is_controlled()) { // WhiteBox wants to be in control of concurrent cycles, so don't try to diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/g1/g1VMOperations.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1VMOperations.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/g1/g1VMOperations.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/g1/g1VMOperations.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -45,6 +45,7 @@ class VM_G1TryInitiateConcMark : public VM_GC_Operation { bool _transient_failure; + bool _mark_in_progress; bool _cycle_already_in_progress; bool _whitebox_attached; bool _terminating; @@ -59,6 +60,7 @@ virtual bool doit_prologue(); virtual void doit(); bool transient_failure() const { return _transient_failure; } + bool mark_in_progress() const { return _mark_in_progress; } bool cycle_already_in_progress() const { return _cycle_already_in_progress; } bool whitebox_attached() const { return _whitebox_attached; } bool terminating() const { return _terminating; } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shared/gcCause.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shared/gcCause.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shared/gcCause.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shared/gcCause.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -106,6 +106,11 @@ cause == GCCause::_heap_dump); } + inline static bool is_codecache_requested_gc(GCCause::Cause cause) { + return (cause == _codecache_GC_threshold || + cause == _codecache_GC_aggressive); + } + // Causes for collection of the tenured gernation inline static bool is_tenured_allocation_failure_gc(GCCause::Cause cause) { // _allocation_failure is the generic cause a collection which could result diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2015, 2021, Red Hat, Inc. All rights reserved. - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGenerationalHeuristics.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGenerationalHeuristics.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGenerationalHeuristics.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGenerationalHeuristics.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -28,7 +28,7 @@ #include "gc/shenandoah/shenandoahCollectorPolicy.hpp" #include "gc/shenandoah/shenandoahEvacInfo.hpp" #include "gc/shenandoah/shenandoahGeneration.hpp" -#include "gc/shenandoah/shenandoahGenerationalHeap.hpp" +#include "gc/shenandoah/shenandoahGenerationalHeap.inline.hpp" #include "gc/shenandoah/shenandoahHeapRegion.inline.hpp" #include "gc/shenandoah/shenandoahOldGeneration.hpp" #include "gc/shenandoah/shenandoahTrace.hpp" @@ -65,8 +65,6 @@ size_t free = 0; size_t free_regions = 0; - const uint tenuring_threshold = heap->age_census()->tenuring_threshold(); - // This counts number of humongous regions that we intend to promote in this cycle. size_t humongous_regions_promoted = 0; // This counts number of regular regions that will be promoted in place. @@ -98,12 +96,12 @@ bool is_candidate; // This is our candidate for later consideration. if (collection_set->is_preselected(i)) { - assert(region->age() >= tenuring_threshold, "Preselection filter"); + assert(heap->is_tenurable(region), "Preselection filter"); is_candidate = true; preselected_candidates++; // Set garbage value to maximum value to force this into the sorted collection set. garbage = region_size_bytes; - } else if (region->is_young() && (region->age() >= tenuring_threshold)) { + } else if (region->is_young() && heap->is_tenurable(region)) { // Note that for GLOBAL GC, region may be OLD, and OLD regions do not qualify for pre-selection // This region is old enough to be promoted but it was not preselected, either because its garbage is below @@ -142,7 +140,7 @@ immediate_regions++; immediate_garbage += garbage; } else { - if (region->is_young() && region->age() >= tenuring_threshold) { + if (region->is_young() && heap->is_tenurable(region)) { oop obj = cast_to_oop(region->bottom()); size_t humongous_regions = ShenandoahHeapRegion::required_regions(obj->size() * HeapWordSize); humongous_regions_promoted += humongous_regions; @@ -246,10 +244,6 @@ size_t ShenandoahGenerationalHeuristics::add_preselected_regions_to_collection_set(ShenandoahCollectionSet* cset, const RegionData* data, size_t size) const { -#ifdef ASSERT - const uint tenuring_threshold = ShenandoahGenerationalHeap::heap()->age_census()->tenuring_threshold(); -#endif - // cur_young_garbage represents the amount of memory to be reclaimed from young-gen. In the case that live objects // are known to be promoted out of young-gen, we count this as cur_young_garbage because this memory is reclaimed // from young-gen and becomes available to serve future young-gen allocation requests. @@ -257,7 +251,7 @@ for (size_t idx = 0; idx < size; idx++) { ShenandoahHeapRegion* r = data[idx].get_region(); if (cset->is_preselected(r->index())) { - assert(r->age() >= tenuring_threshold, "Preselected regions must have tenure age"); + assert(ShenandoahGenerationalHeap::heap()->is_tenurable(r), "Preselected regions must have tenure age"); // Entire region will be promoted, This region does not impact young-gen or old-gen evacuation reserve. // This region has been pre-selected and its impact on promotion reserve is already accounted for. diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGlobalHeuristics.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGlobalHeuristics.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGlobalHeuristics.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahGlobalHeuristics.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -25,7 +25,7 @@ #include "gc/shenandoah/heuristics/shenandoahGlobalHeuristics.hpp" #include "gc/shenandoah/shenandoahCollectorPolicy.hpp" -#include "gc/shenandoah/shenandoahGenerationalHeap.hpp" +#include "gc/shenandoah/shenandoahGenerationalHeap.inline.hpp" #include "gc/shenandoah/shenandoahGlobalGeneration.hpp" #include "gc/shenandoah/shenandoahHeapRegion.inline.hpp" #include "utilities/quickSort.hpp" @@ -56,7 +56,6 @@ size_t capacity = heap->young_generation()->max_capacity(); size_t garbage_threshold = region_size_bytes * ShenandoahGarbageThreshold / 100; size_t ignore_threshold = region_size_bytes * ShenandoahIgnoreGarbageThreshold / 100; - const uint tenuring_threshold = heap->age_census()->tenuring_threshold(); size_t young_evac_reserve = heap->young_generation()->get_evacuation_reserve(); size_t old_evac_reserve = heap->old_generation()->get_evacuation_reserve(); @@ -100,7 +99,7 @@ ShenandoahHeapRegion* r = data[idx].get_region(); assert(!cset->is_preselected(r->index()), "There should be no preselected regions during GLOBAL GC"); bool add_region = false; - if (r->is_old() || (r->age() >= tenuring_threshold)) { + if (r->is_old() || heap->is_tenurable(r)) { size_t new_cset = old_cur_cset + r->get_live_data_bytes(); if ((r->garbage() > garbage_threshold)) { while ((new_cset > max_old_cset) && (unaffiliated_young_regions > 0)) { @@ -114,7 +113,7 @@ old_cur_cset = new_cset; } } else { - assert(r->is_young() && (r->age() < tenuring_threshold), "DeMorgan's law (assuming r->is_affiliated)"); + assert(r->is_young() && !heap->is_tenurable(r), "DeMorgan's law (assuming r->is_affiliated)"); size_t new_cset = young_cur_cset + r->get_live_data_bytes(); size_t region_garbage = r->garbage(); size_t new_garbage = cur_young_garbage + region_garbage; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/heuristics/shenandoahYoungHeuristics.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahYoungHeuristics.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/heuristics/shenandoahYoungHeuristics.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/heuristics/shenandoahYoungHeuristics.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -26,7 +26,7 @@ #include "gc/shenandoah/heuristics/shenandoahOldHeuristics.hpp" #include "gc/shenandoah/heuristics/shenandoahYoungHeuristics.hpp" #include "gc/shenandoah/shenandoahCollectorPolicy.hpp" -#include "gc/shenandoah/shenandoahGenerationalHeap.hpp" +#include "gc/shenandoah/shenandoahGenerationalHeap.inline.hpp" #include "gc/shenandoah/shenandoahHeapRegion.inline.hpp" #include "gc/shenandoah/shenandoahOldGeneration.hpp" #include "gc/shenandoah/shenandoahYoungGeneration.hpp" @@ -64,19 +64,18 @@ size_t size, size_t actual_free, size_t cur_young_garbage) const { - auto heap = ShenandoahGenerationalHeap::heap(); + const auto heap = ShenandoahGenerationalHeap::heap(); - size_t capacity = heap->young_generation()->max_capacity(); - size_t garbage_threshold = ShenandoahHeapRegion::region_size_bytes() * ShenandoahGarbageThreshold / 100; - size_t ignore_threshold = ShenandoahHeapRegion::region_size_bytes() * ShenandoahIgnoreGarbageThreshold / 100; - const uint tenuring_threshold = heap->age_census()->tenuring_threshold(); + const size_t capacity = heap->soft_max_capacity(); + const size_t garbage_threshold = ShenandoahHeapRegion::region_size_bytes() * ShenandoahGarbageThreshold / 100; + const size_t ignore_threshold = ShenandoahHeapRegion::region_size_bytes() * ShenandoahIgnoreGarbageThreshold / 100; // This is young-gen collection or a mixed evacuation. // If this is mixed evacuation, the old-gen candidate regions have already been added. - size_t max_cset = (size_t) (heap->young_generation()->get_evacuation_reserve() / ShenandoahEvacWaste); size_t cur_cset = 0; - size_t free_target = (capacity * ShenandoahMinFreeThreshold) / 100 + max_cset; - size_t min_garbage = (free_target > actual_free) ? (free_target - actual_free) : 0; + const size_t max_cset = (size_t) (heap->young_generation()->get_evacuation_reserve() / ShenandoahEvacWaste); + const size_t free_target = (capacity * ShenandoahMinFreeThreshold) / 100 + max_cset; + const size_t min_garbage = (free_target > actual_free) ? (free_target - actual_free) : 0; log_info(gc, ergo)( @@ -89,11 +88,15 @@ if (cset->is_preselected(r->index())) { continue; } - if (r->age() < tenuring_threshold) { - size_t new_cset = cur_cset + r->get_live_data_bytes(); - size_t region_garbage = r->garbage(); - size_t new_garbage = cur_young_garbage + region_garbage; - bool add_regardless = (region_garbage > ignore_threshold) && (new_garbage < min_garbage); + + // Note that we do not add tenurable regions if they were not pre-selected. They were not preselected + // because there is insufficient room in old-gen to hold their to-be-promoted live objects or because + // they are to be promoted in place. + if (!heap->is_tenurable(r)) { + const size_t new_cset = cur_cset + r->get_live_data_bytes(); + const size_t region_garbage = r->garbage(); + const size_t new_garbage = cur_young_garbage + region_garbage; + const bool add_regardless = (region_garbage > ignore_threshold) && (new_garbage < min_garbage); assert(r->is_young(), "Only young candidates expected in the data array"); if ((new_cset <= max_cset) && (add_regardless || (region_garbage > garbage_threshold))) { cur_cset = new_cset; @@ -101,9 +104,6 @@ cset->add_region(r); } } - // Note that we do not add aged regions if they were not pre-selected. The reason they were not preselected - // is because there is not sufficient room in old-gen to hold their to-be-promoted live objects or because - // they are to be promoted in place. } } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahAgeCensus.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahAgeCensus.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahAgeCensus.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahAgeCensus.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -27,8 +27,15 @@ #include "gc/shenandoah/shenandoahAgeCensus.hpp" #include "gc/shenandoah/shenandoahHeap.inline.hpp" -ShenandoahAgeCensus::ShenandoahAgeCensus() { +ShenandoahAgeCensus::ShenandoahAgeCensus() + : ShenandoahAgeCensus(ShenandoahHeap::heap()->max_workers()) +{ assert(ShenandoahHeap::heap()->mode()->is_generational(), "Only in generational mode"); +} + +ShenandoahAgeCensus::ShenandoahAgeCensus(uint max_workers) + : _max_workers(max_workers) +{ if (ShenandoahGenerationalMinTenuringAge > ShenandoahGenerationalMaxTenuringAge) { vm_exit_during_initialization( err_msg("ShenandoahGenerationalMinTenuringAge=%zu" @@ -39,6 +46,9 @@ _global_age_table = NEW_C_HEAP_ARRAY(AgeTable*, MAX_SNAPSHOTS, mtGC); CENSUS_NOISE(_global_noise = NEW_C_HEAP_ARRAY(ShenandoahNoiseStats, MAX_SNAPSHOTS, mtGC);) _tenuring_threshold = NEW_C_HEAP_ARRAY(uint, MAX_SNAPSHOTS, mtGC); + CENSUS_NOISE(_skipped = 0); + NOT_PRODUCT(_counted = 0); + NOT_PRODUCT(_total = 0); for (int i = 0; i < MAX_SNAPSHOTS; i++) { // Note that we don't now get perfdata from age_table @@ -48,10 +58,9 @@ _tenuring_threshold[i] = MAX_COHORTS; } if (ShenandoahGenerationalAdaptiveTenuring && !ShenandoahGenerationalCensusAtEvac) { - size_t max_workers = ShenandoahHeap::heap()->max_workers(); - _local_age_table = NEW_C_HEAP_ARRAY(AgeTable*, max_workers, mtGC); + _local_age_table = NEW_C_HEAP_ARRAY(AgeTable*, _max_workers, mtGC); CENSUS_NOISE(_local_noise = NEW_C_HEAP_ARRAY(ShenandoahNoiseStats, max_workers, mtGC);) - for (uint i = 0; i < max_workers; i++) { + for (uint i = 0; i < _max_workers; i++) { _local_age_table[i] = new AgeTable(false); CENSUS_NOISE(_local_noise[i].clear();) } @@ -61,6 +70,22 @@ _epoch = MAX_SNAPSHOTS - 1; // see update_epoch() } +ShenandoahAgeCensus::~ShenandoahAgeCensus() { + for (uint i = 0; i < MAX_SNAPSHOTS; i++) { + delete _global_age_table[i]; + } + FREE_C_HEAP_ARRAY(AgeTable*, _global_age_table); + FREE_C_HEAP_ARRAY(uint, _tenuring_threshold); + CENSUS_NOISE(FREE_C_HEAP_ARRAY(ShenandoahNoiseStats, _global_noise)); + if (_local_age_table) { + for (uint i = 0; i < _max_workers; i++) { + delete _local_age_table[i]; + } + FREE_C_HEAP_ARRAY(AgeTable*, _local_age_table); + CENSUS_NOISE(FREE_C_HEAP_ARRAY(ShenandoahNoiseStats, _local_noise)); + } +} + CENSUS_NOISE(void ShenandoahAgeCensus::add(uint obj_age, uint region_age, uint region_youth, size_t size, uint worker_id) {) NO_CENSUS_NOISE(void ShenandoahAgeCensus::add(uint obj_age, uint region_age, size_t size, uint worker_id) {) if (obj_age <= markWord::max_age) { @@ -131,12 +156,11 @@ assert(pv1 == nullptr && pv2 == nullptr, "Error, check caller"); // Seed cohort 0 with population that may have been missed during // regular census. - _global_age_table[_epoch]->add((uint)0, age0_pop); + _global_age_table[_epoch]->add(0u, age0_pop); - size_t max_workers = ShenandoahHeap::heap()->max_workers(); // Merge data from local age tables into the global age table for the epoch, // clearing the local tables. - for (uint i = 0; i < max_workers; i++) { + for (uint i = 0; i < _max_workers; i++) { // age stats _global_age_table[_epoch]->merge(_local_age_table[i]); _local_age_table[i]->clear(); // clear for next census @@ -177,8 +201,7 @@ assert(_local_age_table == nullptr, "Error"); return; } - size_t max_workers = ShenandoahHeap::heap()->max_workers(); - for (uint i = 0; i < max_workers; i++) { + for (uint i = 0; i < _max_workers; i++) { _local_age_table[i]->clear(); CENSUS_NOISE(_local_noise[i].clear();) } @@ -204,8 +227,7 @@ assert(_local_age_table == nullptr, "Error"); return true; } - size_t max_workers = ShenandoahHeap::heap()->max_workers(); - for (uint i = 0; i < max_workers; i++) { + for (uint i = 0; i < _max_workers; i++) { bool clear = _local_age_table[i]->is_clear(); CENSUS_NOISE(clear |= _local_noise[i].is_clear();) if (!clear) { @@ -246,7 +268,7 @@ _tenuring_threshold[_epoch] = tt; } print(); - log_trace(gc, age)("New tenuring threshold %zu (min %zu, max %zu)", + log_info(gc, age)("New tenuring threshold %zu (min %zu, max %zu)", (uintx) _tenuring_threshold[_epoch], ShenandoahGenerationalMinTenuringAge, ShenandoahGenerationalMaxTenuringAge); } @@ -279,13 +301,14 @@ uint upper_bound = ShenandoahGenerationalMaxTenuringAge; const uint prev_tt = previous_tenuring_threshold(); if (ShenandoahGenerationalCensusIgnoreOlderCohorts && prev_tt > 0) { - // We stay below the computed tenuring threshold for the last cycle plus 1, - // ignoring the mortality rates of any older cohorts. - upper_bound = MIN2(upper_bound, prev_tt + 1); + // We stay below the computed tenuring threshold for the last cycle, + // ignoring the mortality rates of any older cohorts (which may see + // higher mortality rates due to promotions). + upper_bound = MIN2(upper_bound, prev_tt); } upper_bound = MIN2(upper_bound, markWord::max_age); - const uint lower_bound = MAX2((uint)ShenandoahGenerationalMinTenuringAge, (uint)1); + const uint lower_bound = MAX2((uint)ShenandoahGenerationalMinTenuringAge, 1u); uint tenuring_threshold = upper_bound; for (uint i = upper_bound; i >= lower_bound; i--) { @@ -303,9 +326,9 @@ // cohorts are considered eligible for tenuring when all older // cohorts are. We return the next higher age as the tenuring threshold // so that we do not prematurely promote objects of this age. - assert(tenuring_threshold == i+1 || tenuring_threshold == upper_bound, "Error"); + assert(tenuring_threshold == i + 1 || tenuring_threshold == upper_bound, "Error"); assert(tenuring_threshold >= lower_bound && tenuring_threshold <= upper_bound, "Error"); - return tenuring_threshold; + return i + 1; } // Remember that we passed over this cohort, looking for younger cohorts // showing high mortality. We want to tenure cohorts of this age. @@ -335,6 +358,14 @@ } void ShenandoahAgeCensus::print() { + + const LogTarget(Debug, gc, age) lt; + if (!lt.is_enabled()) { + return; + } + + LogStream ls(lt); + // Print the population vector for the current epoch, and // for the previous epoch, as well as the computed mortality // ratio for each extant cohort. @@ -350,33 +381,32 @@ for (uint i = 1; i < MAX_COHORTS; i++) { const size_t prev_pop = prev_pv->sizes[i-1]; // (i-1) OK because i >= 1 const size_t cur_pop = cur_pv->sizes[i]; - double mr = mortality_rate(prev_pop, cur_pop); + const double mr = mortality_rate(prev_pop, cur_pop); // Suppress printing when everything is zero if (prev_pop + cur_pop > 0) { - log_info(gc, age) - (" - age %3u: prev %10zu bytes, curr %10zu bytes, mortality %.2f ", - i, prev_pop*oopSize, cur_pop*oopSize, mr); + ls.print_cr(" - age %3u: prev %10zu bytes, curr %10zu bytes, mortality %.2f ", + i, prev_pop * oopSize, cur_pop * oopSize, mr); } total += cur_pop; if (i == tt) { // Underline the cohort for tenuring threshold (if < MAX_COHORTS) - log_info(gc, age)("----------------------------------------------------------------------------"); + ls.print_cr("----------------------------------------------------------------------------"); } } - CENSUS_NOISE(_global_noise[cur_epoch].print(total);) + CENSUS_NOISE(_global_noise[cur_epoch].print(ls, total);) } #ifdef SHENANDOAH_CENSUS_NOISE -void ShenandoahNoiseStats::print(size_t total) { +void ShenandoahNoiseStats::print(LogStream& ls, const size_t total) { if (total > 0) { - float f_skipped = (float)skipped/(float)total; - float f_aged = (float)aged/(float)total; - float f_clamped = (float)clamped/(float)total; - float f_young = (float)young/(float)total; - log_info(gc, age)("Skipped: %10zu (%.2f), R-Aged: %10zu (%.2f), " - "Clamped: %10zu (%.2f), R-Young: %10zu (%.2f)", - skipped*oopSize, f_skipped, aged*oopSize, f_aged, - clamped*oopSize, f_clamped, young*oopSize, f_young); + const float f_skipped = (float)skipped/(float)total; + const float f_aged = (float)aged/(float)total; + const float f_clamped = (float)clamped/(float)total; + const float f_young = (float)young/(float)total; + ls.print_cr("Skipped: %10zu (%.2f), R-Aged: %10zu (%.2f), " + "Clamped: %10zu (%.2f), R-Young: %10zu (%.2f)", + skipped*oopSize, f_skipped, aged*oopSize, f_aged, + clamped*oopSize, f_clamped, young*oopSize, f_young); } } #endif // SHENANDOAH_CENSUS_NOISE diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahAgeCensus.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahAgeCensus.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahAgeCensus.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahAgeCensus.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -37,6 +37,8 @@ #define CENSUS_NOISE(x) x #define NO_CENSUS_NOISE(x) +class LogStream; + struct ShenandoahNoiseStats { size_t skipped; // Volume of objects skipped size_t aged; // Volume of objects from aged regions @@ -67,7 +69,7 @@ young += other.young; } - void print(size_t total); + void print(LogStream& ls, size_t total); }; #else // SHENANDOAH_CENSUS_NOISE #define CENSUS_NOISE(x) @@ -91,7 +93,7 @@ // // In addition, this class also maintains per worker population vectors into which // census for the current minor GC is accumulated (during marking or, optionally, during -// evacuation). These are cleared after each marking (resectively, evacuation) cycle, +// evacuation). These are cleared after each marking (respectively, evacuation) cycle, // once the per-worker data is consolidated into the appropriate population vector // per minor collection. The _local_age_table is thus C x N, for N GC workers. class ShenandoahAgeCensus: public CHeapObj { @@ -111,10 +113,12 @@ size_t _total; // net size of objects encountered (counted or skipped) in census #endif - uint _epoch; // Current epoch (modulo max age) - uint *_tenuring_threshold; // An array of the last N tenuring threshold values we + uint _epoch; // Current epoch (modulo max age) + uint* _tenuring_threshold; // An array of the last N tenuring threshold values we // computed. + uint _max_workers; // Maximum number of workers for parallel tasks + // Mortality rate of a cohort, given its population in // previous and current epochs double mortality_rate(size_t prev_pop, size_t cur_pop); @@ -165,11 +169,22 @@ }; ShenandoahAgeCensus(); + ShenandoahAgeCensus(uint max_workers); + ~ShenandoahAgeCensus(); // Return the local age table (population vector) for worker_id. // Only used in the case of (ShenandoahGenerationalAdaptiveTenuring && !ShenandoahGenerationalCensusAtEvac) - AgeTable* get_local_age_table(uint worker_id) { - return (AgeTable*) _local_age_table[worker_id]; + AgeTable* get_local_age_table(uint worker_id) const { + return _local_age_table[worker_id]; + } + + // Return the most recently computed tenuring threshold. + // Visible for testing. Use is_tenurable for consistent tenuring comparisons. + uint tenuring_threshold() const { return _tenuring_threshold[_epoch]; } + + // Return true if this age is at or above the tenuring threshold. + bool is_tenurable(uint age) const { + return age >= tenuring_threshold(); } // Update the local age table for worker_id by size for @@ -201,9 +216,6 @@ // is 0, because the evacuated objects have all had their ages incremented. void update_census(size_t age0_pop, AgeTable* pv1 = nullptr, AgeTable* pv2 = nullptr); - // Return the most recently computed tenuring threshold - uint tenuring_threshold() const { return _tenuring_threshold[_epoch]; } - // Reset the epoch, clearing accumulated census history // Note: this isn't currently used, but reserved for planned // future usage. diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahAllocRequest.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahAllocRequest.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahAllocRequest.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahAllocRequest.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -34,6 +34,7 @@ enum Type { _alloc_shared, // Allocate common, outside of TLAB _alloc_shared_gc, // Allocate common, outside of GCLAB/PLAB + _alloc_cds, // Allocate for CDS _alloc_tlab, // Allocate TLAB _alloc_gclab, // Allocate GCLAB _alloc_plab, // Allocate PLAB @@ -46,6 +47,8 @@ return "Shared"; case _alloc_shared_gc: return "Shared GC"; + case _alloc_cds: + return "CDS"; case _alloc_tlab: return "TLAB"; case _alloc_gclab: @@ -121,6 +124,10 @@ return ShenandoahAllocRequest(0, requested_size, _alloc_shared, ShenandoahAffiliation::YOUNG_GENERATION); } + static inline ShenandoahAllocRequest for_cds(size_t requested_size) { + return ShenandoahAllocRequest(0, requested_size, _alloc_cds, ShenandoahAffiliation::YOUNG_GENERATION); + } + inline size_t size() const { return _requested_size; } @@ -163,6 +170,7 @@ switch (_alloc_type) { case _alloc_tlab: case _alloc_shared: + case _alloc_cds: return true; case _alloc_gclab: case _alloc_plab: @@ -178,6 +186,7 @@ switch (_alloc_type) { case _alloc_tlab: case _alloc_shared: + case _alloc_cds: return false; case _alloc_gclab: case _alloc_plab: @@ -197,6 +206,7 @@ return true; case _alloc_shared: case _alloc_shared_gc: + case _alloc_cds: return false; default: ShouldNotReachHere(); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -27,6 +27,7 @@ #include "gc/shenandoah/shenandoahAgeCensus.hpp" #include "gc/shenandoah/shenandoahCollectionSet.hpp" +#include "gc/shenandoah/shenandoahGenerationalHeap.inline.hpp" #include "gc/shenandoah/shenandoahHeap.inline.hpp" #include "gc/shenandoah/shenandoahHeapRegion.inline.hpp" #include "gc/shenandoah/shenandoahHeapRegionSet.hpp" @@ -98,7 +99,7 @@ if (r->is_young()) { _young_bytes_to_evacuate += live; _young_available_bytes_collected += free; - if (ShenandoahHeap::heap()->mode()->is_generational() && r->age() >= ShenandoahGenerationalHeap::heap()->age_census()->tenuring_threshold()) { + if (ShenandoahHeap::heap()->mode()->is_generational() && ShenandoahGenerationalHeap::heap()->is_tenurable(r)) { _young_bytes_to_promote += live; } } else if (r->is_old()) { diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -37,6 +37,7 @@ _abbreviated_degenerated_gcs(0), _success_full_gcs(0), _consecutive_degenerated_gcs(0), + _consecutive_degenerated_gcs_without_progress(0), _consecutive_young_gcs(0), _mixed_gcs(0), _success_old_gcs(0), @@ -67,14 +68,14 @@ } void ShenandoahCollectorPolicy::record_degenerated_upgrade_to_full() { - _consecutive_degenerated_gcs = 0; + reset_consecutive_degenerated_gcs(); _alloc_failure_degenerated_upgrade_to_full++; } void ShenandoahCollectorPolicy::record_success_concurrent(bool is_young, bool is_abbreviated) { update_young(is_young); - _consecutive_degenerated_gcs = 0; + reset_consecutive_degenerated_gcs(); _success_concurrent_gcs++; if (is_abbreviated) { _abbreviated_concurrent_gcs++; @@ -95,11 +96,18 @@ _interrupted_old_gcs++; } -void ShenandoahCollectorPolicy::record_success_degenerated(bool is_young, bool is_abbreviated) { +void ShenandoahCollectorPolicy::record_degenerated(bool is_young, bool is_abbreviated, bool progress) { update_young(is_young); _success_degenerated_gcs++; _consecutive_degenerated_gcs++; + + if (progress) { + _consecutive_degenerated_gcs_without_progress = 0; + } else { + _consecutive_degenerated_gcs_without_progress++; + } + if (is_abbreviated) { _abbreviated_degenerated_gcs++; } @@ -114,7 +122,7 @@ } void ShenandoahCollectorPolicy::record_success_full() { - _consecutive_degenerated_gcs = 0; + reset_consecutive_degenerated_gcs(); _consecutive_young_gcs = 0; _success_full_gcs++; } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahCollectorPolicy.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -42,6 +42,7 @@ // Written by control thread, read by mutators volatile size_t _success_full_gcs; uint _consecutive_degenerated_gcs; + uint _consecutive_degenerated_gcs_without_progress; volatile size_t _consecutive_young_gcs; size_t _mixed_gcs; size_t _success_old_gcs; @@ -55,8 +56,25 @@ ShenandoahSharedFlag _in_shutdown; ShenandoahTracer* _tracer; + void reset_consecutive_degenerated_gcs() { + _consecutive_degenerated_gcs = 0; + _consecutive_degenerated_gcs_without_progress = 0; + } public: + // The most common scenario for lack of good progress following a degenerated GC is an accumulation of floating + // garbage during the most recently aborted concurrent GC effort. With generational GC, it is far more effective to + // reclaim this floating garbage with another degenerated cycle (which focuses on young generation and might require + // a pause of 200 ms) rather than a full GC cycle (which may require over 2 seconds with a 10 GB old generation). + // + // In generational mode, we'll only upgrade to full GC if we've done two degen cycles in a row and both indicated + // bad progress. In non-generational mode, we'll preserve the original behavior, which is to upgrade to full + // immediately following a degenerated cycle with bad progress. This preserves original behavior of non-generational + // Shenandoah to avoid introducing "surprising new behavior." It also makes less sense with non-generational + // Shenandoah to replace a full GC with a degenerated GC, because both have similar pause times in non-generational + // mode. + static constexpr size_t GENERATIONAL_CONSECUTIVE_BAD_DEGEN_PROGRESS_THRESHOLD = 2; + ShenandoahCollectorPolicy(); void record_mixed_cycle(); @@ -69,7 +87,12 @@ // cycles are very efficient and are worth tracking. Note that both degenerated and // concurrent cycles can be abbreviated. void record_success_concurrent(bool is_young, bool is_abbreviated); - void record_success_degenerated(bool is_young, bool is_abbreviated); + + // Record that a degenerated cycle has been completed. Note that such a cycle may or + // may not make "progress". We separately track the total number of degenerated cycles, + // the number of consecutive degenerated cycles and the number of consecutive cycles that + // fail to make good progress. + void record_degenerated(bool is_young, bool is_abbreviated, bool progress); void record_success_full(); void record_alloc_failure_to_degenerated(ShenandoahGC::ShenandoahDegenPoint point); void record_alloc_failure_to_full(); @@ -94,6 +117,11 @@ return _consecutive_degenerated_gcs; } + // Genshen will only upgrade to a full gc after the configured number of futile degenerated cycles. + bool generational_should_upgrade_degenerated_gc() const { + return _consecutive_degenerated_gcs_without_progress >= GENERATIONAL_CONSECUTIVE_BAD_DEGEN_PROGRESS_THRESHOLD; + } + static bool is_allocation_failure(GCCause::Cause cause); static bool is_shenandoah_gc(GCCause::Cause cause); static bool is_requested_gc(GCCause::Cause cause); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahConcurrentGC.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -831,7 +831,6 @@ return heap->mode()->is_generational() && heap->old_generation()->has_in_place_promotions(); } -template class ShenandoahConcurrentEvacThreadClosure : public ThreadClosure { private: OopClosure* const _oops; @@ -841,13 +840,9 @@ void do_thread(Thread* thread) override { JavaThread* const jt = JavaThread::cast(thread); StackWatermarkSet::finish_processing(jt, _oops, StackWatermarkKind::gc); - if (GENERATIONAL) { - ShenandoahThreadLocalData::enable_plab_promotions(thread); - } } }; -template class ShenandoahConcurrentEvacUpdateThreadTask : public WorkerTask { private: ShenandoahJavaThreadsIterator _java_threads; @@ -859,30 +854,20 @@ } void work(uint worker_id) override { - if (GENERATIONAL) { - Thread* worker_thread = Thread::current(); - ShenandoahThreadLocalData::enable_plab_promotions(worker_thread); - } - // ShenandoahEvacOOMScope has to be setup by ShenandoahContextEvacuateUpdateRootsClosure. // Otherwise, may deadlock with watermark lock ShenandoahContextEvacuateUpdateRootsClosure oops_cl; - ShenandoahConcurrentEvacThreadClosure thr_cl(&oops_cl); + ShenandoahConcurrentEvacThreadClosure thr_cl(&oops_cl); _java_threads.threads_do(&thr_cl, worker_id); } }; void ShenandoahConcurrentGC::op_thread_roots() { - ShenandoahHeap* const heap = ShenandoahHeap::heap(); + const ShenandoahHeap* const heap = ShenandoahHeap::heap(); assert(heap->is_evacuation_in_progress(), "Checked by caller"); ShenandoahGCWorkerPhase worker_phase(ShenandoahPhaseTimings::conc_thread_roots); - if (heap->mode()->is_generational()) { - ShenandoahConcurrentEvacUpdateThreadTask task(heap->workers()->active_workers()); - heap->workers()->run_task(&task); - } else { - ShenandoahConcurrentEvacUpdateThreadTask task(heap->workers()->active_workers()); - heap->workers()->run_task(&task); - } + ShenandoahConcurrentEvacUpdateThreadTask task(heap->workers()->active_workers()); + heap->workers()->run_task(&task); } void ShenandoahConcurrentGC::op_weak_refs() { @@ -1213,6 +1198,7 @@ // We are not concerned about skipping this step in abbreviated cycles because regions // with no live objects cannot have been written to and so cannot have entries in the SATB // buffers. + ShenandoahGCPhase phase(ShenandoahPhaseTimings::final_update_refs_transfer_satb); heap->old_generation()->transfer_pointers_from_satb(); // Aging_cycle is only relevant during evacuation cycle for individual objects and during final mark for diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahControlThread.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2013, 2021, Red Hat, Inc. All rights reserved. - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -49,8 +49,7 @@ ShenandoahGC(), _degen_point(degen_point), _generation(generation), - _abbreviated(false), - _consecutive_degen_with_bad_progress(0) { + _abbreviated(false) { } bool ShenandoahDegenGC::collect(GCCause::Cause cause) { @@ -247,7 +246,6 @@ ShenandoahHeapRegion* r; while ((r = heap->collection_set()->next()) != nullptr) { if (r->is_pinned()) { - heap->cancel_gc(GCCause::_shenandoah_upgrade_to_full_gc); op_degenerated_fail(); return; } @@ -312,30 +310,14 @@ metrics.snap_after(); - // The most common scenario for lack of good progress following a degenerated GC is an accumulation of floating - // garbage during the most recently aborted concurrent GC effort. With generational GC, it is far more effective to - // reclaim this floating garbage with another degenerated cycle (which focuses on young generation and might require - // a pause of 200 ms) rather than a full GC cycle (which may require over 2 seconds with a 10 GB old generation). - // - // In generational mode, we'll only upgrade to full GC if we've done two degen cycles in a row and both indicated - // bad progress. In non-generational mode, we'll preserve the original behavior, which is to upgrade to full - // immediately following a degenerated cycle with bad progress. This preserves original behavior of non-generational - // Shenandoah so as to avoid introducing "surprising new behavior." It also makes less sense with non-generational - // Shenandoah to replace a full GC with a degenerated GC, because both have similar pause times in non-generational - // mode. - if (!metrics.is_good_progress(_generation)) { - _consecutive_degen_with_bad_progress++; - } else { - _consecutive_degen_with_bad_progress = 0; - } - if (!heap->mode()->is_generational() || - ((heap->shenandoah_policy()->consecutive_degenerated_gc_count() > 1) && (_consecutive_degen_with_bad_progress >= 2))) { - heap->cancel_gc(GCCause::_shenandoah_upgrade_to_full_gc); - op_degenerated_futile(); - } else { + // Decide if this cycle made good progress, and, if not, should it upgrade to a full GC. + const bool progress = metrics.is_good_progress(_generation); + ShenandoahCollectorPolicy* policy = heap->shenandoah_policy(); + policy->record_degenerated(_generation->is_young(), _abbreviated, progress); + if (progress) { heap->notify_gc_progress(); - heap->shenandoah_policy()->record_success_degenerated(_generation->is_young(), _abbreviated); - _generation->heuristics()->record_success_degenerated(); + } else if (!heap->mode()->is_generational() || policy->generational_should_upgrade_degenerated_gc()) { + op_degenerated_futile(); } } @@ -482,7 +464,9 @@ void ShenandoahDegenGC::upgrade_to_full() { log_info(gc)("Degenerated GC upgrading to Full GC"); - ShenandoahHeap::heap()->shenandoah_policy()->record_degenerated_upgrade_to_full(); + ShenandoahHeap* heap = ShenandoahHeap::heap(); + heap->cancel_gc(GCCause::_shenandoah_upgrade_to_full_gc); + heap->shenandoah_policy()->record_degenerated_upgrade_to_full(); ShenandoahFullGC full_gc; full_gc.op_full(GCCause::_shenandoah_upgrade_to_full_gc); } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahDegeneratedGC.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -36,7 +36,6 @@ const ShenandoahDegenPoint _degen_point; ShenandoahGeneration* _generation; bool _abbreviated; - size_t _consecutive_degen_with_bad_progress; public: ShenandoahDegenGC(ShenandoahDegenPoint degen_point, ShenandoahGeneration* generation); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -816,6 +816,7 @@ switch (req.type()) { case ShenandoahAllocRequest::_alloc_tlab: case ShenandoahAllocRequest::_alloc_shared: + case ShenandoahAllocRequest::_alloc_cds: return allocate_for_mutator(req, in_new_region); case ShenandoahAllocRequest::_alloc_gclab: case ShenandoahAllocRequest::_alloc_plab: @@ -880,7 +881,7 @@ for (idx_t idx = iterator.current(); iterator.has_next(); idx = iterator.next()) { ShenandoahHeapRegion* r = _heap->get_region(idx); size_t min_size = (req.type() == ShenandoahAllocRequest::_alloc_tlab) ? req.min_size() : req.size(); - if (alloc_capacity(r) >= min_size) { + if (alloc_capacity(r) >= min_size * HeapWordSize) { HeapWord* result = try_allocate_in(r, req, in_new_region); if (result != nullptr) { return result; @@ -1169,8 +1170,8 @@ return result; } -HeapWord* ShenandoahFreeSet::allocate_contiguous(ShenandoahAllocRequest& req) { - assert(req.is_mutator_alloc(), "All humongous allocations are performed by mutator"); +HeapWord* ShenandoahFreeSet::allocate_contiguous(ShenandoahAllocRequest& req, bool is_humongous) { + assert(req.is_mutator_alloc(), "All contiguous allocations are performed by mutator"); shenandoah_assert_heaplocked(); size_t words_size = req.size(); @@ -1244,10 +1245,16 @@ assert(i == beg || _heap->get_region(i - 1)->index() + 1 == r->index(), "Should be contiguous"); assert(r->is_empty(), "Should be empty"); - if (i == beg) { - r->make_humongous_start(); + r->set_affiliation(req.affiliation()); + + if (is_humongous) { + if (i == beg) { + r->make_humongous_start(); + } else { + r->make_humongous_cont(); + } } else { - r->make_humongous_cont(); + r->make_regular_allocation(req.affiliation()); } // Trailing region may be non-full, record the remainder there @@ -1257,8 +1264,6 @@ } else { used_words = ShenandoahHeapRegion::region_size_words(); } - - r->set_affiliation(req.affiliation()); r->set_update_watermark(r->bottom()); r->set_top(r->bottom() + used_words); } @@ -1268,14 +1273,26 @@ _heap->notify_mutator_alloc_words(ShenandoahHeapRegion::region_size_words() - remainder, true); } - // retire_range_from_partition() will adjust bounds on Mutator free set if appropriate - _partitions.retire_range_from_partition(ShenandoahFreeSetPartitionId::Mutator, beg, end); - - size_t total_humongous_size = ShenandoahHeapRegion::region_size_bytes() * num; - _partitions.increase_used(ShenandoahFreeSetPartitionId::Mutator, total_humongous_size); + size_t total_used = 0; + if (is_humongous) { + // Humongous allocation retires all regions at once: no allocation is possible anymore. + _partitions.retire_range_from_partition(ShenandoahFreeSetPartitionId::Mutator, beg, end); + total_used = ShenandoahHeapRegion::region_size_bytes() * num; + } else { + // Non-humongous allocation retires only the regions that cannot be used for allocation anymore. + for (idx_t i = beg; i <= end; i++) { + ShenandoahHeapRegion* r = _heap->get_region(i); + if (r->free() < PLAB::min_size() * HeapWordSize) { + _partitions.retire_from_partition(ShenandoahFreeSetPartitionId::Mutator, i, r->used()); + } + total_used += r->used(); + } + } + _partitions.increase_used(ShenandoahFreeSetPartitionId::Mutator, total_used); _partitions.assert_bounds(); + req.set_actual_size(words_size); - if (remainder != 0) { + if (remainder != 0 && is_humongous) { req.set_waste(ShenandoahHeapRegion::region_size_words() - remainder); } return _heap->get_region(beg)->bottom(); @@ -2064,7 +2081,10 @@ case ShenandoahAllocRequest::_alloc_shared: case ShenandoahAllocRequest::_alloc_shared_gc: in_new_region = true; - return allocate_contiguous(req); + return allocate_contiguous(req, /* is_humongous = */ true); + case ShenandoahAllocRequest::_alloc_cds: + in_new_region = true; + return allocate_contiguous(req, /* is_humongous = */ false); case ShenandoahAllocRequest::_alloc_plab: case ShenandoahAllocRequest::_alloc_gclab: case ShenandoahAllocRequest::_alloc_tlab: diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahFreeSet.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -345,7 +345,7 @@ // object. No other objects are packed into these regions. // // Precondition: ShenandoahHeapRegion::requires_humongous(req.size()) - HeapWord* allocate_contiguous(ShenandoahAllocRequest& req); + HeapWord* allocate_contiguous(ShenandoahAllocRequest& req, bool is_humongous); // Change region r from the Mutator partition to the GC's Collector or OldCollector partition. This requires that the // region is entirely empty. diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGeneration.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -28,9 +28,8 @@ #include "gc/shenandoah/shenandoahCollectorPolicy.hpp" #include "gc/shenandoah/shenandoahFreeSet.hpp" #include "gc/shenandoah/shenandoahGeneration.hpp" -#include "gc/shenandoah/shenandoahGenerationalHeap.hpp" +#include "gc/shenandoah/shenandoahGenerationalHeap.inline.hpp" #include "gc/shenandoah/shenandoahHeapRegionClosures.hpp" -#include "gc/shenandoah/shenandoahMonitoringSupport.hpp" #include "gc/shenandoah/shenandoahOldGeneration.hpp" #include "gc/shenandoah/shenandoahReferenceProcessor.hpp" #include "gc/shenandoah/shenandoahScanRemembered.inline.hpp" @@ -534,7 +533,6 @@ bool* const candidate_regions_for_promotion_by_copy = heap->collection_set()->preselected_regions(); ShenandoahMarkingContext* const ctx = heap->marking_context(); - const uint tenuring_threshold = heap->age_census()->tenuring_threshold(); const size_t old_garbage_threshold = (ShenandoahHeapRegion::region_size_bytes() * ShenandoahOldGarbageThreshold) / 100; size_t old_consumed = 0; @@ -558,7 +556,7 @@ // skip over regions that aren't regular young with some live data continue; } - if (r->age() >= tenuring_threshold) { + if (heap->is_tenurable(r)) { if ((r->garbage() < old_garbage_threshold)) { // This tenure-worthy region has too little garbage, so we do not want to expend the copying effort to // reclaim the garbage; instead this region may be eligible for promotion-in-place to the @@ -613,7 +611,7 @@ // these regions. The likely outcome is that these regions will not be selected for evacuation or promotion // in the current cycle and we will anticipate that they will be promoted in the next cycle. This will cause // us to reserve more old-gen memory so that these objects can be promoted in the subsequent cycle. - if (heap->is_aging_cycle() && (r->age() + 1 == tenuring_threshold)) { + if (heap->is_aging_cycle() && heap->age_census()->is_tenurable(r->age() + 1)) { if (r->garbage() >= old_garbage_threshold) { promo_potential += r->get_live_data_bytes(); } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalControlThread.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2013, 2021, Red Hat, Inc. All rights reserved. - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. All rights reserved. * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -26,7 +26,7 @@ #include "gc/shenandoah/shenandoahAsserts.hpp" #include "gc/shenandoah/shenandoahFreeSet.hpp" #include "gc/shenandoah/shenandoahGenerationalEvacuationTask.hpp" -#include "gc/shenandoah/shenandoahGenerationalHeap.hpp" +#include "gc/shenandoah/shenandoahGenerationalHeap.inline.hpp" #include "gc/shenandoah/shenandoahHeap.inline.hpp" #include "gc/shenandoah/shenandoahOldGeneration.hpp" #include "gc/shenandoah/shenandoahPacer.hpp" @@ -57,11 +57,9 @@ _heap(heap), _regions(iterator), _concurrent(concurrent), - _only_promote_regions(only_promote_regions), - _tenuring_threshold(0) + _only_promote_regions(only_promote_regions) { shenandoah_assert_generational(); - _tenuring_threshold = _heap->age_census()->tenuring_threshold(); } void ShenandoahGenerationalEvacuationTask::work(uint worker_id) { @@ -142,7 +140,7 @@ void ShenandoahGenerationalEvacuationTask::maybe_promote_region(ShenandoahHeapRegion* r) { - if (r->is_young() && r->is_active() && (r->age() >= _tenuring_threshold)) { + if (r->is_young() && r->is_active() && _heap->is_tenurable(r)) { if (r->is_humongous_start()) { // We promote humongous_start regions along with their affiliated continuations during evacuation rather than // doing this work during a safepoint. We cannot put humongous regions into the collection set because that @@ -180,7 +178,7 @@ assert(region->garbage_before_padded_for_promote() < old_garbage_threshold, "Region %zu has too much garbage for promotion", region->index()); assert(region->is_young(), "Only young regions can be promoted"); assert(region->is_regular(), "Use different service to promote humongous regions"); - assert(region->age() >= _tenuring_threshold, "Only promote regions that are sufficiently aged"); + assert(_heap->is_tenurable(region), "Only promote regions that are sufficiently aged"); assert(region->get_top_before_promote() == tams, "Region %zu has been used for allocations before promotion", region->index()); } @@ -263,7 +261,7 @@ shenandoah_assert_generations_reconciled(); assert(region->is_young(), "Only young regions can be promoted"); assert(region->is_humongous_start(), "Should not promote humongous continuation in isolation"); - assert(region->age() >= _tenuring_threshold, "Only promote regions that are sufficiently aged"); + assert(_heap->is_tenurable(region), "Only promote regions that are sufficiently aged"); assert(marking_context->is_marked(obj), "promoted humongous object should be alive"); const size_t used_bytes = obj->size() * HeapWordSize; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalEvacuationTask.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -39,7 +39,6 @@ ShenandoahRegionIterator* _regions; bool _concurrent; bool _only_promote_regions; - uint _tenuring_threshold; public: ShenandoahGenerationalEvacuationTask(ShenandoahGenerationalHeap* sh, diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalFullGC.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalFullGC.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalFullGC.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalFullGC.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -193,7 +193,6 @@ ShenandoahHeapRegion* from_region, uint worker_id) : _preserved_marks(preserved_marks), _heap(ShenandoahGenerationalHeap::heap()), - _tenuring_threshold(0), _empty_regions(empty_regions), _empty_regions_pos(0), _old_to_region(nullptr), @@ -212,8 +211,6 @@ _young_to_region = from_region; _young_compact_point = from_region->bottom(); } - - _tenuring_threshold = _heap->age_census()->tenuring_threshold(); } void ShenandoahPrepareForGenerationalCompactionObjectClosure::set_from_region(ShenandoahHeapRegion* from_region) { @@ -279,7 +276,7 @@ bool promote_object = false; if ((_from_affiliation == ShenandoahAffiliation::YOUNG_GENERATION) && - (from_region_age + object_age >= _tenuring_threshold)) { + _heap->age_census()->is_tenurable(from_region_age + object_age)) { if ((_old_to_region != nullptr) && (_old_compact_point + obj_size > _old_to_region->end())) { finish_old_region(); _old_to_region = nullptr; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalFullGC.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalFullGC.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalFullGC.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalFullGC.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -90,7 +90,6 @@ private: PreservedMarks* const _preserved_marks; ShenandoahGenerationalHeap* const _heap; - uint _tenuring_threshold; // _empty_regions is a thread-local list of heap regions that have been completely emptied by this worker thread's // compaction efforts. The worker thread that drives these efforts adds compacted regions to this list if the diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -244,7 +244,7 @@ if (mark.has_displaced_mark_helper()) { // We don't want to deal with MT here just to ensure we read the right mark word. // Skip the potential promotion attempt for this one. - } else if (r->age() + mark.age() >= age_census()->tenuring_threshold()) { + } else if (age_census()->is_tenurable(r->age() + mark.age())) { oop result = try_evacuate_object(p, thread, r, OLD_GENERATION); if (result != nullptr) { return result; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -81,6 +81,8 @@ return _age_census; } + inline bool is_tenurable(const ShenandoahHeapRegion* r) const; + ShenandoahEvacuationTracker* evac_tracker() const { return _evac_tracker; } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.inline.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.inline.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.inline.hpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahGenerationalHeap.inline.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,37 @@ +/* + * Copyright Amazon.com Inc. 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_GC_SHENANDOAH_SHENANDOAHGENERATIONALHEAP_INLINE_HPP +#define SHARE_GC_SHENANDOAH_SHENANDOAHGENERATIONALHEAP_INLINE_HPP + +#include "gc/shenandoah/shenandoahGenerationalHeap.hpp" + +#include "gc/shenandoah/shenandoahAgeCensus.hpp" +#include "gc/shenandoah/shenandoahHeapRegion.hpp" + +inline bool ShenandoahGenerationalHeap::is_tenurable(const ShenandoahHeapRegion* r) const { + return _age_census->is_tenurable(r->age()); +} + +#endif // SHARE_GC_SHENANDOAH_SHENANDOAHGENERATIONALHEAP_INLINE_HPP diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1238,6 +1238,11 @@ // 1. We need to make the plab memory parsable by remembered-set scanning. // 2. We need to establish a trustworthy UpdateWaterMark value within each old-gen heap region ShenandoahGenerationalHeap::heap()->retire_plab(plab, thread); + + // Re-enable promotions for the next evacuation phase. + ShenandoahThreadLocalData::enable_plab_promotions(thread); + + // Reset the fill size for next evacuation phase. if (_resize && ShenandoahThreadLocalData::plab_size(thread) > 0) { ShenandoahThreadLocalData::set_plab_size(thread, 0); } @@ -2791,41 +2796,15 @@ HeapWord* ShenandoahHeap::allocate_loaded_archive_space(size_t size) { #if INCLUDE_CDS_JAVA_HEAP - // CDS wants a continuous memory range to load a bunch of objects. - // This effectively bypasses normal allocation paths, and requires - // a bit of massaging to unbreak GC invariants. - - ShenandoahAllocRequest req = ShenandoahAllocRequest::for_shared(size); - - // Easy case: a single regular region, no further adjustments needed. - if (!ShenandoahHeapRegion::requires_humongous(size)) { - return allocate_memory(req); - } - - // Hard case: the requested size would cause a humongous allocation. - // We need to make sure it looks like regular allocation to the rest of GC. - - // CDS code would guarantee no objects straddle multiple regions, as long as - // regions are as large as MIN_GC_REGION_ALIGNMENT. It is impractical at this - // point to deal with case when Shenandoah runs with smaller regions. - // TODO: This check can be dropped once MIN_GC_REGION_ALIGNMENT agrees more with Shenandoah. - if (ShenandoahHeapRegion::region_size_bytes() < ArchiveHeapWriter::MIN_GC_REGION_ALIGNMENT) { - return nullptr; - } + // CDS wants a raw continuous memory range to load a bunch of objects itself. + // This is an unusual request, since all requested regions should be regular, not humongous. + // + // CDS would guarantee no objects straddle multiple regions, as long as regions are as large + // as MIN_GC_REGION_ALIGNMENT. + guarantee(ShenandoahHeapRegion::region_size_bytes() >= ArchiveHeapWriter::MIN_GC_REGION_ALIGNMENT, "Must be"); - HeapWord* mem = allocate_memory(req); - size_t start_idx = heap_region_index_containing(mem); - size_t num_regions = ShenandoahHeapRegion::required_regions(size * HeapWordSize); - - // Flip humongous -> regular. - { - ShenandoahHeapLocker locker(lock(), false); - for (size_t c = start_idx; c < start_idx + num_regions; c++) { - get_region(c)->make_regular_bypass(); - } - } - - return mem; + ShenandoahAllocRequest req = ShenandoahAllocRequest::for_cds(size); + return allocate_memory(req); #else assert(false, "Archive heap loader should not be available, should not be here"); return nullptr; @@ -2852,17 +2831,25 @@ "Archive space should be fully used: " PTR_FORMAT " " PTR_FORMAT, p2i(cur), p2i(end)); - // Region bounds are good. - ShenandoahHeapRegion* begin_reg = heap_region_containing(start); - ShenandoahHeapRegion* end_reg = heap_region_containing(end); - assert(begin_reg->is_regular(), "Must be"); - assert(end_reg->is_regular(), "Must be"); - assert(begin_reg->bottom() == start, - "Must agree: archive-space-start: " PTR_FORMAT ", begin-region-bottom: " PTR_FORMAT, - p2i(start), p2i(begin_reg->bottom())); - assert(end_reg->top() == end, - "Must agree: archive-space-end: " PTR_FORMAT ", end-region-top: " PTR_FORMAT, - p2i(end), p2i(end_reg->top())); + // All regions in contiguous space have good state. + size_t begin_reg_idx = heap_region_index_containing(start); + size_t end_reg_idx = heap_region_index_containing(end); + + for (size_t idx = begin_reg_idx; idx <= end_reg_idx; idx++) { + ShenandoahHeapRegion* r = get_region(idx); + assert(r->is_regular(), "Must be regular"); + assert(r->is_young(), "Must be young"); + assert(idx == end_reg_idx || r->top() == r->end(), + "All regions except the last one should be full: " PTR_FORMAT " " PTR_FORMAT, + p2i(r->top()), p2i(r->end())); + assert(idx != begin_reg_idx || r->bottom() == start, + "Archive space start should be at the bottom of first region: " PTR_FORMAT " " PTR_FORMAT, + p2i(r->bottom()), p2i(start)); + assert(idx != end_reg_idx || r->top() == end, + "Archive space end should be at the top of last region: " PTR_FORMAT " " PTR_FORMAT, + p2i(r->top()), p2i(end)); + } + #endif } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -680,7 +680,7 @@ // ---------- CDS archive support - bool can_load_archived_objects() const override { return !ShenandoahCardBarrier; } + bool can_load_archived_objects() const override { return true; } HeapWord* allocate_loaded_archive_space(size_t size) override; void complete_loaded_archive_space(MemRegion archive_space) override; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -142,27 +142,17 @@ void ShenandoahHeapRegion::make_regular_bypass() { shenandoah_assert_heaplocked(); - assert (!Universe::is_fully_initialized() || - ShenandoahHeap::heap()->is_full_gc_in_progress() || + assert (ShenandoahHeap::heap()->is_full_gc_in_progress() || ShenandoahHeap::heap()->is_degenerated_gc_in_progress(), - "Only for STW GC or when Universe is initializing (CDS)"); + "Only for STW GC"); reset_age(); - auto cur_state = state(); - switch (cur_state) { + switch (state()) { case _empty_uncommitted: do_commit(); case _empty_committed: case _cset: case _humongous_start: case _humongous_cont: - if (cur_state == _humongous_start || cur_state == _humongous_cont) { - // CDS allocates chunks of the heap to fill with regular objects. The allocator - // will dutifully track any waste in the unused portion of the last region. Once - // CDS has finished initializing the objects, it will convert these regions to - // regular regions. The 'waste' in the last region is no longer wasted at this point, - // so we must stop treating it as such. - decrement_humongous_waste(); - } set_state(_regular); return; case _pinned_cset: diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.inline.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.inline.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.inline.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.inline.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -113,6 +113,7 @@ switch (type) { case ShenandoahAllocRequest::_alloc_shared: case ShenandoahAllocRequest::_alloc_shared_gc: + case ShenandoahAllocRequest::_alloc_cds: // Counted implicitly by tlab/gclab allocs break; case ShenandoahAllocRequest::_alloc_tlab: diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/shenandoah/shenandoahPhaseTimings.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -126,6 +126,7 @@ f(final_update_refs, "Pause Final Update Refs (N)") \ f(final_update_refs_verify, " Verify") \ f(final_update_refs_update_region_states, " Update Region States") \ + f(final_update_refs_transfer_satb, " Transfer Old From SATB") \ f(final_update_refs_trash_cset, " Trash Collection Set") \ f(final_update_refs_rebuild_freeset, " Rebuild Free Set") \ f(final_update_refs_propagate_gc_state, " Propagate GC State") \ diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/gc/z/zPageAllocator.cpp openjdk-25-25.0.2+10/src/hotspot/share/gc/z/zPageAllocator.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/gc/z/zPageAllocator.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/gc/z/zPageAllocator.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1087,7 +1087,8 @@ freed += vmem.size(); _cache.insert(vmem); } - assert(allocation->harvested() + allocation->committed_capacity() == freed, "must have freed all"); + assert(allocation->harvested() + allocation->committed_capacity() == freed, "must have freed all" + " %zu + %zu == %zu", allocation->harvested(), allocation->committed_capacity(), freed); // Adjust capacity to reflect the failed capacity increase const size_t remaining = allocation->size() - freed; @@ -1904,23 +1905,27 @@ ZMemoryAllocation* const allocation = single_partition_allocation->allocation(); assert(allocation->commit_failed(), "Must have failed to commit"); + assert(allocation->partial_vmems()->is_empty(), "Invariant for single partition commit failure"); - const size_t committed = allocation->committed_capacity(); - const ZVirtualMemory non_harvested_vmem = 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); + // For a single partition we have unmapped the harvested memory before we + // started committing, and moved its physical memory association to the start + // of the vmem. As such, the partial_vmems is empty. All the harvested and + // partially successfully committed memory is mapped in the first part of vmem. + const size_t harvested_and_committed_capacity = allocation->harvested() + allocation->committed_capacity(); + const ZVirtualMemory succeeded_vmem = vmem.first_part(harvested_and_committed_capacity); + const ZVirtualMemory failed_vmem = vmem.last_part(harvested_and_committed_capacity); - if (committed_vmem.size() > 0) { + if (succeeded_vmem.size() > 0) { // Register the committed and mapped memory. We insert the committed // memory into partial_vmems so that it will be inserted into the cache // in a subsequent step. - allocation->partial_vmems()->append(committed_vmem); + allocation->partial_vmems()->append(succeeded_vmem); } // Free the virtual and physical memory we fetched to use but failed to commit ZPartition& partition = allocation->partition(); - partition.free_physical(non_committed_vmem); - partition.free_virtual(non_committed_vmem); + partition.free_physical(failed_vmem); + partition.free_virtual(failed_vmem); } void ZPageAllocator::cleanup_failed_commit_multi_partition(ZMultiPartitionAllocation* multi_partition_allocation, const ZVirtualMemory& vmem) { diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/jfr/jfr.cpp openjdk-25-25.0.2+10/src/hotspot/share/jfr/jfr.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/jfr/jfr.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/jfr/jfr.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -151,9 +151,9 @@ } #endif -void Jfr::on_vm_shutdown(bool exception_handler, bool halt) { +void Jfr::on_vm_shutdown(bool emit_old_object_samples, bool emit_event_shutdown, bool halt) { if (!halt && JfrRecorder::is_recording()) { - JfrEmergencyDump::on_vm_shutdown(exception_handler); + JfrEmergencyDump::on_vm_shutdown(emit_old_object_samples, emit_event_shutdown); } } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/jfr/jfr.hpp openjdk-25-25.0.2+10/src/hotspot/share/jfr/jfr.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/jfr/jfr.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/jfr/jfr.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -70,7 +70,7 @@ static void on_resolution(const Method* caller, const Method* target, TRAPS); static void on_java_thread_start(JavaThread* starter, JavaThread* startee); static void on_set_current_thread(JavaThread* jt, oop thread); - static void on_vm_shutdown(bool exception_handler = false, bool halt = false); + static void on_vm_shutdown(bool emit_old_object_samples, bool emit_event_shutdown, bool halt = false); static void on_vm_error_report(outputStream* st); static bool on_flight_recorder_option(const JavaVMOption** option, char* delimiter); static bool on_start_flight_recording_option(const JavaVMOption** option, char* delimiter); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp openjdk-25-25.0.2+10/src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/jfr/periodic/sampling/jfrCPUTimeThreadSampler.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -249,6 +249,7 @@ void handle_timer_signal(siginfo_t* info, void* context); bool init_timers(); void stop_timer(); + virtual void print_on(outputStream* st) const; void trigger_async_processing_of_cpu_time_jfr_requests(); }; @@ -732,6 +733,12 @@ VMThread::execute(&op); } +void JfrCPUSamplerThread::print_on(outputStream* st) const { + st->print("\"%s\" ", name()); + Thread::print_on(st); + st->cr(); +} + void JfrCPUSamplerThread::recompute_period_if_needed() { int64_t current_period = get_sampling_period(); int64_t period = _throttle.compute_sampling_period(); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp openjdk-25-25.0.2+10/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -85,6 +85,7 @@ bool is_JfrSampler_thread() const { return true; } int64_t java_period() const { return Atomic::load(&_java_period_millis); }; int64_t native_period() const { return Atomic::load(&_native_period_millis); }; + virtual void print_on(outputStream* st) const; }; JfrSamplerThread::JfrSamplerThread(int64_t java_period_millis, int64_t native_period_millis, u4 max_frames) : @@ -384,6 +385,12 @@ Atomic::store(&_native_period_millis, period_millis); } +void JfrSamplerThread::print_on(outputStream* st) const { + st->print("\"%s\" ", name()); + Thread::print_on(st); + st->cr(); +} + // JfrThreadSampler; static JfrThreadSampler* _instance = nullptr; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdKlassQueue.cpp openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdKlassQueue.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdKlassQueue.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/checkpoint/types/traceid/jfrTraceIdKlassQueue.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -29,6 +29,7 @@ #include "jfr/support/jfrThreadLocal.hpp" #include "jfr/utilities/jfrEpochQueue.inline.hpp" #include "jfr/utilities/jfrTypes.hpp" +#include "memory/metaspace.hpp" #include "oops/compressedKlass.inline.hpp" #include "utilities/macros.hpp" @@ -73,14 +74,13 @@ return compressed ? NARROW_ELEMENT_SIZE : ELEMENT_SIZE; } -static bool can_compress_element(const Klass* klass) { - return CompressedKlassPointers::is_encodable(klass) && - JfrTraceId::load_raw(klass) < uncompressed_threshold; +static bool can_compress_element(traceid id) { + return Metaspace::using_class_space() && id < uncompressed_threshold; } static size_t element_size(const Klass* klass) { assert(klass != nullptr, "invariant"); - return element_size(can_compress_element(klass)); + return element_size(can_compress_element(JfrTraceId::load_raw(klass))); } static bool is_unloaded(traceid id, bool previous_epoch) { @@ -136,8 +136,7 @@ } static void store_compressed_element(traceid id, const Klass* klass, u1* pos) { - assert(can_compress_element(klass), "invariant"); - assert(id == JfrTraceId::load_raw(klass), "invariant"); + assert(can_compress_element(id), "invariant"); JfrEpochQueueNarrowKlassElement* const element = new (pos) JfrEpochQueueNarrowKlassElement(); store_traceid(element, id); element->compressed_klass = encode(klass); @@ -153,7 +152,7 @@ assert(pos != nullptr, "invariant"); assert(klass != nullptr, "invariant"); const traceid id = JfrTraceId::load_raw(klass); - if (can_compress_element(klass)) { + if (can_compress_element(id)) { store_compressed_element(id, klass, pos); return; } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -556,22 +556,22 @@ } }; -static void post_events(bool exception_handler, Thread* thread) { - if (exception_handler) { +static void post_events(bool emit_old_object_samples, bool emit_event_shutdown, Thread* thread) { + if (emit_old_object_samples) { + LeakProfiler::emit_events(max_jlong, false, false); + } + if (emit_event_shutdown) { EventShutdown e; e.set_reason("VM Error"); e.commit(); - } else { - // OOM - LeakProfiler::emit_events(max_jlong, false, false); } EventDumpReason event; - event.set_reason(exception_handler ? "Crash" : "Out of Memory"); + event.set_reason(emit_old_object_samples ? "Out of Memory" : "Crash"); event.set_recordingId(-1); event.commit(); } -void JfrEmergencyDump::on_vm_shutdown(bool exception_handler) { +void JfrEmergencyDump::on_vm_shutdown(bool emit_old_object_samples, bool emit_event_shutdown) { if (!guard_reentrancy()) { return; } @@ -584,7 +584,7 @@ if (!prepare_for_emergency_dump(thread)) { return; } - post_events(exception_handler, thread); + post_events(emit_old_object_samples, emit_event_shutdown, thread); // if JavaThread, transition to _thread_in_native to issue a final flushpoint NoHandleMark nhm; jtivm.transition_to_native(); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -39,7 +39,7 @@ static const char* chunk_path(const char* repository_path); static void on_vm_error(const char* repository_path); static void on_vm_error_report(outputStream* st, const char* repository_path); - static void on_vm_shutdown(bool exception_handler); + static void on_vm_shutdown(bool emit_old_object_samples, bool emit_event_shutdown); }; #endif // SHARE_JFR_RECORDER_REPOSITORY_JFREMERGENCYDUMP_HPP diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -27,6 +27,7 @@ #include "classfile/symbolTable.hpp" #include "classfile/systemDictionary.hpp" #include "classfile/vmClasses.hpp" +#include "code/nmethod.hpp" #include "code/scopeDesc.hpp" #include "compiler/compileBroker.hpp" #include "compiler/compilerEvent.hpp" @@ -1206,7 +1207,7 @@ assert(JVMCIENV->isa_HotSpotNmethod(installed_code_handle), "wrong type"); // Clear the link to an old nmethod first JVMCIObject nmethod_mirror = installed_code_handle; - JVMCIENV->invalidate_nmethod_mirror(nmethod_mirror, true, JVMCI_CHECK_0); + JVMCIENV->invalidate_nmethod_mirror(nmethod_mirror, true, nmethod::ChangeReason::JVMCI_replacing_with_new_code, JVMCI_CHECK_0); } else { assert(JVMCIENV->isa_InstalledCode(installed_code_handle), "wrong type"); } @@ -1382,7 +1383,7 @@ nmethod* code = method->code(); if (code != nullptr) { - code->make_not_entrant("JVMCI reprofile"); + code->make_not_entrant(nmethod::ChangeReason::JVMCI_reprofile); } MethodData* method_data = method->method_data(); @@ -1397,7 +1398,7 @@ C2V_VMENTRY(void, invalidateHotSpotNmethod, (JNIEnv* env, jobject, jobject hs_nmethod, jboolean deoptimize)) JVMCIObject nmethod_mirror = JVMCIENV->wrap(hs_nmethod); - JVMCIENV->invalidate_nmethod_mirror(nmethod_mirror, deoptimize, JVMCI_CHECK); + JVMCIENV->invalidate_nmethod_mirror(nmethod_mirror, deoptimize, nmethod::ChangeReason::JVMCI_invalidate_nmethod, JVMCI_CHECK); C2V_END C2V_VMENTRY_NULL(jlongArray, collectCounters, (JNIEnv* env, jobject)) @@ -1822,7 +1823,7 @@ if (!fst.current()->is_compiled_frame()) { JVMCI_THROW_MSG(IllegalStateException, "compiled stack frame expected"); } - fst.current()->cb()->as_nmethod()->make_not_entrant("JVMCI materialize virtual objects"); + fst.current()->cb()->as_nmethod()->make_not_entrant(nmethod::ChangeReason::JVMCI_materialize_virtual_object); } Deoptimization::deoptimize(thread, *fst.current(), Deoptimization::Reason_none); // look for the frame again as it has been updated by deopt (pc, deopt state...) diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/jvmci/jvmciEnv.cpp openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciEnv.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/jvmci/jvmciEnv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciEnv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1750,7 +1750,7 @@ } -void JVMCIEnv::invalidate_nmethod_mirror(JVMCIObject mirror, bool deoptimize, JVMCI_TRAPS) { +void JVMCIEnv::invalidate_nmethod_mirror(JVMCIObject mirror, bool deoptimize, nmethod::ChangeReason change_reason, JVMCI_TRAPS) { if (mirror.is_null()) { JVMCI_THROW(NullPointerException); } @@ -1773,7 +1773,7 @@ if (!deoptimize) { // Prevent future executions of the nmethod but let current executions complete. - nm->make_not_entrant("JVMCI invalidate nmethod mirror"); + nm->make_not_entrant(change_reason); // Do not clear the address field here as the Java code may still // want to later call this method with deoptimize == true. That requires @@ -1782,7 +1782,7 @@ // Deoptimize the nmethod immediately. DeoptimizationScope deopt_scope; deopt_scope.mark(nm); - nm->make_not_entrant("JVMCI invalidate nmethod mirror"); + nm->make_not_entrant(change_reason); nm->make_deoptimized(); deopt_scope.deoptimize_marked(); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/jvmci/jvmciEnv.hpp openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciEnv.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/jvmci/jvmciEnv.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciEnv.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -462,7 +462,7 @@ // field of `mirror` to prevent it from being called. // If `deoptimize` is true, the nmethod is immediately deoptimized. // The HotSpotNmethod.address field is zero upon returning. - void invalidate_nmethod_mirror(JVMCIObject mirror, bool deoptimze, JVMCI_TRAPS); + void invalidate_nmethod_mirror(JVMCIObject mirror, bool deoptimze, nmethod::ChangeReason change_reason, JVMCI_TRAPS); void initialize_installed_code(JVMCIObject installed_code, CodeBlob* cb, JVMCI_TRAPS); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/jvmci/jvmciRuntime.cpp openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciRuntime.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/jvmci/jvmciRuntime.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/jvmci/jvmciRuntime.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -2184,7 +2184,7 @@ tty->print_cr("Replacing method %s", method_name); } if (old != nullptr) { - old->make_not_entrant("JVMCI register method"); + old->make_not_entrant(nmethod::ChangeReason::JVMCI_register_method); } LogTarget(Info, nmethod, install) lt; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/logging/logAsyncWriter.cpp openjdk-25-25.0.2+10/src/hotspot/share/logging/logAsyncWriter.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/logging/logAsyncWriter.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/logging/logAsyncWriter.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -318,13 +318,13 @@ AsyncLogWriter* self = new AsyncLogWriter(); if (self->_initialized) { - Atomic::release_store_fence(&AsyncLogWriter::_instance, self); - // All readers of _instance after the fence see non-null. // We use LogOutputList's RCU counters to ensure all synchronous logsites have completed. - // After that, we start AsyncLog Thread and it exclusively takes over all logging I/O. + // After that, we publish the initalized _instance to readers. + // Then we start the AsyncLog Thread and it exclusively takes over all logging I/O. for (LogTagSet* ts = LogTagSet::first(); ts != nullptr; ts = ts->next()) { ts->wait_until_no_readers(); } + Atomic::release_store_fence(&AsyncLogWriter::_instance, self); os::start_thread(self); log_debug(logging, thread)("Async logging thread started."); } else { diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/memory/allocation.cpp openjdk-25-25.0.2+10/src/hotspot/share/memory/allocation.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/memory/allocation.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/memory/allocation.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -74,7 +74,7 @@ MetaspaceObj::Type type, TRAPS) throw() { // Klass has its own operator new assert(type != ClassType, "class has its own operator new"); - return Metaspace::allocate(loader_data, word_size, type, /*use_class_space*/ false, THREAD); + return Metaspace::allocate(loader_data, word_size, type, THREAD); } void* MetaspaceObj::operator new(size_t size, ClassLoaderData* loader_data, @@ -82,7 +82,7 @@ MetaspaceObj::Type type) throw() { assert(!Thread::current()->is_Java_thread(), "only allowed by non-Java thread"); assert(type != ClassType, "class has its own operator new"); - return Metaspace::allocate(loader_data, word_size, type, /*use_class_space*/ false); + return Metaspace::allocate(loader_data, word_size, type); } // This is used for allocating training data. We are allocating training data in many cases where a GC cannot be triggered. diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/memory/guardedMemory.hpp openjdk-25-25.0.2+10/src/hotspot/share/memory/guardedMemory.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/memory/guardedMemory.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/memory/guardedMemory.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -42,9 +42,10 @@ * |Offset | Content | Description | * |------------------------------------------------------------ * |base_addr | 0xABABABABABABABAB | Head guard | - * |+16 | | User data size | - * |+sizeof(uintptr_t) | | Tag word | - * |+sizeof(uintptr_t) | | Tag word | + * |+GUARD_SIZE | | User data size | + * |+sizeof(size_t) | | Tag word | + * |+sizeof(void*) | | Tag word | + * |+sizeof(void*) | | Padding | * |+sizeof(void*) | 0xF1 ( | User data | * |+user_size | 0xABABABABABABABAB | Tail guard | * ------------------------------------------------------------- @@ -52,6 +53,8 @@ * Where: * - guard padding uses "badResourceValue" (0xAB) * - tag word and tag2 word are general purpose + * - padding is inserted as-needed by the compiler to ensure + * the user data is aligned on a 16-byte boundary * - user data * -- initially padded with "uninitBlockPad" (0xF1), * -- to "freeBlockPad" (0xBA), when freed @@ -132,12 +135,15 @@ /** * Header guard and size + * + * NB: the size and placement of the GuardHeader must be such that the + * user-ptr is maximally aligned i.e. 16-byte alignment for x86 ABI for + * stack alignment and use of vector (xmm) instructions. We use alignas + * to achieve this. */ - class GuardHeader : Guard { + class alignas(16) GuardHeader : Guard { friend class GuardedMemory; protected: - // Take care in modifying fields here, will effect alignment - // e.g. x86 ABI 16 byte stack alignment union { uintptr_t __unused_full_word1; size_t _user_size; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/memory/memoryReserver.cpp openjdk-25-25.0.2+10/src/hotspot/share/memory/memoryReserver.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/memory/memoryReserver.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/memory/memoryReserver.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -113,12 +113,13 @@ ReservedSpace MemoryReserver::reserve_memory(char* requested_address, size_t size, size_t alignment, + size_t page_size, bool exec, MemTag mem_tag) { char* base = reserve_memory_inner(requested_address, size, alignment, exec, mem_tag); if (base != nullptr) { - return ReservedSpace(base, size, alignment, os::vm_page_size(), exec, false /* special */); + return ReservedSpace(base, size, alignment, page_size, exec, false /* special */); } // Failed @@ -191,7 +192,7 @@ } // == Case 3 == - return reserve_memory(requested_address, size, alignment, executable, mem_tag); + return reserve_memory(requested_address, size, alignment, page_size, executable, mem_tag); } ReservedSpace MemoryReserver::reserve(char* requested_address, diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/memory/memoryReserver.hpp openjdk-25-25.0.2+10/src/hotspot/share/memory/memoryReserver.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/memory/memoryReserver.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/memory/memoryReserver.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -34,6 +34,7 @@ static ReservedSpace reserve_memory(char* requested_address, size_t size, size_t alignment, + size_t page_size, bool exec, MemTag mem_tag); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/memory/metaspace.cpp openjdk-25-25.0.2+10/src/hotspot/share/memory/metaspace.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/memory/metaspace.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/memory/metaspace.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -868,7 +868,7 @@ // is suitable for calling from non-Java threads. // Callers are responsible for checking null. MetaWord* Metaspace::allocate(ClassLoaderData* loader_data, size_t word_size, - MetaspaceObj::Type type, bool use_class_space) { + MetaspaceObj::Type type) { assert(word_size <= Metaspace::max_allocation_word_size(), "allocation size too large (%zu)", word_size); @@ -878,7 +878,7 @@ // Deal with concurrent unloading failed allocation starvation MetaspaceCriticalAllocation::block_if_concurrent_purge(); - MetadataType mdtype = use_class_space ? ClassType : NonClassType; + MetadataType mdtype = (type == MetaspaceObj::ClassType) ? ClassType : NonClassType; // Try to allocate metadata. MetaWord* result = loader_data->metaspace_non_null()->allocate(word_size, mdtype); @@ -902,7 +902,7 @@ } MetaWord* Metaspace::allocate(ClassLoaderData* loader_data, size_t word_size, - MetaspaceObj::Type type, bool use_class_space, TRAPS) { + MetaspaceObj::Type type, TRAPS) { if (HAS_PENDING_EXCEPTION) { assert(false, "Should not allocate with exception pending"); @@ -910,10 +910,10 @@ } assert(!THREAD->owns_locks(), "allocating metaspace while holding mutex"); - MetaWord* result = allocate(loader_data, word_size, type, use_class_space); + MetaWord* result = allocate(loader_data, word_size, type); if (result == nullptr) { - MetadataType mdtype = use_class_space ? ClassType : NonClassType; + MetadataType mdtype = (type == MetaspaceObj::ClassType) ? ClassType : NonClassType; tracer()->report_metaspace_allocation_failure(loader_data, word_size, type, mdtype); // Allocation failed. diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/memory/metaspace.hpp openjdk-25-25.0.2+10/src/hotspot/share/memory/metaspace.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/memory/metaspace.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/memory/metaspace.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -120,12 +120,12 @@ static constexpr size_t min_allocation_word_size = min_allocation_alignment_words; static MetaWord* allocate(ClassLoaderData* loader_data, size_t word_size, - MetaspaceObj::Type type, bool use_class_space, TRAPS); + MetaspaceObj::Type type, TRAPS); // Non-TRAPS version of allocate which can be called by a non-Java thread, that returns // null on failure. static MetaWord* allocate(ClassLoaderData* loader_data, size_t word_size, - MetaspaceObj::Type type, bool use_class_space); + MetaspaceObj::Type type); // Returns true if the pointer points into class space, non-class metaspace, or the // metadata portion of the CDS archive. diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/nmt/mallocHeader.inline.hpp openjdk-25-25.0.2+10/src/hotspot/share/nmt/mallocHeader.inline.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/nmt/mallocHeader.inline.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/nmt/mallocHeader.inline.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -104,7 +104,7 @@ OutTypeParam header_pointer = (OutTypeParam)memblock - 1; if (!header_pointer->check_block_integrity(msg, sizeof(msg), &corruption)) { header_pointer->print_block_on_error(tty, corruption != nullptr ? corruption : (address)header_pointer); - fatal("NMT corruption: Block at " PTR_FORMAT ": %s", p2i(memblock), msg); + fatal("NMT has detected a memory corruption bug. Block at " PTR_FORMAT ": %s", p2i(memblock), msg); } return header_pointer; } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/nmt/mallocTracker.cpp openjdk-25-25.0.2+10/src/hotspot/share/nmt/mallocTracker.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/nmt/mallocTracker.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/nmt/mallocTracker.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -207,6 +207,12 @@ deaccount(header->free_info()); + if (ZapCHeap) { + // To do this zapping, we need to know the block size. + // This is why we have to do it here, and not in os::free. + memset(memblock, freeBlockPad, header->size()); + } + header->mark_block_as_dead(); return (void*)header; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/oops/array.inline.hpp openjdk-25-25.0.2+10/src/hotspot/share/oops/array.inline.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/oops/array.inline.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/oops/array.inline.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 @@ -34,14 +34,14 @@ inline void* Array::operator new(size_t size, ClassLoaderData* loader_data, int length, TRAPS) throw() { size_t word_size = Array::size(length); return (void*) Metaspace::allocate(loader_data, word_size, - MetaspaceObj::array_type(sizeof(T)), false, THREAD); + MetaspaceObj::array_type(sizeof(T)), THREAD); } template inline void* Array::operator new(size_t size, ClassLoaderData* loader_data, int length) throw() { size_t word_size = Array::size(length); return (void*) Metaspace::allocate(loader_data, word_size, - MetaspaceObj::array_type(sizeof(T)), false); + MetaspaceObj::array_type(sizeof(T))); } template diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/oops/arrayKlass.cpp openjdk-25-25.0.2+10/src/hotspot/share/oops/arrayKlass.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/oops/arrayKlass.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/oops/arrayKlass.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -41,10 +41,6 @@ #include "oops/oop.inline.hpp" #include "runtime/handles.inline.hpp" -void* ArrayKlass::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw() { - return Metaspace::allocate(loader_data, word_size, MetaspaceObj::ClassType, true, THREAD); -} - ArrayKlass::ArrayKlass() { assert(CDSConfig::is_dumping_static_archive() || CDSConfig::is_using_archive(), "only for CDS"); } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/oops/arrayKlass.hpp openjdk-25-25.0.2+10/src/hotspot/share/oops/arrayKlass.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/oops/arrayKlass.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/oops/arrayKlass.hpp 2025-12-18 08:04:02.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 @@ -49,8 +49,6 @@ ArrayKlass(Symbol* name, KlassKind kind); ArrayKlass(); - void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw(); - public: // Testing operation DEBUG_ONLY(bool is_array_klass_slow() const { return true; }) diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/oops/cpCache.inline.hpp openjdk-25-25.0.2+10/src/hotspot/share/oops/cpCache.inline.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/oops/cpCache.inline.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/oops/cpCache.inline.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -73,6 +73,9 @@ } inline int ConstantPoolCache::resolved_indy_entries_length() const { + if (_resolved_indy_entries == nullptr) { + return 0; + } return _resolved_indy_entries->length(); } #endif // SHARE_OOPS_CPCACHE_INLINE_HPP diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/oops/instanceKlass.cpp openjdk-25-25.0.2+10/src/hotspot/share/oops/instanceKlass.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/oops/instanceKlass.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/oops/instanceKlass.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -455,11 +455,6 @@ } } -void* InstanceKlass::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, - bool use_class_space, TRAPS) throw() { - return Metaspace::allocate(loader_data, word_size, ClassType, use_class_space, THREAD); -} - InstanceKlass* InstanceKlass::allocate_instance_klass(const ClassFileParser& parser, TRAPS) { const int size = InstanceKlass::size(parser.vtable_size(), parser.itable_size(), @@ -472,27 +467,26 @@ assert(loader_data != nullptr, "invariant"); InstanceKlass* ik; - const bool use_class_space = parser.klass_needs_narrow_id(); // Allocation if (parser.is_instance_ref_klass()) { // java.lang.ref.Reference - ik = new (loader_data, size, use_class_space, THREAD) InstanceRefKlass(parser); + ik = new (loader_data, size, THREAD) InstanceRefKlass(parser); } else if (class_name == vmSymbols::java_lang_Class()) { // mirror - java.lang.Class - ik = new (loader_data, size, use_class_space, THREAD) InstanceMirrorKlass(parser); + ik = new (loader_data, size, THREAD) InstanceMirrorKlass(parser); } else if (is_stack_chunk_class(class_name, loader_data)) { // stack chunk - ik = new (loader_data, size, use_class_space, THREAD) InstanceStackChunkKlass(parser); + ik = new (loader_data, size, THREAD) InstanceStackChunkKlass(parser); } else if (is_class_loader(class_name, parser)) { // class loader - java.lang.ClassLoader - ik = new (loader_data, size, use_class_space, THREAD) InstanceClassLoaderKlass(parser); + ik = new (loader_data, size, THREAD) InstanceClassLoaderKlass(parser); } else { // normal - ik = new (loader_data, size, use_class_space, THREAD) InstanceKlass(parser); + ik = new (loader_data, size, THREAD) InstanceKlass(parser); } - if (ik != nullptr && UseCompressedClassPointers && use_class_space) { + if (ik != nullptr && UseCompressedClassPointers) { assert(CompressedKlassPointers::is_encodable(ik), "Klass " PTR_FORMAT "needs a narrow Klass ID, but is not encodable", p2i(ik)); } @@ -3501,7 +3495,7 @@ for (int l = CompLevel_limited_profile; l < n->comp_level(); l++) { nmethod *inv = lookup_osr_nmethod(n->method(), n->osr_entry_bci(), l, true); if (inv != nullptr && inv->is_in_use()) { - inv->make_not_entrant("OSR invalidation of lower levels"); + inv->make_not_entrant(nmethod::ChangeReason::OSR_invalidation_of_lower_level); } } } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/oops/instanceKlass.hpp openjdk-25-25.0.2+10/src/hotspot/share/oops/instanceKlass.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/oops/instanceKlass.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/oops/instanceKlass.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -143,8 +143,6 @@ protected: InstanceKlass(const ClassFileParser& parser, KlassKind kind = Kind, ReferenceType reference_type = REF_NONE); - void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, bool use_class_space, TRAPS) throw(); - public: InstanceKlass(); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/oops/instanceMirrorKlass.hpp openjdk-25-25.0.2+10/src/hotspot/share/oops/instanceMirrorKlass.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/oops/instanceMirrorKlass.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/oops/instanceMirrorKlass.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -52,6 +52,9 @@ InstanceMirrorKlass(const ClassFileParser& parser) : InstanceKlass(parser, Kind) {} + template + inline void do_metadata(oop obj, OopClosureType* closure); + public: InstanceMirrorKlass(); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/oops/instanceMirrorKlass.inline.hpp openjdk-25-25.0.2+10/src/hotspot/share/oops/instanceMirrorKlass.inline.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/oops/instanceMirrorKlass.inline.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/oops/instanceMirrorKlass.inline.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -46,38 +46,41 @@ } } +template +void InstanceMirrorKlass::do_metadata(oop obj, OopClosureType* closure) { + Klass* klass = java_lang_Class::as_Klass(obj); + if (klass != nullptr) { + if (klass->class_loader_data() == nullptr) { + // This is a mirror that belongs to a shared class that has not been loaded yet. + assert(klass->is_shared(), "Must be"); + } else if (klass->is_instance_klass() && klass->class_loader_data()->has_class_mirror_holder()) { + // A non-strong hidden class doesn't have its own class loader, + // so when handling the java mirror for the class we need to make sure its class + // loader data is claimed, this is done by calling do_cld explicitly. + // For non-strong hidden classes the call to do_cld is made when the class + // loader itself is handled. + Devirtualizer::do_cld(closure, klass->class_loader_data()); + } else { + Devirtualizer::do_klass(closure, klass); + } + } else { + // Java mirror -> Klass* "nullptr" backlink means either: + // 1. This is a Java mirror for a primitive class. We do not need to follow it, + // these mirrors are always strong roots. + // 2. This is a Java mirror for a newly allocated non-primitive class, and we + // somehow managed to reach the newly allocated Java mirror with not yet + // installed backlink. We cannot do anything here, this case would be handled + // separately by GC, e.g. by keeping the relevant metadata alive during the GC. + // Unfortunately, the existence of corner case (2) prevents us from asserting (1). + } +} + template void InstanceMirrorKlass::oop_oop_iterate(oop obj, OopClosureType* closure) { InstanceKlass::oop_oop_iterate(obj, closure); if (Devirtualizer::do_metadata(closure)) { - Klass* klass = java_lang_Class::as_Klass(obj); - // We'll get null for primitive mirrors. - if (klass != nullptr) { - if (klass->class_loader_data() == nullptr) { - // This is a mirror that belongs to a shared class that has not be loaded yet. - assert(klass->is_shared(), "must be"); - } else if (klass->is_instance_klass() && klass->class_loader_data()->has_class_mirror_holder()) { - // A non-strong hidden class doesn't have its own class loader, - // so when handling the java mirror for the class we need to make sure its class - // loader data is claimed, this is done by calling do_cld explicitly. - // For non-strong hidden classes the call to do_cld is made when the class - // loader itself is handled. - Devirtualizer::do_cld(closure, klass->class_loader_data()); - } else { - Devirtualizer::do_klass(closure, klass); - } - } else { - // We would like to assert here (as below) that if klass has been null, then - // this has been a mirror for a primitive type that we do not need to follow - // as they are always strong roots. - // However, we might get across a klass that just changed during CMS concurrent - // marking if allocation occurred in the old generation. - // This is benign here, as we keep alive all CLDs that were loaded during the - // CMS concurrent phase in the class loading, i.e. they will be iterated over - // and kept alive during remark. - // assert(java_lang_Class::is_primitive(obj), "Sanity check"); - } + do_metadata(obj, closure); } oop_oop_iterate_statics(obj, closure); @@ -121,11 +124,7 @@ if (Devirtualizer::do_metadata(closure)) { if (mr.contains(obj)) { - Klass* klass = java_lang_Class::as_Klass(obj); - // We'll get null for primitive mirrors. - if (klass != nullptr) { - Devirtualizer::do_klass(closure, klass); - } + do_metadata(obj, closure); } } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/oops/klass.cpp openjdk-25-25.0.2+10/src/hotspot/share/oops/klass.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/oops/klass.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/oops/klass.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -279,18 +279,19 @@ #ifdef _LP64 if (UseCompactObjectHeaders) { // With compact object headers, the narrow Klass ID is part of the mark word. - // We therfore seed the mark word with the narrow Klass ID. - // Note that only those Klass that can be instantiated have a narrow Klass ID. - // For those who don't, we leave the klass bits empty and assert if someone - // tries to use those. - const narrowKlass nk = CompressedKlassPointers::is_encodable(kls) ? - CompressedKlassPointers::encode(const_cast(kls)) : 0; + // We therefore seed the mark word with the narrow Klass ID. + precond(CompressedKlassPointers::is_encodable(kls)); + const narrowKlass nk = CompressedKlassPointers::encode(const_cast(kls)); prototype = prototype.set_narrow_klass(nk); } #endif return prototype; } +void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw() { + return Metaspace::allocate(loader_data, word_size, MetaspaceObj::ClassType, THREAD); +} + Klass::Klass() : _kind(UnknownKlassKind) { assert(CDSConfig::is_dumping_static_archive() || CDSConfig::is_using_archive(), "only for cds"); } @@ -1063,7 +1064,7 @@ // This can be expensive, but it is worth checking that this klass is actually // in the CLD graph but not in production. #ifdef ASSERT - if (UseCompressedClassPointers && needs_narrow_id()) { + if (UseCompressedClassPointers) { // Stricter checks for both correct alignment and placement CompressedKlassPointers::check_encodable(this); } else { diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/oops/klass.hpp openjdk-25-25.0.2+10/src/hotspot/share/oops/klass.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/oops/klass.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/oops/klass.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -208,6 +208,8 @@ Klass(KlassKind kind); Klass(); + void* operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw(); + public: int kind() { return _kind; } @@ -785,10 +787,6 @@ static bool is_valid(Klass* k); static void on_secondary_supers_verification_failure(Klass* super, Klass* sub, bool linear_result, bool table_result, const char* msg); - - // Returns true if this Klass needs to be addressable via narrow Klass ID. - inline bool needs_narrow_id() const; - }; #endif // SHARE_OOPS_KLASS_HPP diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/oops/klass.inline.hpp openjdk-25-25.0.2+10/src/hotspot/share/oops/klass.inline.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/oops/klass.inline.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/oops/klass.inline.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -175,13 +175,4 @@ return result; } -// Returns true if this Klass needs to be addressable via narrow Klass ID. -inline bool Klass::needs_narrow_id() const { - // Classes that are never instantiated need no narrow Klass Id, since the - // only point of having a narrow id is to put it into an object header. Keeping - // never instantiated classes out of class space lessens the class space pressure. - // For more details, see JDK-8338526. - // Note: don't call this function before access flags are initialized. - return !is_abstract() && !is_interface(); -} #endif // SHARE_OOPS_KLASS_INLINE_HPP diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/oops/method.cpp openjdk-25-25.0.2+10/src/hotspot/share/oops/method.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/oops/method.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/oops/method.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1028,7 +1028,7 @@ // If so, we have to make it not_entrant. nmethod* nm = code(); // Put it into local variable to guard against concurrent updates if (nm != nullptr) { - nm->make_not_entrant("set native function"); + nm->make_not_entrant(nmethod::ChangeReason::set_native_function); } } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/oops/trainingData.cpp openjdk-25-25.0.2+10/src/hotspot/share/oops/trainingData.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/oops/trainingData.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/oops/trainingData.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -316,7 +316,9 @@ // This JIT task is (probably) requesting that ik be initialized, // so add him to my _init_deps list. TrainingDataLocker l; - add_init_dep(ktd); + if (l.can_add()) { + add_init_dep(ktd); + } } } } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/oops/trainingData.hpp openjdk-25-25.0.2+10/src/hotspot/share/oops/trainingData.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/oops/trainingData.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/oops/trainingData.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -96,16 +96,18 @@ // TrainingDataLocker is used to guard read/write operations on non-MT-safe data structures. // It supports recursive locking and a read-only mode (in which case no locks are taken). - // It is also a part of the TD collection termination protocol (see the "spanshot" field). + // It is also a part of the TD collection termination protocol (see the "snapshot" field). class TrainingDataLocker { +#if INCLUDE_CDS static volatile bool _snapshot; // If true we're not allocating new training data +#endif static int _lock_mode; const bool _recursive; static void lock() { #if INCLUDE_CDS assert(_lock_mode != 0, "Forgot to call TrainingDataLocker::initialize()"); if (_lock_mode > 0) { - TrainingData_lock->lock(); + TrainingData_lock->lock_without_safepoint_check(); } #endif } @@ -152,6 +154,11 @@ _lock_mode = need_data() ? +1 : -1; // if -1, we go lock-free #endif } + static void assert_locked_or_snapshotted() { +#if INCLUDE_CDS + assert(safely_locked() || _snapshot, "use under TrainingDataLocker or after snapshot"); +#endif + } static void assert_locked() { assert(safely_locked(), "use under TrainingDataLocker"); } @@ -338,20 +345,24 @@ } int length() const { + TrainingDataLocker::assert_locked_or_snapshotted(); return (_deps_dyn != nullptr ? _deps_dyn->length() : _deps != nullptr ? _deps->length() : 0); } E* adr_at(int i) const { + TrainingDataLocker::assert_locked_or_snapshotted(); return (_deps_dyn != nullptr ? _deps_dyn->adr_at(i) : _deps != nullptr ? _deps->adr_at(i) : nullptr); } E at(int i) const { + TrainingDataLocker::assert_locked_or_snapshotted(); assert(i >= 0 && i < length(), "oob"); return *adr_at(i); } bool append_if_missing(E dep) { + TrainingDataLocker::assert_can_add(); if (_deps_dyn == nullptr) { _deps_dyn = new GrowableArrayCHeap(10); _deps_dyn->append(dep); @@ -361,23 +372,27 @@ } } bool remove_if_existing(E dep) { + TrainingDataLocker::assert_can_add(); if (_deps_dyn != nullptr) { return _deps_dyn->remove_if_existing(dep); } return false; } void clear() { + TrainingDataLocker::assert_can_add(); if (_deps_dyn != nullptr) { _deps_dyn->clear(); } } void append(E dep) { + TrainingDataLocker::assert_can_add(); if (_deps_dyn == nullptr) { _deps_dyn = new GrowableArrayCHeap(10); } _deps_dyn->append(dep); } bool contains(E dep) { + TrainingDataLocker::assert_locked(); for (int i = 0; i < length(); i++) { if (dep == at(i)) { return true; // found @@ -593,6 +608,7 @@ DepList _data; public: OptionalReturnType find(const Args&... args) { + TrainingDataLocker l; ArgumentsType a(args...); for (int i = 0; i < _data.length(); i++) { if (_data.at(i).arguments() == a) { @@ -601,8 +617,11 @@ } return OptionalReturnType(false, ReturnType()); } - bool append_if_missing(const ReturnType& result, const Args&... args) { - return _data.append_if_missing(Record(result, ArgumentsType(args...))); + void append_if_missing(const ReturnType& result, const Args&... args) { + TrainingDataLocker l; + if (l.can_add()) { + _data.append_if_missing(Record(result, ArgumentsType(args...))); + } } #if INCLUDE_CDS void remove_unshareable_info() { _data.remove_unshareable_info(); } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/opto/bytecodeInfo.cpp openjdk-25-25.0.2+10/src/hotspot/share/opto/bytecodeInfo.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/opto/bytecodeInfo.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/opto/bytecodeInfo.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -60,6 +60,7 @@ // Keep a private copy of the caller_jvms: _caller_jvms = new (C) JVMState(caller_jvms->method(), caller_tree->caller_jvms()); _caller_jvms->set_bci(caller_jvms->bci()); + _caller_jvms->set_receiver_info(caller_jvms->receiver_info()); assert(!caller_jvms->should_reexecute(), "there should be no reexecute bytecode with inlining"); assert(_caller_jvms->same_calls_as(caller_jvms), "consistent JVMS"); } @@ -437,24 +438,26 @@ // detect direct and indirect recursive inlining { - // count the current method and the callee const bool is_compiled_lambda_form = callee_method->is_compiled_lambda_form(); - int inline_level = 0; - if (!is_compiled_lambda_form) { - if (method() == callee_method) { - inline_level++; - } + const bool is_method_handle_invoker = is_compiled_lambda_form && !jvms->method()->is_compiled_lambda_form(); + + ciInstance* lform_callee_recv = nullptr; + if (is_compiled_lambda_form && !is_method_handle_invoker) { // MH invokers don't have a receiver + lform_callee_recv = jvms->compute_receiver_info(callee_method); } - // count callers of current method and callee - Node* callee_argument0 = is_compiled_lambda_form ? jvms->map()->argument(jvms, 0)->uncast() : nullptr; - for (JVMState* j = jvms->caller(); j != nullptr && j->has_method(); j = j->caller()) { + + int inline_level = 0; + for (JVMState* j = jvms; j != nullptr && j->has_method(); j = j->caller()) { if (j->method() == callee_method) { - if (is_compiled_lambda_form) { - // Since compiled lambda forms are heavily reused we allow recursive inlining. If it is truly - // a recursion (using the same "receiver") we limit inlining otherwise we can easily blow the - // compiler stack. - Node* caller_argument0 = j->map()->argument(j, 0)->uncast(); - if (caller_argument0 == callee_argument0) { + // Since compiled lambda forms are heavily reused we allow recursive inlining. If it is truly + // a recursion (using the same "receiver") we limit inlining otherwise we can easily blow the + // compiler stack. + if (lform_callee_recv != nullptr) { + ciInstance* lform_caller_recv = j->receiver_info(); + assert(lform_caller_recv != nullptr || j->depth() == 1 || + !j->caller()->method()->is_compiled_lambda_form(), // MH invoker + "missing receiver info"); + if (lform_caller_recv == lform_callee_recv || lform_caller_recv == nullptr) { inline_level++; } } else { diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/opto/callnode.cpp openjdk-25-25.0.2+10/src/hotspot/share/opto/callnode.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/opto/callnode.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/opto/callnode.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -262,7 +262,8 @@ //============================================================================= JVMState::JVMState(ciMethod* method, JVMState* caller) : - _method(method) { + _method(method), + _receiver_info(nullptr) { assert(method != nullptr, "must be valid call site"); _bci = InvocationEntryBci; _reexecute = Reexecute_Undefined; @@ -278,7 +279,8 @@ _sp = 0; } JVMState::JVMState(int stack_size) : - _method(nullptr) { + _method(nullptr), + _receiver_info(nullptr) { _bci = InvocationEntryBci; _reexecute = Reexecute_Undefined; DEBUG_ONLY(_map = (SafePointNode*)-1); @@ -613,6 +615,7 @@ n->set_endoff(_endoff); n->set_sp(_sp); n->set_map(_map); + n->set_receiver_info(_receiver_info); return n; } @@ -687,6 +690,20 @@ return size + Deoptimization::last_frame_adjust(0, callee_locals) * BytesPerWord; } +// Compute receiver info for a compiled lambda form at call site. +ciInstance* JVMState::compute_receiver_info(ciMethod* callee) const { + assert(callee != nullptr && callee->is_compiled_lambda_form(), ""); + if (has_method() && method()->is_compiled_lambda_form()) { // callee is not a MH invoker + Node* recv = map()->argument(this, 0); + assert(recv != nullptr, ""); + const TypeOopPtr* recv_toop = recv->bottom_type()->isa_oopptr(); + if (recv_toop != nullptr && recv_toop->const_oop() != nullptr) { + return recv_toop->const_oop()->as_instance(); + } + } + return nullptr; +} + //============================================================================= bool CallNode::cmp( const Node &n ) const { return _tf == ((CallNode&)n)._tf && _jvms == ((CallNode&)n)._jvms; } @@ -1313,7 +1330,7 @@ //============================================================================= -void SafePointNode::set_local(JVMState* jvms, uint idx, Node *c) { +void SafePointNode::set_local(const JVMState* jvms, uint idx, Node *c) { assert(verify_jvms(jvms), "jvms must match"); int loc = jvms->locoff() + idx; if (in(loc)->is_top() && idx > 0 && !c->is_top() ) { diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/opto/callnode.hpp openjdk-25-25.0.2+10/src/hotspot/share/opto/callnode.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/opto/callnode.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/opto/callnode.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -217,6 +217,7 @@ int _bci; // Byte Code Index of this JVM point ReexecuteState _reexecute; // Whether this bytecode need to be re-executed ciMethod* _method; // Method Pointer + ciInstance* _receiver_info; // Constant receiver instance for compiled lambda forms SafePointNode* _map; // Map node associated with this scope public: friend class Compile; @@ -259,6 +260,7 @@ bool is_reexecute_undefined() const { return _reexecute==Reexecute_Undefined; } bool has_method() const { return _method != nullptr; } ciMethod* method() const { assert(has_method(), ""); return _method; } + ciInstance* receiver_info() const { assert(has_method(), ""); return _receiver_info; } JVMState* caller() const { return _caller; } SafePointNode* map() const { return _map; } uint depth() const { return _depth; } @@ -304,6 +306,7 @@ // _reexecute is initialized to "undefined" for a new bci void set_bci(int bci) {if(_bci != bci)_reexecute=Reexecute_Undefined; _bci = bci; } void set_should_reexecute(bool reexec) {_reexecute = reexec ? Reexecute_True : Reexecute_False;} + void set_receiver_info(ciInstance* recv) { assert(has_method() || recv == nullptr, ""); _receiver_info = recv; } // Miscellaneous utility functions JVMState* clone_deep(Compile* C) const; // recursively clones caller chain @@ -311,6 +314,7 @@ void set_map_deep(SafePointNode *map);// reset map for all callers void adapt_position(int delta); // Adapt offsets in in-array after adding an edge. int interpreter_frame_size() const; + ciInstance* compute_receiver_info(ciMethod* callee) const; #ifndef PRODUCT void print_method_with_lineno(outputStream* st, bool show_name) const; @@ -373,7 +377,7 @@ } private: - void verify_input(JVMState* jvms, uint idx) const { + void verify_input(const JVMState* jvms, uint idx) const { assert(verify_jvms(jvms), "jvms must match"); Node* n = in(idx); assert((!n->bottom_type()->isa_long() && !n->bottom_type()->isa_double()) || @@ -382,34 +386,44 @@ public: // Functionality from old debug nodes which has changed - Node *local(JVMState* jvms, uint idx) const { - verify_input(jvms, jvms->locoff() + idx); - return in(jvms->locoff() + idx); - } - Node *stack(JVMState* jvms, uint idx) const { - verify_input(jvms, jvms->stkoff() + idx); - return in(jvms->stkoff() + idx); - } - Node *argument(JVMState* jvms, uint idx) const { - verify_input(jvms, jvms->argoff() + idx); + Node* local(const JVMState* jvms, uint idx) const { + uint loc_idx = jvms->locoff() + idx; + assert(jvms->is_loc(loc_idx), "not a local slot"); + verify_input(jvms, loc_idx); + return in(loc_idx); + } + Node* stack(const JVMState* jvms, uint idx) const { + uint stk_idx = jvms->stkoff() + idx; + assert(jvms->is_stk(stk_idx), "not a stack slot"); + verify_input(jvms, stk_idx); + return in(stk_idx); + } + Node* argument(const JVMState* jvms, uint idx) const { + uint arg_idx = jvms->argoff() + idx; + assert(jvms->is_stk(arg_idx), "not an argument slot"); + verify_input(jvms, arg_idx); return in(jvms->argoff() + idx); } - Node *monitor_box(JVMState* jvms, uint idx) const { + Node* monitor_box(const JVMState* jvms, uint idx) const { assert(verify_jvms(jvms), "jvms must match"); - return in(jvms->monitor_box_offset(idx)); + uint mon_box_idx = jvms->monitor_box_offset(idx); + assert(jvms->is_monitor_box(mon_box_idx), "not a monitor box offset"); + return in(mon_box_idx); } - Node *monitor_obj(JVMState* jvms, uint idx) const { + Node* monitor_obj(const JVMState* jvms, uint idx) const { assert(verify_jvms(jvms), "jvms must match"); - return in(jvms->monitor_obj_offset(idx)); + uint mon_obj_idx = jvms->monitor_obj_offset(idx); + assert(jvms->is_mon(mon_obj_idx) && !jvms->is_monitor_box(mon_obj_idx), "not a monitor obj offset"); + return in(mon_obj_idx); } - void set_local(JVMState* jvms, uint idx, Node *c); + void set_local(const JVMState* jvms, uint idx, Node *c); - void set_stack(JVMState* jvms, uint idx, Node *c) { + void set_stack(const JVMState* jvms, uint idx, Node *c) { assert(verify_jvms(jvms), "jvms must match"); set_req(jvms->stkoff() + idx, c); } - void set_argument(JVMState* jvms, uint idx, Node *c) { + void set_argument(const JVMState* jvms, uint idx, Node *c) { assert(verify_jvms(jvms), "jvms must match"); set_req(jvms->argoff() + idx, c); } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/opto/compile.cpp openjdk-25-25.0.2+10/src/hotspot/share/opto/compile.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/opto/compile.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/opto/compile.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -3596,7 +3596,10 @@ } else if (t->isa_oopptr()) { new_in2 = ConNode::make(t->make_narrowoop()); } else if (t->isa_klassptr()) { - new_in2 = ConNode::make(t->make_narrowklass()); + ciKlass* klass = t->is_klassptr()->exact_klass(); + if (klass->is_in_encoding_range()) { + new_in2 = ConNode::make(t->make_narrowklass()); + } } } if (new_in2 != nullptr) { @@ -3633,7 +3636,13 @@ } else if (t->isa_oopptr()) { n->subsume_by(ConNode::make(t->make_narrowoop()), this); } else if (t->isa_klassptr()) { - n->subsume_by(ConNode::make(t->make_narrowklass()), this); + ciKlass* klass = t->is_klassptr()->exact_klass(); + if (klass->is_in_encoding_range()) { + n->subsume_by(ConNode::make(t->make_narrowklass()), this); + } else { + assert(false, "unencodable klass in ConP -> EncodeP"); + C->record_failure("unencodable klass in ConP -> EncodeP"); + } } } if (in1->outcnt() == 0) { diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/opto/library_call.cpp openjdk-25-25.0.2+10/src/hotspot/share/opto/library_call.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/opto/library_call.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/opto/library_call.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -3245,7 +3245,7 @@ lease_compare_io->init_req(_true_path, i_o()); lease_compare_io->init_req(_false_path, input_io_state); - lease_result_value->init_req(_true_path, null()); // if the lease was returned, return 0. + lease_result_value->init_req(_true_path, _gvn.longcon(0)); // if the lease was returned, return 0L. lease_result_value->init_req(_false_path, arg); // if not lease, return new updated position. RegionNode* result_rgn = new RegionNode(PATH_LIMIT); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/opto/parse1.cpp openjdk-25-25.0.2+10/src/hotspot/share/opto/parse1.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/opto/parse1.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/opto/parse1.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1149,6 +1149,13 @@ // Create an initial safepoint to hold JVM state during parsing JVMState* jvms = new (C) JVMState(method(), _caller->has_method() ? _caller : nullptr); set_map(new SafePointNode(len, jvms)); + + // Capture receiver info for compiled lambda forms. + if (method()->is_compiled_lambda_form()) { + ciInstance* recv_info = _caller->compute_receiver_info(method()); + jvms->set_receiver_info(recv_info); + } + jvms->set_map(map()); record_for_igvn(map()); assert(jvms->endoff() == len, "correct jvms sizing"); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/opto/superword.cpp openjdk-25-25.0.2+10/src/hotspot/share/opto/superword.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/opto/superword.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/opto/superword.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -2593,6 +2593,8 @@ case Op_ReverseI: case Op_CountLeadingZerosI: case Op_CountTrailingZerosI: + case Op_IsFiniteF: + case Op_IsFiniteD: case Op_IsInfiniteF: case Op_IsInfiniteD: case Op_ExtractS: diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp openjdk-25-25.0.2+10/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -996,6 +996,11 @@ void JvmtiClassFileReconstituter::copy_bytecodes(const methodHandle& mh, unsigned char* bytecodes) { + // We must copy bytecodes only from linked classes. + // Being linked guarantees we are not getting bytecodes at + // the same time the linking process is rewriting them. + guarantee(mh->method_holder()->is_linked(), "Bytecodes must be copied from a linked class"); + // use a BytecodeStream to iterate over the bytecodes. JVM/fast bytecodes // and the breakpoint bytecode are converted to their original bytecodes. diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/prims/jvmtiEnv.cpp openjdk-25-25.0.2+10/src/hotspot/share/prims/jvmtiEnv.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/prims/jvmtiEnv.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/prims/jvmtiEnv.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -451,6 +451,18 @@ InstanceKlass* ik = InstanceKlass::cast(klass); if (ik->get_cached_class_file_bytes() == nullptr) { + // Link the class to avoid races with the rewriter. This will call the verifier also + // on the class. Linking is also done in VM_RedefineClasses below, but we need + // to keep that for other VM_RedefineClasses callers. + JavaThread* THREAD = current_thread; + ik->link_class(THREAD); + if (HAS_PENDING_EXCEPTION) { + // Retransform/JVMTI swallows error messages. Using this class will rerun the verifier in a context + // that propagates the VerifyError, if thrown. + CLEAR_PENDING_EXCEPTION; + return JVMTI_ERROR_INVALID_CLASS; + } + // Not cached, we need to reconstitute the class file from the // VM representation. We don't attach the reconstituted class // bytes to the InstanceKlass here because they have not been @@ -3428,7 +3440,8 @@ JvmtiEnv::GetBytecodes(Method* method, jint* bytecode_count_ptr, unsigned char** bytecodes_ptr) { NULL_CHECK(method, JVMTI_ERROR_INVALID_METHODID); - methodHandle mh(Thread::current(), method); + JavaThread* current_thread = JavaThread::current(); + methodHandle mh(current_thread, method); jint size = (jint)mh->code_size(); jvmtiError err = allocate(size, bytecodes_ptr); if (err != JVMTI_ERROR_NONE) { @@ -3437,6 +3450,13 @@ (*bytecode_count_ptr) = size; // get byte codes + // Make sure the class is verified and rewritten first. + JavaThread* THREAD = current_thread; + mh->method_holder()->link_class(THREAD); + if (HAS_PENDING_EXCEPTION) { + CLEAR_PENDING_EXCEPTION; + return JVMTI_ERROR_INVALID_CLASS; + } JvmtiClassFileReconstituter::copy_bytecodes(mh, *bytecodes_ptr); return JVMTI_ERROR_NONE; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/prims/jvmtiTagMap.cpp openjdk-25-25.0.2+10/src/hotspot/share/prims/jvmtiTagMap.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/prims/jvmtiTagMap.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/prims/jvmtiTagMap.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -944,6 +944,7 @@ // invoked for each object in the heap void IterateOverHeapObjectClosure::do_object(oop o) { + assert(o != nullptr, "Heap iteration should never produce null!"); // check if iteration has been halted if (is_iteration_aborted()) return; @@ -953,7 +954,7 @@ } // skip if object is a dormant shared object whose mirror hasn't been loaded - if (o != nullptr && o->klass()->java_mirror() == nullptr) { + if (o->klass()->java_mirror() == nullptr) { log_debug(aot, heap)("skipped dormant archived object " INTPTR_FORMAT " (%s)", p2i(o), o->klass()->external_name()); return; @@ -1032,6 +1033,7 @@ // invoked for each object in the heap void IterateThroughHeapObjectClosure::do_object(oop obj) { + assert(obj != nullptr, "Heap iteration should never produce null!"); // check if iteration has been halted if (is_iteration_aborted()) return; @@ -1039,7 +1041,7 @@ if (is_filtered_by_klass_filter(obj, klass())) return; // skip if object is a dormant shared object whose mirror hasn't been loaded - if (obj != nullptr && obj->klass()->java_mirror() == nullptr) { + if (obj->klass()->java_mirror() == nullptr) { log_debug(aot, heap)("skipped dormant archived object " INTPTR_FORMAT " (%s)", p2i(obj), obj->klass()->external_name()); return; diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/prims/vectorSupport.cpp openjdk-25-25.0.2+10/src/hotspot/share/prims/vectorSupport.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/prims/vectorSupport.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/prims/vectorSupport.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -593,6 +593,25 @@ break; } + case VECTOR_OP_TAN: // fall-through + case VECTOR_OP_TANH: // fall-through + case VECTOR_OP_SIN: // fall-through + case VECTOR_OP_SINH: // fall-through + case VECTOR_OP_COS: // fall-through + case VECTOR_OP_COSH: // fall-through + case VECTOR_OP_ASIN: // fall-through + case VECTOR_OP_ACOS: // fall-through + case VECTOR_OP_ATAN: // fall-through + case VECTOR_OP_ATAN2: // fall-through + case VECTOR_OP_CBRT: // fall-through + case VECTOR_OP_LOG: // fall-through + case VECTOR_OP_LOG10: // fall-through + case VECTOR_OP_LOG1P: // fall-through + case VECTOR_OP_POW: // fall-through + case VECTOR_OP_EXP: // fall-through + case VECTOR_OP_EXPM1: // fall-through + case VECTOR_OP_HYPOT: return 0; // not supported; should be handled in Java code + default: fatal("unknown op: %d", vop); } return 0; // Unimplemented diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/prims/vectorSupport.hpp openjdk-25-25.0.2+10/src/hotspot/share/prims/vectorSupport.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/prims/vectorSupport.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/prims/vectorSupport.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -101,6 +101,25 @@ VECTOR_OP_COMPRESS_BITS = 33, VECTOR_OP_EXPAND_BITS = 34, + VECTOR_OP_TAN = 101, + VECTOR_OP_TANH = 102, + VECTOR_OP_SIN = 103, + VECTOR_OP_SINH = 104, + VECTOR_OP_COS = 105, + VECTOR_OP_COSH = 106, + VECTOR_OP_ASIN = 107, + VECTOR_OP_ACOS = 108, + VECTOR_OP_ATAN = 109, + VECTOR_OP_ATAN2 = 110, + VECTOR_OP_CBRT = 111, + VECTOR_OP_LOG = 112, + VECTOR_OP_LOG10 = 113, + VECTOR_OP_LOG1P = 114, + VECTOR_OP_POW = 115, + VECTOR_OP_EXP = 116, + VECTOR_OP_EXPM1 = 117, + VECTOR_OP_HYPOT = 118, + VECTOR_OP_SADD = 119, VECTOR_OP_SSUB = 120, VECTOR_OP_SUADD = 121, diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/prims/whitebox.cpp openjdk-25-25.0.2+10/src/hotspot/share/prims/whitebox.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/prims/whitebox.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/prims/whitebox.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -794,7 +794,7 @@ if (_make_not_entrant) { nmethod* nm = CodeCache::find_nmethod(f->pc()); assert(nm != nullptr, "did not find nmethod"); - nm->make_not_entrant("Whitebox deoptimization"); + nm->make_not_entrant(nmethod::ChangeReason::whitebox_deoptimization); } ++_result; } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/runtime/abstract_vm_version.cpp openjdk-25-25.0.2+10/src/hotspot/share/runtime/abstract_vm_version.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/runtime/abstract_vm_version.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/runtime/abstract_vm_version.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -271,6 +271,18 @@ #define HOTSPOT_BUILD_COMPILER "MS VC++ 17.7 (VS2022)" #elif _MSC_VER == 1938 #define HOTSPOT_BUILD_COMPILER "MS VC++ 17.8 (VS2022)" + #elif _MSC_VER == 1939 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 17.9 (VS2022)" + #elif _MSC_VER == 1940 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 17.10 (VS2022)" + #elif _MSC_VER == 1941 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 17.11 (VS2022)" + #elif _MSC_VER == 1942 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 17.12 (VS2022)" + #elif _MSC_VER == 1943 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 17.13 (VS2022)" + #elif _MSC_VER == 1944 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 17.14 (VS2022)" #else #define HOTSPOT_BUILD_COMPILER "unknown MS VC++:" XSTR(_MSC_VER) #endif diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/runtime/arguments.cpp openjdk-25-25.0.2+10/src/hotspot/share/runtime/arguments.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/runtime/arguments.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/runtime/arguments.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -536,6 +536,7 @@ #ifdef _LP64 { "UseCompressedClassPointers", JDK_Version::jdk(25), JDK_Version::jdk(26), JDK_Version::undefined() }, #endif + { "ShenandoahPacing", JDK_Version::jdk(25), JDK_Version::jdk(26), JDK_Version::jdk(27) }, // --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in: { "CreateMinidumpOnCrash", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() }, diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/runtime/deoptimization.cpp openjdk-25-25.0.2+10/src/hotspot/share/runtime/deoptimization.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/runtime/deoptimization.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/runtime/deoptimization.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1826,7 +1826,7 @@ #if INCLUDE_JVMCI address Deoptimization::deoptimize_for_missing_exception_handler(nmethod* nm) { // there is no exception handler for this pc => deoptimize - nm->make_not_entrant("missing exception handler"); + nm->make_not_entrant(nmethod::ChangeReason::missing_exception_handler); // Use Deoptimization::deoptimize for all of its side-effects: // gathering traps statistics, logging... @@ -2455,7 +2455,7 @@ // Recompile if (make_not_entrant) { - if (!nm->make_not_entrant("uncommon trap")) { + if (!nm->make_not_entrant(nmethod::ChangeReason::uncommon_trap)) { return; // the call did not change nmethod's state } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp openjdk-25-25.0.2+10/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -39,6 +39,14 @@ return JVMFlag::SUCCESS; } +JVMFlag::Error AOTCacheOutputConstraintFunc(ccstr value, bool verbose) { + if (value == nullptr) { + JVMFlag::printError(verbose, "AOTCacheOutput cannot be empty\n"); + return JVMFlag::VIOLATES_CONSTRAINT; + } + return JVMFlag::SUCCESS; +} + JVMFlag::Error AOTConfigurationConstraintFunc(ccstr value, bool verbose) { if (value == nullptr) { JVMFlag::printError(verbose, "AOTConfiguration cannot be empty\n"); @@ -139,3 +147,13 @@ return JVMFlag::SUCCESS; } + +JVMFlag::Error LargePageSizeInBytesConstraintFunc(size_t value, bool verbose) { + if (!is_power_of_2(value)) { + JVMFlag::printError(verbose, "LargePageSizeInBytes ( %zu ) must be " + "a power of 2\n", + value); + return JVMFlag::VIOLATES_CONSTRAINT; + } + return JVMFlag::SUCCESS; +} diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp openjdk-25-25.0.2+10/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/runtime/flags/jvmFlagConstraintsRuntime.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -35,13 +35,15 @@ #define RUNTIME_CONSTRAINTS(f) \ f(ccstr, AOTCacheConstraintFunc) \ + f(ccstr, AOTCacheOutputConstraintFunc) \ f(ccstr, AOTConfigurationConstraintFunc) \ f(ccstr, AOTModeConstraintFunc) \ f(int, ObjectAlignmentInBytesConstraintFunc) \ f(int, ContendedPaddingWidthConstraintFunc) \ f(int, PerfDataSamplingIntervalFunc) \ f(uintx, VMPageSizeConstraintFunc) \ - f(size_t, NUMAInterleaveGranularityConstraintFunc) + f(size_t, NUMAInterleaveGranularityConstraintFunc) \ + f(size_t, LargePageSizeInBytesConstraintFunc) RUNTIME_CONSTRAINTS(DECLARE_CONSTRAINT) diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/runtime/globals.hpp openjdk-25-25.0.2+10/src/hotspot/share/runtime/globals.hpp --- openjdk-25-25.0.1+8/src/hotspot/share/runtime/globals.hpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/runtime/globals.hpp 2025-12-18 08:04:02.000000000 +0000 @@ -242,8 +242,10 @@ \ product(size_t, LargePageSizeInBytes, 0, \ "Maximum large page size used (0 will use the default large " \ - "page size for the environment as the maximum)") \ + "page size for the environment as the maximum) " \ + "(must be a power of 2)") \ range(0, max_uintx) \ + constraint(LargePageSizeInBytesConstraintFunc, AtParse) \ \ product(size_t, LargePageHeapSizeThreshold, 128*M, \ "Use large pages if maximum heap is at least this big") \ @@ -293,6 +295,9 @@ product(bool, UseInlineCaches, true, \ "Use Inline Caches for virtual calls ") \ \ + develop(bool, VerifyInlineCaches, true, \ + "Verify Inline Caches") \ + \ product(bool, InlineArrayCopy, true, DIAGNOSTIC, \ "Inline arraycopy native that is known to be part of " \ "base library DLL") \ @@ -485,6 +490,9 @@ develop(bool, ZapFillerObjects, trueInDebug, \ "Zap filler objects") \ \ + develop(bool, ZapCHeap, trueInDebug, \ + "Zap allocated/freed C heap space") \ + \ develop(bool, ZapTLAB, trueInDebug, \ "Zap allocated TLABs") \ develop(bool, TestingAsyncLoggingDeathTest, false, \ @@ -2009,6 +2017,7 @@ develop(uint, BinarySearchThreshold, 16, \ "Minimal number of elements in a sorted collection to prefer" \ "binary search over simple linear search." ) \ + \ // end of RUNTIME_FLAGS diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/runtime/java.cpp openjdk-25-25.0.2+10/src/hotspot/share/runtime/java.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/runtime/java.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/runtime/java.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -463,7 +463,10 @@ event.commit(); } - JFR_ONLY(Jfr::on_vm_shutdown(false, halt);) + // 2nd argument (emit_event_shutdown) should be set to false + // because EventShutdown would be emitted at Threads::destroy_vm(). + // (one of the callers of before_exit()) + JFR_ONLY(Jfr::on_vm_shutdown(true, false, halt);) // Stop the WatcherThread. We do this before disenrolling various // PeriodicTasks to reduce the likelihood of races. diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/runtime/javaThread.cpp openjdk-25-25.0.2+10/src/hotspot/share/runtime/javaThread.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/runtime/javaThread.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/runtime/javaThread.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1339,7 +1339,7 @@ // it is a Java nmethod nmethod* nm = CodeCache::find_nmethod(fst.current()->pc()); assert(nm != nullptr, "did not find nmethod"); - nm->make_not_entrant("zombie"); + nm->make_not_entrant(nmethod::ChangeReason::zombie); } } } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/runtime/mutexLocker.cpp openjdk-25-25.0.2+10/src/hotspot/share/runtime/mutexLocker.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/runtime/mutexLocker.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/runtime/mutexLocker.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -259,7 +259,7 @@ MUTEX_DEFN(CompiledIC_lock , PaddedMutex , nosafepoint); // locks VtableStubs_lock MUTEX_DEFN(MethodCompileQueue_lock , PaddedMonitor, safepoint); - MUTEX_DEFL(TrainingData_lock , PaddedMutex , MethodCompileQueue_lock); + MUTEX_DEFN(TrainingData_lock , PaddedMutex , nosafepoint); MUTEX_DEFN(TrainingReplayQueue_lock , PaddedMonitor, safepoint); MUTEX_DEFN(CompileStatistics_lock , PaddedMutex , safepoint); MUTEX_DEFN(DirectivesStack_lock , PaddedMutex , nosafepoint); diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/runtime/os.cpp openjdk-25-25.0.2+10/src/hotspot/share/runtime/os.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/runtime/os.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/runtime/os.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -666,8 +666,8 @@ if (CDSConfig::is_dumping_static_archive()) { // Need to deterministically fill all the alignment gaps in C++ structures. ::memset(inner_ptr, 0, size); - } else { - DEBUG_ONLY(::memset(inner_ptr, uninitBlockPad, size);) + } else if (ZapCHeap) { + ::memset(inner_ptr, uninitBlockPad, size); } DEBUG_ONLY(break_if_ptr_caught(inner_ptr);) return inner_ptr; @@ -740,7 +740,7 @@ #ifdef ASSERT assert(old_size == free_info.size, "Sanity"); - if (old_size < size) { + if (ZapCHeap && old_size < size) { // We also zap the newly extended region. ::memset((char*)new_inner_ptr + old_size, uninitBlockPad, size - old_size); } diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/runtime/vmStructs.cpp openjdk-25-25.0.2+10/src/hotspot/share/runtime/vmStructs.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/runtime/vmStructs.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/runtime/vmStructs.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -667,6 +667,14 @@ static_field(VMRegImpl, regName[0], const char*) \ static_field(VMRegImpl, stack0, VMReg) \ \ + /******************************************************************************************/ \ + /* CI (NOTE: these CI fields are retained in VMStructs for the benefit of external tools, */ \ + /* to ease their migration to a future alternative.) */ \ + /******************************************************************************************/ \ + \ + nonstatic_field(CompilerThread, _env, ciEnv*) \ + nonstatic_field(ciEnv, _task, CompileTask*) \ + \ /************/ \ /* Monitors */ \ /************/ \ @@ -1150,6 +1158,12 @@ declare_toplevel_type(BasicLock) \ declare_toplevel_type(BasicObjectLock) \ \ + /*********************/ \ + /* CI */ \ + /*********************/ \ + \ + declare_toplevel_type(ciEnv) \ + \ /********************/ \ /* -XX flags */ \ /********************/ \ diff -Nru openjdk-25-25.0.1+8/src/hotspot/share/utilities/vmError.cpp openjdk-25-25.0.2+10/src/hotspot/share/utilities/vmError.cpp --- openjdk-25-25.0.1+8/src/hotspot/share/utilities/vmError.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/hotspot/share/utilities/vmError.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -109,12 +109,13 @@ static const char* env_list[] = { // All platforms "JAVA_HOME", "JAVA_TOOL_OPTIONS", "_JAVA_OPTIONS", "CLASSPATH", - "PATH", "USERNAME", + "JDK_AOT_VM_OPTIONS", + "JAVA_OPTS", "PATH", "USERNAME", "XDG_CACHE_HOME", "XDG_CONFIG_HOME", "FC_LANG", "FONTCONFIG_USE_MMAP", // Env variables that are defined on Linux/BSD - "LD_LIBRARY_PATH", "LD_PRELOAD", "SHELL", "DISPLAY", + "LD_LIBRARY_PATH", "LD_PRELOAD", "SHELL", "DISPLAY", "WAYLAND_DISPLAY", "HOSTTYPE", "OSTYPE", "ARCH", "MACHTYPE", "LANG", "LC_ALL", "LC_CTYPE", "LC_NUMERIC", "LC_TIME", "TERM", "TMPDIR", "TZ", @@ -1856,7 +1857,7 @@ log.set_fd(-1); } - JFR_ONLY(Jfr::on_vm_shutdown(true);) + JFR_ONLY(Jfr::on_vm_shutdown(static_cast(_id) == OOM_JAVA_HEAP_FATAL, true);) if (PrintNMTStatistics) { fdStream fds(fd_out); diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/java/lang/ClassValue.java openjdk-25-25.0.2+10/src/java.base/share/classes/java/lang/ClassValue.java --- openjdk-25-25.0.1+8/src/java.base/share/classes/java/lang/ClassValue.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.base/share/classes/java/lang/ClassValue.java 2025-12-18 08:04:02.000000000 +0000 @@ -476,6 +476,9 @@ if (updated != entry) { put(classValue.identity, updated); } + // Add to the cache, to enable the fast path, next time. + checkCacheLoad(); + addToCache(classValue, updated); } return item; } diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/java/lang/ScopedValue.java openjdk-25-25.0.2+10/src/java.base/share/classes/java/lang/ScopedValue.java --- openjdk-25-25.0.1+8/src/java.base/share/classes/java/lang/ScopedValue.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.base/share/classes/java/lang/ScopedValue.java 2025-12-18 08:04:02.000000000 +0000 @@ -566,7 +566,7 @@ @SuppressWarnings("unchecked") private T slowGet() { - var value = findBinding(); + Object value = scopedValueBindings().find(this); if (value == Snapshot.NIL) { throw new NoSuchElementException("ScopedValue not bound"); } @@ -575,32 +575,35 @@ } /** - * {@return {@code true} if this scoped value is bound in the current thread} + * Return the value of the scoped value or NIL if not bound. + * Consult the cache, and only if the value is not found there + * search the list of bindings. Update the cache if the binding + * was found. */ - public boolean isBound() { + private Object findBinding() { Object[] objects = scopedValueCache(); if (objects != null) { int n = (hash & Cache.SLOT_MASK) * 2; if (objects[n] == this) { - return true; + return objects[n + 1]; } n = ((hash >>> Cache.INDEX_BITS) & Cache.SLOT_MASK) * 2; if (objects[n] == this) { - return true; + return objects[n + 1]; } } - var value = findBinding(); - boolean result = (value != Snapshot.NIL); - if (result) Cache.put(this, value); - return result; + Object value = scopedValueBindings().find(this); + boolean found = (value != Snapshot.NIL); + if (found) Cache.put(this, value); + return value; } /** - * Return the value of the scoped value or NIL if not bound. + * {@return {@code true} if this scoped value is bound in the current thread} */ - private Object findBinding() { - Object value = scopedValueBindings().find(this); - return value; + public boolean isBound() { + Object obj = findBinding(); + return obj != Snapshot.NIL; } /** diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/java/net/InMemoryCookieStore.java openjdk-25-25.0.2+10/src/java.base/share/classes/java/net/InMemoryCookieStore.java --- openjdk-25-25.0.1+8/src/java.base/share/classes/java/net/InMemoryCookieStore.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.base/share/classes/java/net/InMemoryCookieStore.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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,10 +25,6 @@ package java.net; -import java.net.URI; -import java.net.CookieStore; -import java.net.HttpCookie; -import java.net.URISyntaxException; import java.util.List; import java.util.Map; import java.util.ArrayList; @@ -72,6 +68,7 @@ /** * Add one cookie into cookie store. */ + @Override public void add(URI uri, HttpCookie cookie) { // pre-condition : argument can't be null if (cookie == null) { @@ -109,6 +106,7 @@ * 3) not expired. * See RFC 2965 sec. 3.3.4 for more detail. */ + @Override public List get(URI uri) { // argument can't be null if (uri == null) { @@ -127,12 +125,13 @@ lock.unlock(); } - return cookies; + return Collections.unmodifiableList(cookies); } /** * Get all cookies in cookie store, except those have expired */ + @Override public List getCookies() { List rt; @@ -156,6 +155,7 @@ * Get all URIs, which are associated with at least one cookie * of this cookie store. */ + @Override public List getURIs() { List uris = new ArrayList<>(); @@ -165,7 +165,7 @@ while (it.hasNext()) { URI uri = it.next(); List cookies = uriIndex.get(uri); - if (cookies == null || cookies.size() == 0) { + if (cookies == null || cookies.isEmpty()) { // no cookies list or an empty list associated with // this uri entry, delete it it.remove(); @@ -176,13 +176,14 @@ lock.unlock(); } - return uris; + return Collections.unmodifiableList(uris); } /** * Remove a cookie from store */ + @Override public boolean remove(URI uri, HttpCookie ck) { // argument can't be null if (ck == null) { @@ -204,6 +205,7 @@ /** * Remove all cookies in this cookie store. */ + @Override public boolean removeAll() { lock.lock(); try { diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/java/nio/Bits.java openjdk-25-25.0.2+10/src/java.base/share/classes/java/nio/Bits.java --- openjdk-25-25.0.1+8/src/java.base/share/classes/java/nio/Bits.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.base/share/classes/java/nio/Bits.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2021, 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 @@ -234,4 +234,28 @@ // of an element by element copy. These numbers may change over time. static final int JNI_COPY_TO_ARRAY_THRESHOLD = 6; static final int JNI_COPY_FROM_ARRAY_THRESHOLD = 6; + + // Maximum number of bytes to set in one call to {@code Unsafe.setMemory}. + // This threshold allows safepoint polling during large memory operations. + static final long UNSAFE_SET_THRESHOLD = 1024 * 1024; + + /** + * Sets a block of memory starting from a given address to a specified byte value. + * + * @param srcAddr + * the starting memory address + * @param count + * the number of bytes to set + * @param value + * the byte value to set + */ + static void setMemory(long srcAddr, long count, byte value) { + long offset = 0; + while (offset < count) { + long len = Math.min(UNSAFE_SET_THRESHOLD, count - offset); + UNSAFE.setMemory(srcAddr + offset, len, value); + offset += len; + } + } + } diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template openjdk-25-25.0.2+10/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template --- openjdk-25-25.0.1+8/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, 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 @@ -114,7 +114,7 @@ Bits.unreserveMemory(size, cap); throw x; } - UNSAFE.setMemory(base, size, (byte) 0); + Bits.setMemory(base, size, (byte) 0); if (pa && (base % ps != 0)) { // Round up to page boundary address = base + ps - (base & (ps - 1)); diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/java/text/Collator.java openjdk-25-25.0.2+10/src/java.base/share/classes/java/text/Collator.java --- openjdk-25-25.0.1+8/src/java.base/share/classes/java/text/Collator.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.base/share/classes/java/text/Collator.java 2025-12-18 08:04:02.000000000 +0000 @@ -111,8 +111,13 @@ *
* @apiNote {@code CollationKey}s from different * {@code Collator}s can not be compared. See the class description - * for {@link CollationKey} - * for an example using {@code CollationKey}s. + * for {@link CollationKey} for an example using {@code CollationKey}s. + * + * @implNote Significant thread contention may occur during concurrent usage + * of the JDK Reference Implementation's {@link RuleBasedCollator}, which is the + * subtype returned by the default provider of the {@link #getInstance()} factory + * methods. As such, users should consider retrieving a separate instance for + * each thread when used in multithreaded environments. * * @see RuleBasedCollator * @see CollationKey diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/java/text/RuleBasedCollator.java openjdk-25-25.0.2+10/src/java.base/share/classes/java/text/RuleBasedCollator.java --- openjdk-25-25.0.1+8/src/java.base/share/classes/java/text/RuleBasedCollator.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.base/share/classes/java/text/RuleBasedCollator.java 2025-12-18 08:04:02.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 @@ -38,10 +38,6 @@ package java.text; -import java.text.Normalizer; -import java.util.Vector; -import java.util.Locale; - /** * The {@code RuleBasedCollator} class is a concrete subclass of * {@code Collator} that provides a simple, data-driven, table @@ -239,6 +235,11 @@ * * * + * @implNote For this implementation, concurrent usage of this class may + * lead to significant thread contention since {@code synchronized} is employed + * to ensure thread-safety. As such, users of this class should consider creating + * a separate instance for each thread when used in multithreaded environments. + * * @see Collator * @see CollationElementIterator * @author Helena Shih, Laura Werner, Richard Gillam diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/java/util/SimpleTimeZone.java openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/SimpleTimeZone.java --- openjdk-25-25.0.1+8/src/java.base/share/classes/java/util/SimpleTimeZone.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/SimpleTimeZone.java 2025-12-18 08:04:02.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 @@ -112,15 +112,15 @@ *

  *      // Base GMT offset: -8:00
  *      // DST starts:      at 2:00am in standard time
- *      //                  on the first Sunday in April
+ *      //                  on the second Sunday in March
  *      // DST ends:        at 2:00am in daylight time
- *      //                  on the last Sunday in October
+ *      //                  on the first Sunday in November
  *      // Save:            1 hour
  *      SimpleTimeZone(-28800000,
  *                     "America/Los_Angeles",
- *                     Calendar.APRIL, 1, -Calendar.SUNDAY,
+ *                     Calendar.MARCH, 8, -Calendar.SUNDAY,
  *                     7200000,
- *                     Calendar.OCTOBER, -1, Calendar.SUNDAY,
+ *                     Calendar.NOVEMBER, 1, -Calendar.SUNDAY,
  *                     7200000,
  *                     3600000)
  *
@@ -863,13 +863,24 @@
     }
 
     /**
-     * Generates the hash code for the SimpleDateFormat object.
+     * Generates the hash code for the SimpleTimeZone object.
      * @return the hash code for this object
      */
     public int hashCode()
     {
-        return startMonth ^ startDay ^ startDayOfWeek ^ startTime ^
-            endMonth ^ endDay ^ endDayOfWeek ^ endTime ^ rawOffset;
+        int hash = 31 * getID().hashCode() + rawOffset;
+        hash = 31 * hash + Boolean.hashCode(useDaylight);
+        if (useDaylight) {
+            hash = 31 * hash + startMonth;
+            hash = 31 * hash + startDay;
+            hash = 31 * hash + startDayOfWeek;
+            hash = 31 * hash + startTime;
+            hash = 31 * hash + endMonth;
+            hash = 31 * hash + endDay;
+            hash = 31 * hash + endDayOfWeek;
+            hash = 31 * hash + endTime;
+        }
+        return hash;
     }
 
     /**
diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java
--- openjdk-25-25.0.1+8/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java	2025-12-18 08:04:02.000000000 +0000
@@ -1904,8 +1904,8 @@
         while ((r = result) == null) {
             if (q == null) {
                 q = new Signaller(interruptible, 0L, 0L);
-                if (Thread.currentThread() instanceof ForkJoinWorkerThread)
-                    ForkJoinPool.helpAsyncBlocker(defaultExecutor(), q);
+                if (Thread.currentThread() instanceof ForkJoinWorkerThread wt)
+                    ForkJoinPool.helpAsyncBlocker(wt.pool, q);
             }
             else if (!queued)
                 queued = tryPushStack(q);
@@ -1950,8 +1950,8 @@
                 break;
             else if (q == null) {
                 q = new Signaller(true, nanos, deadline);
-                if (Thread.currentThread() instanceof ForkJoinWorkerThread)
-                    ForkJoinPool.helpAsyncBlocker(defaultExecutor(), q);
+                if (Thread.currentThread() instanceof ForkJoinWorkerThread wt)
+                    ForkJoinPool.helpAsyncBlocker(wt.pool, q);
             }
             else if (!queued)
                 queued = tryPushStack(q);
diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java
--- openjdk-25-25.0.1+8/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/CopyOnWriteArraySet.java	2025-12-18 08:04:02.000000000 +0000
@@ -35,6 +35,13 @@
 
 package java.util.concurrent;
 
+import jdk.internal.misc.Unsafe;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectStreamException;
+import java.io.Serial;
+import java.io.StreamCorruptedException;
 import java.util.AbstractSet;
 import java.util.Collection;
 import java.util.Iterator;
@@ -445,4 +452,38 @@
         return Spliterators.spliterator
             (al.getArray(), Spliterator.IMMUTABLE | Spliterator.DISTINCT);
     }
+
+    /**
+     * De-serialization without data not supported for this class.
+     */
+    @Serial
+    private void readObjectNoData() throws ObjectStreamException {
+        throw new StreamCorruptedException("Deserialized CopyOnWriteArraySet requires data");
+    }
+
+    /**
+     * Reconstitutes the {@code CopyOnWriteArraySet} instance from a stream
+     * (that is, deserializes it).
+     * @throws StreamCorruptedException if the object read from the stream is invalid.
+     */
+    @Serial
+    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
+        CopyOnWriteArrayList newAl; // Set during the duplicate check
+
+        @SuppressWarnings("unchecked")
+        CopyOnWriteArrayList inAl = (CopyOnWriteArrayList) in.readFields().get("al", null);
+
+        if (inAl == null
+                || inAl.getClass() != CopyOnWriteArrayList.class
+                || (newAl = new CopyOnWriteArrayList<>()).addAllAbsent(inAl) != inAl.size()) {
+            throw new StreamCorruptedException("Content is invalid");
+        }
+
+        final Unsafe U = Unsafe.getUnsafe();
+        U.putReference(
+                this,
+                U.objectFieldOffset(CopyOnWriteArraySet.class, "al"),
+                newAl
+        );
+    }
 }
diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/java/util/concurrent/Executors.java openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/Executors.java
--- openjdk-25-25.0.1+8/src/java.base/share/classes/java/util/concurrent/Executors.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/share/classes/java/util/concurrent/Executors.java	2025-12-18 08:04:02.000000000 +0000
@@ -755,6 +755,13 @@
             super.shutdown();
             cleanable.clean();  // unregisters the cleanable
         }
+
+        @Override
+        public List shutdownNow() {
+            List unexecuted = super.shutdownNow();
+            cleanable.clean();  // unregisters the cleanable
+            return unexecuted;
+        }
     }
 
     /**
diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/jdk/internal/classfile/impl/verifier/VerifierImpl.java openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/classfile/impl/verifier/VerifierImpl.java
--- openjdk-25-25.0.1+8/src/java.base/share/classes/jdk/internal/classfile/impl/verifier/VerifierImpl.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/classfile/impl/verifier/VerifierImpl.java	2025-12-18 08:04:02.000000000 +0000
@@ -1515,13 +1515,6 @@
         }
     }
 
-    // Return TRUE if all code paths starting with start_bc_offset end in
-    // bytecode athrow or loop.
-    boolean ends_in_athrow(int start_bc_offset) {
-        log_info("unimplemented VerifierImpl.ends_in_athrow");
-        return true;
-    }
-
     boolean verify_invoke_init(RawBytecodeHelper bcs, int ref_class_index, VerificationType ref_class_type,
             VerificationFrame current_frame, int code_length, boolean in_try_block,
             boolean this_uninit, ConstantPoolWrapper cp, VerificationTable stackmap_table) {
@@ -1534,16 +1527,6 @@
                 verifyError("Bad  method call");
             }
             if (in_try_block) {
-                for(var exhandler : _method.exceptionTable()) {
-                    int start_pc = exhandler[0];
-                    int end_pc = exhandler[1];
-
-                    if (bci >= start_pc && bci < end_pc) {
-                        if (!ends_in_athrow(exhandler[2])) {
-                            verifyError("Bad  method call from after the start of a try block");
-                        }
-                    }
-                }
                 verify_exception_handler_targets(bci, true, current_frame, stackmap_table);
             }
             current_frame.initialize_object(type, current_type());
diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/jdk/internal/foreign/abi/BindingSpecializer.java openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/foreign/abi/BindingSpecializer.java
--- openjdk-25-25.0.1+8/src/java.base/share/classes/jdk/internal/foreign/abi/BindingSpecializer.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/foreign/abi/BindingSpecializer.java	2025-12-18 08:04:02.000000000 +0000
@@ -297,7 +297,7 @@
         if (callingSequence.allocationSize() != 0) {
             cb.loadConstant(callingSequence.allocationSize())
               .invokestatic(CD_SharedUtils, "newBoundedArena", MTD_NEW_BOUNDED_ARENA);
-        } else if (callingSequence.forUpcall() && needsSession()) {
+        } else if (callingSequence.forUpcall() && anyArgNeedsScope()) {
             cb.invokestatic(CD_SharedUtils, "newEmptyArena", MTD_NEW_EMPTY_ARENA);
         } else {
             cb.getstatic(CD_SharedUtils, "DUMMY_ARENA", CD_Arena);
@@ -437,7 +437,7 @@
         cb.exceptionCatchAll(tryStart, tryEnd, catchStart);
     }
 
-    private boolean needsSession() {
+    private boolean anyArgNeedsScope() {
         return callingSequence.argumentBindings()
                 .filter(BoxAddress.class::isInstance)
                 .map(BoxAddress.class::cast)
@@ -590,7 +590,7 @@
         popType(long.class);
         cb.loadConstant(boxAddress.size())
           .loadConstant(boxAddress.align());
-        if (needsSession()) {
+        if (boxAddress.needsScope()) {
             emitLoadInternalSession();
             cb.invokestatic(CD_Utils, "longToAddress", MTD_LONG_TO_ADDRESS_SCOPE);
         } else {
diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/jdk/internal/util/Exceptions.java openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/util/Exceptions.java
--- openjdk-25-25.0.1+8/src/java.base/share/classes/jdk/internal/util/Exceptions.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/share/classes/jdk/internal/util/Exceptions.java	2025-12-18 08:04:02.000000000 +0000
@@ -274,12 +274,9 @@
      */
     public static IOException ioException(IOException e, SocketAddress addr) {
         setup();
-        if (addr == null) {
+        if (!enhancedSocketExceptionText || addr == null) {
             return e;
         }
-        if (!enhancedSocketExceptionText) {
-            return create(e, e.getMessage());
-        }
         if (addr instanceof UnixDomainSocketAddress) {
             return ofUnixDomain(e, (UnixDomainSocketAddress)addr);
         } else if (addr instanceof InetSocketAddress) {
diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/sun/invoke/util/BytecodeDescriptor.java openjdk-25-25.0.2+10/src/java.base/share/classes/sun/invoke/util/BytecodeDescriptor.java
--- openjdk-25-25.0.1+8/src/java.base/share/classes/sun/invoke/util/BytecodeDescriptor.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/share/classes/sun/invoke/util/BytecodeDescriptor.java	2025-12-18 08:04:02.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -96,8 +96,15 @@
             }
         } else if (c == '[') {
             Class t = parseSig(str, i, end, loader);
-            if (t != null)
-                t = t.arrayType();
+            if (t != null) {
+                try {
+                    t = t.arrayType();
+                } catch (UnsupportedOperationException ex) {
+                    // Bad arrays, such as [V or more than 255 dims
+                    // We have a more informative IAE
+                    return null;
+                }
+            }
             return t;
         } else {
             return Wrapper.forBasicType(c).primitiveType();
diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/sun/security/provider/certpath/URICertStore.java openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/provider/certpath/URICertStore.java
--- openjdk-25-25.0.1+8/src/java.base/share/classes/sun/security/provider/certpath/URICertStore.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/provider/certpath/URICertStore.java	2025-12-18 08:04:02.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -29,6 +29,7 @@
 import java.io.IOException;
 import java.net.HttpURLConnection;
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URLConnection;
 import java.security.InvalidAlgorithmParameterException;
 import java.security.NoSuchAlgorithmException;
@@ -48,8 +49,11 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Locale;
+import java.util.Optional;
+import java.util.Set;
 
 import sun.security.x509.AccessDescription;
 import sun.security.x509.GeneralNameInterface;
@@ -58,6 +62,8 @@
 import sun.security.util.Debug;
 import sun.security.util.SecurityProperties;
 
+import javax.security.auth.x500.X500Principal;
+
 /**
  * A CertStore that retrieves Certificates or
  * CRLs from a URI, for example, as specified in an X.509
@@ -183,6 +189,166 @@
     }
 
     /**
+     * Enumeration for the allowed schemes we support when following a
+     * URI from an authorityInfoAccess extension on a certificate.
+     */
+    private enum AllowedScheme {
+        HTTP(HttpFtpRuleMatcher.HTTP),
+        HTTPS(HttpFtpRuleMatcher.HTTPS),
+        LDAP(LdapRuleMatcher.LDAP),
+        LDAPS(LdapRuleMatcher.LDAPS),
+        FTP(HttpFtpRuleMatcher.FTP);
+
+        final URIRuleMatcher ruleMatcher;
+
+        AllowedScheme(URIRuleMatcher matcher) {
+            ruleMatcher = matcher;
+        }
+
+        /**
+         * Return an {@code AllowedScheme} based on a case-insensitive match
+         * @param name the scheme name to be matched
+         * @return the {@code AllowedScheme} that corresponds to the
+         *      {@code name} provided, or null if there is no match.
+         */
+        static AllowedScheme nameOf(String name) {
+            if (name == null) {
+                return null;
+            }
+
+            try {
+                return AllowedScheme.valueOf(name.toUpperCase(Locale.ROOT));
+            } catch (IllegalArgumentException _) {
+                return null;
+            }
+        }
+    }
+
+    private static Set CA_ISS_URI_FILTERS = null;
+    private static final boolean CA_ISS_ALLOW_ANY;
+
+    static {
+        boolean allowAny = false;
+        try {
+            if (Builder.USE_AIA) {
+                CA_ISS_URI_FILTERS = new LinkedHashSet<>();
+                String aiaPropVal = Optional.ofNullable(
+                        SecurityProperties.getOverridableProperty(
+                                "com.sun.security.allowedAIALocations")).
+                        map(String::trim).orElse("");
+                if (aiaPropVal.equalsIgnoreCase("any")) {
+                    allowAny = true;
+                    if (debug != null) {
+                        debug.println("allowedAIALocations: Warning: " +
+                                "Allow-All URI filtering enabled!");
+                    }
+                } else {
+                    // Load all the valid rules from the Security property
+                    if (!aiaPropVal.isEmpty()) {
+                        String[] aiaUriStrs = aiaPropVal.trim().split("\\s+");
+                        addCaIssUriFilters(aiaUriStrs);
+                    }
+
+                    if (CA_ISS_URI_FILTERS.isEmpty()) {
+                        if (debug != null) {
+                            debug.println("allowedAIALocations: Warning: " +
+                                    "No valid filters found. Deny-all URI " +
+                                    "filtering is active.");
+                        }
+                    }
+                }
+            }
+        } finally {
+            CA_ISS_ALLOW_ANY = allowAny;
+        }
+    }
+
+    /**
+     * Populate the filter collection from the list of AIA CA issuer URIs
+     * found in the {@code com.sun.security.allowedAIALocations} security
+     * or system property.
+     *
+     * @param aiaUriStrs array containing String URI filters
+     */
+    private static void addCaIssUriFilters(String[] aiaUriStrs) {
+        for (String aiaStr : aiaUriStrs) {
+            if (aiaStr != null && !aiaStr.isEmpty()) {
+                try {
+                    AllowedScheme scheme;
+                    URI aiaUri = new URI(aiaStr).normalize();
+                    // It must be absolute and non-opaque
+                    if (!aiaUri.isAbsolute() || aiaUri.isOpaque()) {
+                        if (debug != null) {
+                            debug.println("allowedAIALocations: Skipping " +
+                                    "non-absolute or opaque URI " + aiaUri);
+                        }
+                    } else if (aiaUri.getHost() == null) {
+                        // We do not allow rules with URIs that omit a hostname
+                        // or address.
+                        if (debug != null) {
+                            debug.println("allowedAIALocations: Skipping " +
+                                    "URI rule with no hostname or address: " +
+                                    aiaUri);
+                        }
+                    } else if ((scheme = AllowedScheme.nameOf(
+                            aiaUri.getScheme())) != null) {
+                        // When it is an LDAP type, we can check the path
+                        // portion (the DN) for proper structure and reject
+                        // the rule early if it isn't correct.
+                        if (scheme == AllowedScheme.LDAP ||
+                                scheme == AllowedScheme.LDAPS) {
+                            try {
+                                new X500Principal(aiaUri.getPath().
+                                        replaceFirst("^/+", ""));
+                            } catch (IllegalArgumentException iae) {
+                                if (debug != null) {
+                                    debug.println("allowedAIALocations: " +
+                                            "Skipping LDAP rule: " + iae);
+                                }
+                                continue;
+                            }
+                        }
+
+                        // When a URI has a non-null query or fragment
+                        // warn the user upon adding the rule that those
+                        // components will be ignored
+                        if (aiaUri.getQuery() != null) {
+                            if (debug != null) {
+                                debug.println("allowedAIALocations: " +
+                                        "Rule will ignore non-null query");
+                            }
+                        }
+                        if (aiaUri.getFragment() != null) {
+                            if (debug != null) {
+                                debug.println("allowedAIALocations: " +
+                                        "Rule will ignore non-null fragment");
+                            }
+                        }
+
+                        CA_ISS_URI_FILTERS.add(aiaUri);
+                        if (debug != null) {
+                            debug.println("allowedAIALocations: Added " +
+                                    aiaUri + " to URI filters");
+                        }
+                    } else {
+                        if (debug != null) {
+                            debug.println("allowedAIALocations: Disallowed " +
+                                    "filter URI scheme: " +
+                                    aiaUri.getScheme());
+                        }
+                    }
+                } catch (URISyntaxException urise) {
+                    if (debug != null) {
+                        debug.println("allowedAIALocations: Skipping " +
+                                "filter URI entry " + aiaStr +
+                                ": parse failure at index " + urise.getIndex());
+                    }
+                }
+            }
+        }
+    }
+
+    /**
      * Creates a URICertStore.
      *
      * @param params specifying the URI
@@ -244,6 +410,39 @@
             return null;
         }
         URI uri = ((URIName) gn).getURI();
+
+        // Before performing any instantiation make sure that
+        // the URI passes any filtering rules.  This processing should
+        // only occur if the com.sun.security.enableAIAcaIssuers is true
+        // and the "any" rule has not been specified.
+        if (Builder.USE_AIA && !CA_ISS_ALLOW_ANY) {
+            URI normAIAUri = uri.normalize();
+            AllowedScheme scheme = AllowedScheme.nameOf(normAIAUri.getScheme());
+
+            if (scheme == null) {
+                if (debug != null) {
+                    debug.println("allowedAIALocations: No matching ruleset " +
+                            "for scheme " + normAIAUri.getScheme());
+                }
+                return null;
+            }
+
+            // Go through each of the filter rules and see if any will
+            // make a positive match against the caIssuer URI.  If nothing
+            // matches then we won't instantiate a URICertStore.
+            if (CA_ISS_URI_FILTERS.stream().noneMatch(rule ->
+                    scheme.ruleMatcher.matchRule(rule, normAIAUri))) {
+                if (debug != null) {
+                    debug.println("allowedAIALocations: Warning - " +
+                        "The caIssuer URI " + normAIAUri +
+                        " in the AuthorityInfoAccess extension is denied " +
+                        "access. Use the com.sun.security.allowedAIALocations" +
+                        " security/system property to allow access.");
+                }
+                return null;
+            }
+        }
+
         try {
             return URICertStore.getInstance(new URICertStoreParameters(uri));
         } catch (Exception ex) {
@@ -270,7 +469,7 @@
     @Override
     @SuppressWarnings("unchecked")
     public synchronized Collection engineGetCertificates
-        (CertSelector selector) throws CertStoreException {
+            (CertSelector selector) throws CertStoreException {
 
         if (ldap) {
             // caching mechanism, see the class description for more info.
@@ -462,4 +661,159 @@
             super(spi, p, type, params);
         }
     }
+
+    /**
+     * URIRuleMatcher - abstract base class for the rule sets used for
+     * various URI schemes.
+     */
+    static abstract class URIRuleMatcher {
+        protected final int wellKnownPort;
+
+        protected URIRuleMatcher(int port) {
+            wellKnownPort = port;
+        }
+
+        /**
+         * Attempt to match the scheme, host and port between a filter
+         * rule URI and a URI coming from an AIA extension.
+         *
+         * @param filterRule the filter rule to match against
+         * @param caIssuer the AIA URI being compared
+         * @return true if the scheme, host and port numbers match, false if
+         * any of the components do not match. If a port number is omitted in
+         * either the filter rule or AIA URI, the well-known port for that
+         * scheme is used in the comparison.
+         */
+        boolean schemeHostPortCheck(URI filterRule, URI caIssuer) {
+            if (!filterRule.getScheme().equalsIgnoreCase(
+                    caIssuer.getScheme())) {
+                return false;
+            } else if (!filterRule.getHost().equalsIgnoreCase(
+                    caIssuer.getHost())) {
+                return false;
+            } else {
+                try {
+                    // Check for port matching, taking into consideration
+                    // default ports
+                    int fPort = (filterRule.getPort() == -1) ? wellKnownPort :
+                            filterRule.getPort();
+                    int caiPort = (caIssuer.getPort() == -1) ? wellKnownPort :
+                            caIssuer.getPort();
+                    if (fPort != caiPort) {
+                        return false;
+                    }
+                } catch (IllegalArgumentException iae) {
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        /**
+         * Attempt to match an AIA URI against a specific filter rule.  The
+         * specific rules to apply are implementation dependent.
+         *
+         * @param filterRule the filter rule to match against
+         * @param caIssuer the AIA URI being compared
+         * @return true if all matching rules pass, false if any fail.
+         */
+        abstract boolean matchRule(URI filterRule, URI caIssuer);
+    }
+
+    static class HttpFtpRuleMatcher extends URIRuleMatcher {
+        static final HttpFtpRuleMatcher HTTP = new HttpFtpRuleMatcher(80);
+        static final HttpFtpRuleMatcher HTTPS = new HttpFtpRuleMatcher(443);
+        static final HttpFtpRuleMatcher FTP = new HttpFtpRuleMatcher(21);
+
+        private HttpFtpRuleMatcher(int port) {
+            super(port);
+        }
+
+        @Override
+        boolean matchRule(URI filterRule, URI caIssuer) {
+            // Check for scheme/host/port matching
+            if (!schemeHostPortCheck(filterRule, caIssuer)) {
+                return false;
+            }
+
+            // Check the path component to make sure the filter is at
+            // least a root of the AIA caIssuer URI's path.  It must be
+            // a case-sensitive match for all platforms.
+            if (!isRootOf(filterRule, caIssuer)) {
+                if (debug != null) {
+                    debug.println("allowedAIALocations: Match failed: " +
+                            "AIA URI is not within the rule's path hierarchy.");
+                }
+                return false;
+            }
+            return true;
+        }
+
+        /**
+         * Performs a hierarchical containment check, ensuring that the
+         * base URI's path is a root component of the candidate path.  The
+         * path comparison is case-sensitive.  If the base path ends in a
+         * slash (/) then all candidate paths that begin with the base
+         * path are allowed.  If it does not end in a slash, then it is
+         * assumed that the leaf node in the base path is a file component
+         * and both paths must match exactly.
+         *
+         * @param base the URI that contains the root path
+         * @param candidate the URI that contains the path being evaluated
+         * @return true if {@code candidate} is a child path of {@code base},
+         *         false otherwise.
+         */
+        private static boolean isRootOf(URI base, URI candidate) {
+            // Note: The URIs have already been normalized at this point and
+            // HTTP URIs cannot have null paths.  If it's an empty path
+            // then consider the path to be "/".
+            String basePath = Optional.of(base.getPath()).
+                    filter(p -> !p.isEmpty()).orElse("/");
+            String candPath = Optional.of(candidate.getPath()).
+                    filter(p -> !p.isEmpty()).orElse("/");
+            return (basePath.endsWith("/")) ? candPath.startsWith(basePath) :
+                    candPath.equals(basePath);
+        }
+    }
+
+    static class LdapRuleMatcher extends URIRuleMatcher {
+        static final LdapRuleMatcher LDAP = new LdapRuleMatcher(389);
+        static final LdapRuleMatcher LDAPS = new LdapRuleMatcher(636);
+
+        private LdapRuleMatcher(int port) {
+            super(port);
+        }
+
+        @Override
+        boolean matchRule(URI filterRule, URI caIssuer) {
+            // Check for scheme/host/port matching
+            if (!schemeHostPortCheck(filterRule, caIssuer)) {
+                return false;
+            }
+
+            // Obtain the base DN component and compare
+            try {
+                X500Principal filterBaseDn = new X500Principal(
+                        filterRule.getPath().replaceFirst("^/+", ""));
+                X500Principal caIssBaseDn = new X500Principal(
+                        caIssuer.getPath().replaceFirst("^/+", ""));
+                if (!filterBaseDn.equals(caIssBaseDn)) {
+                    if (debug != null) {
+                        debug.println("allowedAIALocations: Match failed: " +
+                                "Base DN mismatch (" + filterBaseDn + " vs " +
+                                caIssBaseDn + ")");
+                    }
+                    return false;
+                }
+            } catch (IllegalArgumentException iae) {
+                if (debug != null) {
+                    debug.println("allowedAIALocations: Match failed on DN: " +
+                            iae);
+                }
+                return false;
+            }
+
+            return true;
+        }
+    }
 }
diff -Nru openjdk-25-25.0.1+8/src/java.base/share/classes/sun/security/ssl/DTLSInputRecord.java openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/ssl/DTLSInputRecord.java
--- openjdk-25-25.0.1+8/src/java.base/share/classes/sun/security/ssl/DTLSInputRecord.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/share/classes/sun/security/ssl/DTLSInputRecord.java	2025-12-18 08:04:02.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -801,8 +801,11 @@
 
             // buffer this fragment
             if (hsf.handshakeType == SSLHandshake.FINISHED.id) {
-                // Need no status update.
-                bufferedFragments.add(hsf);
+                // Make sure it's not a retransmitted message
+                if (hsf.recordEpoch > handshakeEpoch) {
+                    bufferedFragments.add(hsf);
+                    flightIsReady = holes.isEmpty();
+                }
             } else {
                 bufferFragment(hsf);
             }
diff -Nru openjdk-25-25.0.1+8/src/java.base/share/conf/security/java.security openjdk-25-25.0.2+10/src/java.base/share/conf/security/java.security
--- openjdk-25-25.0.1+8/src/java.base/share/conf/security/java.security	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/share/conf/security/java.security	2025-12-18 08:04:02.000000000 +0000
@@ -1574,3 +1574,48 @@
 # withEncryption method.
 #
 jdk.epkcs8.defaultAlgorithm=PBEWithHmacSHA256AndAES_128
+
+#
+# X.509 AuthorityInfoAccess caIssuer URI Filtering
+#
+# This property defines a whitespace-separated list of filters that
+# are applied to URIs found in the authorityInfoAccess extension in
+# X.509 certificates. Any caIssuers URIs in X.509 certificates are only
+# followed when the com.sun.security.enableAIAcaIssuers System property is
+# enabled and the filter allows the URI. By default this property imposes a
+# deny-all ruleset.  This property may be overridden by a System property
+# of the same name.
+#
+# The filters must take the form of absolute, hierarchical URIs as defined by
+# the java.net.URI class. Additionally, only the following protocols are
+# allowed as filters: http, https, ldap and ftp.
+# See RFC 5280, section 4.2.2.1 for details about the types of URIs allowed for
+# the extension and their specific requirements.
+# The filter matching rules are applied to each CA issuer URI as follows:
+# 1. The scheme must match (case-insensitive).
+# 2. A hostname or address must be specified in the filter URI.  It must match
+#    the host or address in the caIssuers URI (case-insensitive).  No name
+#    resolution is performed on hostnames to match IP addresses.
+# 3. The port number must match.  For filter and caIssuer URIs, when a port
+#    number is omitted, the well-known port for that scheme will be used in the
+#    comparison.
+# 4. For hierarchical filesystem schemes (e.g. http[s], ftp):
+#    a. The normalized path portion of the filter URI is matched in a
+#       case-sensitive manner.  If the final component of the path does not end
+#       in a slash (/), it is considered to be a file path component and must
+#       be an exact match of the caIssuer's URI file path component.  If the
+#       final filter component ends in a slash, then it must either match or be
+#       a prefix of the caIssuer's URI path component (e.g. a filter path of
+#       /ab/cd/ will match a caIssuer path of /ab/cd/, /ab/cd/ef and
+#       /ab/cd/ef/ghi).
+#    b. Query strings will be ignored in filter rules and caIssuer URIs.
+#    c. Fragments will be ignored in filter rules and caIssuer URIs.
+# 5. For ldap URIs:
+#    a. The base DN must be an exact match (case-insensitive).
+#    b. Any query string in the rule, if specified, is ignored.
+# 6. A single value "any" (case-insensitive) will create an allow-all rule.
+#
+# As an example, here is a valid filter policy consisting of two rules:
+#    com.sun.security.allowedAIALocations=http://some.company.com/cacert \
+#          ldap://ldap.company.com/dc=company,dc=com?caCertificate;binary
+com.sun.security.allowedAIALocations=
diff -Nru openjdk-25-25.0.1+8/src/java.base/unix/classes/sun/nio/ch/NativeThread.java openjdk-25-25.0.2+10/src/java.base/unix/classes/sun/nio/ch/NativeThread.java
--- openjdk-25-25.0.1+8/src/java.base/unix/classes/sun/nio/ch/NativeThread.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/unix/classes/sun/nio/ch/NativeThread.java	2025-12-18 08:04:02.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
@@ -78,6 +78,17 @@
         return (tid == VIRTUAL_THREAD_ID);
     }
 
+    /**
+     * Return true if the operating system supports pending signals. If a signal is sent
+     * to a thread but cannot be delivered immediately then it will be delivered when the
+     * thread is in the appropriate state.
+     */
+    static boolean supportPendingSignals() {
+        return supportPendingSignals0();
+    }
+
+    private static native boolean supportPendingSignals0();
+
     // Returns an opaque token representing the native thread underlying the
     // invoking Java thread.  On systems that do not require signalling, this
     // method always returns 0.
diff -Nru openjdk-25-25.0.1+8/src/java.base/unix/classes/sun/nio/ch/UnixDispatcher.java openjdk-25-25.0.2+10/src/java.base/unix/classes/sun/nio/ch/UnixDispatcher.java
--- openjdk-25-25.0.1+8/src/java.base/unix/classes/sun/nio/ch/UnixDispatcher.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/unix/classes/sun/nio/ch/UnixDispatcher.java	2025-12-18 08:04:02.000000000 +0000
@@ -29,21 +29,31 @@
 import java.io.IOException;
 
 abstract class UnixDispatcher extends NativeDispatcher {
+    private static final boolean SUPPORTS_PENDING_SIGNALS = NativeThread.supportPendingSignals();
 
     @Override
     void close(FileDescriptor fd) throws IOException {
         close0(fd);
     }
 
-    @Override
-    void implPreClose(FileDescriptor fd, long reader, long writer) throws IOException {
-        preClose0(fd);
+    private void signalThreads(long reader, long writer) {
         if (NativeThread.isNativeThread(reader))
             NativeThread.signal(reader);
         if (NativeThread.isNativeThread(writer))
             NativeThread.signal(writer);
     }
 
+    @Override
+    void implPreClose(FileDescriptor fd, long reader, long writer) throws IOException {
+        if (SUPPORTS_PENDING_SIGNALS) {
+            signalThreads(reader, writer);
+        }
+        preClose0(fd);
+        if (!SUPPORTS_PENDING_SIGNALS) {
+            signalThreads(reader, writer);
+        }
+    }
+
     private static native void close0(FileDescriptor fd) throws IOException;
 
     private static native void preClose0(FileDescriptor fd) throws IOException;
diff -Nru openjdk-25-25.0.1+8/src/java.base/unix/native/libjava/ProcessImpl_md.c openjdk-25-25.0.2+10/src/java.base/unix/native/libjava/ProcessImpl_md.c
--- openjdk-25-25.0.1+8/src/java.base/unix/native/libjava/ProcessImpl_md.c	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/unix/native/libjava/ProcessImpl_md.c	2025-12-18 08:04:02.000000000 +0000
@@ -732,7 +732,7 @@
         (fds[2] == -1 && pipe(err) < 0) ||
         (pipe(childenv) < 0) ||
         (pipe(fail) < 0)) {
-        throwInternalIOException(env, errno, "Bad file descriptor", c->mode);
+        throwInternalIOException(env, errno, "Bad file descriptor", mode);
         goto Catch;
     }
     c->fds[0] = fds[0];
diff -Nru openjdk-25-25.0.1+8/src/java.base/unix/native/libjava/childproc.c openjdk-25-25.0.2+10/src/java.base/unix/native/libjava/childproc.c
--- openjdk-25-25.0.1+8/src/java.base/unix/native/libjava/childproc.c	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/unix/native/libjava/childproc.c	2025-12-18 08:04:02.000000000 +0000
@@ -416,6 +416,11 @@
     if (fcntl(FAIL_FILENO, F_SETFD, FD_CLOEXEC) == -1)
         goto WhyCantJohnnyExec;
 
+    // Children should be started with default signal disposition for SIGPIPE
+    if (signal(SIGPIPE, SIG_DFL) == SIG_ERR) {
+        goto WhyCantJohnnyExec;
+    }
+
     JDK_execvpe(p->mode, p->argv[0], p->argv, p->envv);
 
  WhyCantJohnnyExec:
diff -Nru openjdk-25-25.0.1+8/src/java.base/unix/native/libjava/java_props_md.c openjdk-25-25.0.2+10/src/java.base/unix/native/libjava/java_props_md.c
--- openjdk-25-25.0.1+8/src/java.base/unix/native/libjava/java_props_md.c	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/unix/native/libjava/java_props_md.c	2025-12-18 08:04:02.000000000 +0000
@@ -239,6 +239,7 @@
         if (language != NULL && mapLookup(language_names, language, std_language) == 0) {
             *std_language = malloc(strlen(language)+1);
             if (*std_language == NULL) {
+                free(temp);
                 free(encoding_variant);
                 JNU_ThrowOutOfMemoryError(env, NULL);
                 return 0;
@@ -252,6 +253,7 @@
         if (mapLookup(country_names, country, std_country) == 0) {
             *std_country = malloc(strlen(country)+1);
             if (*std_country == NULL) {
+                free(temp);
                 free(encoding_variant);
                 JNU_ThrowOutOfMemoryError(env, NULL);
                 return 0;
diff -Nru openjdk-25-25.0.1+8/src/java.base/unix/native/libnio/ch/NativeThread.c openjdk-25-25.0.2+10/src/java.base/unix/native/libnio/ch/NativeThread.c
--- openjdk-25-25.0.1+8/src/java.base/unix/native/libnio/ch/NativeThread.c	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/unix/native/libnio/ch/NativeThread.c	2025-12-18 08:04:02.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2022, 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
@@ -88,3 +88,12 @@
 #endif
         JNU_ThrowIOExceptionWithLastError(env, "Thread signal failed");
 }
+
+JNIEXPORT jboolean JNICALL
+Java_sun_nio_ch_NativeThread_supportPendingSignals0(JNIEnv *env, jclass cl) {
+#if defined(_AIX)
+    return JNI_TRUE;
+#else
+    return JNI_FALSE;
+#endif
+}
diff -Nru openjdk-25-25.0.1+8/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c openjdk-25-25.0.2+10/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c
--- openjdk-25-25.0.1+8/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c	2025-12-18 08:04:02.000000000 +0000
@@ -343,22 +343,21 @@
 
     /* system calls that might not be available at run time */
 
-#if defined(_ALLBSD_SOURCE)
-    my_openat_func = (openat_func*) openat;
-    my_fstatat_func = (fstatat_func*) fstatat;
-#else
-    // Make sure we link to the 64-bit version of the functions
-    my_openat_func = (openat_func*) dlsym(RTLD_DEFAULT, "openat64");
-    my_fstatat_func = (fstatat_func*) dlsym(RTLD_DEFAULT, "fstatat64");
-#endif
     my_unlinkat_func = (unlinkat_func*) dlsym(RTLD_DEFAULT, "unlinkat");
     my_renameat_func = (renameat_func*) dlsym(RTLD_DEFAULT, "renameat");
 #if defined(_AIX)
     // Make sure we link to the 64-bit version of the function
+    my_openat_func = (openat_func*) dlsym(RTLD_DEFAULT, "open64at");
+    my_fstatat_func = (fstatat_func*) dlsym(RTLD_DEFAULT, "stat64at");
     my_fdopendir_func = (fdopendir_func*) dlsym(RTLD_DEFAULT, "fdopendir64");
 #elif defined(_ALLBSD_SOURCE)
+    my_openat_func = (openat_func*) openat;
+    my_fstatat_func = (fstatat_func*) fstatat;
     my_fdopendir_func = (fdopendir_func*) fdopendir;
 #else
+    // Make sure we link to the 64-bit version of the functions
+    my_openat_func = (openat_func*) dlsym(RTLD_DEFAULT, "openat64");
+    my_fstatat_func = (fstatat_func*) dlsym(RTLD_DEFAULT, "fstatat64");
     my_fdopendir_func = (fdopendir_func*) dlsym(RTLD_DEFAULT, "fdopendir");
 #endif
 
diff -Nru openjdk-25-25.0.1+8/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java openjdk-25-25.0.2+10/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java
--- openjdk-25-25.0.1+8/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.desktop/macosx/classes/com/apple/laf/AquaKeyBindings.java	2025-12-18 08:04:02.000000000 +0000
@@ -157,6 +157,9 @@
                         "shift alt KP_LEFT", null,
                         "shift alt RIGHT", null,
                         "shift alt KP_RIGHT", null,
+                        "alt BACK_SPACE", null,
+                        "ctrl W", null,
+                        "alt DELETE", null,
                 }));
     }
 
diff -Nru openjdk-25-25.0.1+8/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDesktopPeer.java openjdk-25-25.0.2+10/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDesktopPeer.java
--- openjdk-25-25.0.1+8/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDesktopPeer.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.desktop/macosx/classes/sun/lwawt/macosx/CDesktopPeer.java	2025-12-18 08:04:02.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -34,7 +34,10 @@
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.lang.annotation.Native;
 import java.net.URI;
+import java.nio.file.Files;
+import java.nio.file.Path;
 
 
 /**
@@ -44,6 +47,12 @@
  */
 public final class CDesktopPeer implements DesktopPeer {
 
+    @Native private static final int OPEN = 0;
+    @Native private static final int BROWSE = 1;
+    @Native private static final int EDIT = 2;
+    @Native private static final int PRINT = 3;
+    @Native private static final int MAIL = 4;
+
     @Override
     public boolean isSupported(Action action) {
         return true;
@@ -51,27 +60,27 @@
 
     @Override
     public void open(File file) throws IOException {
-        this.lsOpenFile(file, false);
+        this.lsOpenFile(file, OPEN);
     }
 
     @Override
     public void edit(File file) throws IOException {
-        this.lsOpenFile(file, false);
+        this.lsOpenFile(file, EDIT);
     }
 
     @Override
     public void print(File file) throws IOException {
-        this.lsOpenFile(file, true);
+        this.lsOpenFile(file, PRINT);
     }
 
     @Override
     public void mail(URI uri) throws IOException {
-        this.lsOpen(uri);
+        this.lsOpen(uri, MAIL);
     }
 
     @Override
     public void browse(URI uri) throws IOException {
-        this.lsOpen(uri);
+        this.lsOpen(uri, BROWSE);
     }
 
     @Override
@@ -162,24 +171,44 @@
         }
     }
 
-    private void lsOpen(URI uri) throws IOException {
-        int status = _lsOpenURI(uri.toString());
+    private void lsOpen(URI uri, int action) throws IOException {
+        int status = _lsOpenURI(uri.toString(), action);
 
         if (status != 0 /* noErr */) {
-            throw new IOException("Failed to mail or browse " + uri + ". Error code: " + status);
+            String actionString = (action == MAIL) ? "mail" : "browse";
+            throw new IOException("Failed to " + actionString + " " + uri
+                                  + ". Error code: " + status);
         }
     }
 
-    private void lsOpenFile(File file, boolean print) throws IOException {
-        int status = _lsOpenFile(file.getCanonicalPath(), print);
+    private void lsOpenFile(File file, int action) throws IOException {
+        int status = -1;
+        Path tmpFile = null;
+        String tmpTxtPath = null;
 
+        try {
+            if (action == EDIT) {
+                tmpFile = Files.createTempFile("TmpFile", ".txt");
+                tmpTxtPath = tmpFile.toAbsolutePath().toString();
+            }
+            status = _lsOpenFile(file.getCanonicalPath(), action, tmpTxtPath);
+        } catch (Exception e) {
+            throw new IOException("Failed to create tmp file: ", e);
+        } finally {
+            if (tmpFile != null) {
+                Files.deleteIfExists(tmpFile);
+            }
+        }
         if (status != 0 /* noErr */) {
-            throw new IOException("Failed to open, edit or print " + file + ". Error code: " + status);
+            String actionString = (action == OPEN) ? "open"
+                                                   : (action == EDIT) ? "edit" : "print";
+            throw new IOException("Failed to " + actionString + " " + file
+                                  + ". Error code: " + status);
         }
     }
 
-    private static native int _lsOpenURI(String uri);
+    private static native int _lsOpenURI(String uri, int action);
 
-    private static native int _lsOpenFile(String path, boolean print);
+    private static native int _lsOpenFile(String path, int action, String tmpTxtPath);
 
 }
diff -Nru openjdk-25-25.0.1+8/src/java.desktop/macosx/native/libawt_lwawt/awt/CDesktopPeer.m openjdk-25-25.0.2+10/src/java.desktop/macosx/native/libawt_lwawt/awt/CDesktopPeer.m
--- openjdk-25-25.0.1+8/src/java.desktop/macosx/native/libawt_lwawt/awt/CDesktopPeer.m	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.desktop/macosx/native/libawt_lwawt/awt/CDesktopPeer.m	2025-12-18 08:04:02.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -27,27 +27,60 @@
 #import "JNIUtilities.h"
 #import 
 #import 
+#import "sun_lwawt_macosx_CDesktopPeer.h"
 
 /*
  * Class:     sun_lwawt_macosx_CDesktopPeer
  * Method:    _lsOpenURI
- * Signature: (Ljava/lang/String;)I;
+ * Signature: (Ljava/lang/String;I)I
  */
 JNIEXPORT jint JNICALL Java_sun_lwawt_macosx_CDesktopPeer__1lsOpenURI
-(JNIEnv *env, jclass clz, jstring uri)
+(JNIEnv *env, jclass clz, jstring uri, jint action)
 {
-    OSStatus status = noErr;
+    __block OSStatus status = noErr;
 JNI_COCOA_ENTER(env);
 
-    // I would love to use NSWorkspace here, but it's not thread safe. Why? I don't know.
-    // So we use LaunchServices directly.
+    NSURL *urlToOpen = [NSURL URLWithString:JavaStringToNSString(env, uri)];
+    NSURL *appURI = nil;
 
-    NSURL *url = [NSURL URLWithString:JavaStringToNSString(env, uri)];
+    if (action == sun_lwawt_macosx_CDesktopPeer_BROWSE) {
+        // To get the defaultBrowser
+        NSURL *httpsURL = [NSURL URLWithString:@"https://"];
+        NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
+        appURI = [workspace URLForApplicationToOpenURL:httpsURL];
+    } else if (action == sun_lwawt_macosx_CDesktopPeer_MAIL) {
+        // To get the default mailer
+        NSURL *mailtoURL = [NSURL URLWithString:@"mailto://"];
+        NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
+        appURI = [workspace URLForApplicationToOpenURL:mailtoURL];
+    }
+
+    if (appURI == nil) {
+        return -1;
+    }
+
+    // Prepare NSOpenConfig object
+    NSArray *urls = @[urlToOpen];
+    NSWorkspaceOpenConfiguration *configuration = [NSWorkspaceOpenConfiguration configuration];
+    configuration.activates = YES; // To bring app to foreground
+    configuration.promptsUserIfNeeded = YES; // To allow macOS desktop prompts
+
+    // dispatch semaphores used to wait for the completion handler to update and return status
+    dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
+    dispatch_time_t timeout = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(NSEC_PER_SEC)); // 1 second timeout
+
+    // Asynchronous call to openURL
+    [[NSWorkspace sharedWorkspace] openURLs:urls
+                                    withApplicationAtURL:appURI
+                                    configuration:configuration
+                                    completionHandler:^(NSRunningApplication *app, NSError *error) {
+        if (error) {
+            status = (OSStatus) error.code;
+        }
+        dispatch_semaphore_signal(semaphore);
+    }];
 
-    LSLaunchFlags flags = kLSLaunchDefaults;
-
-    LSApplicationParameters params = {0, flags, NULL, NULL, NULL, NULL, NULL};
-    status = LSOpenURLsWithRole((CFArrayRef)[NSArray arrayWithObject:url], kLSRolesAll, NULL, ¶ms, NULL, 0);
+    dispatch_semaphore_wait(semaphore, timeout);
 
 JNI_COCOA_EXIT(env);
     return status;
@@ -56,32 +89,73 @@
 /*
  * Class:     sun_lwawt_macosx_CDesktopPeer
  * Method:    _lsOpenFile
- * Signature: (Ljava/lang/String;Z)I;
+ * Signature: (Ljava/lang/String;I;Ljava/lang/String;)I;
  */
 JNIEXPORT jint JNICALL Java_sun_lwawt_macosx_CDesktopPeer__1lsOpenFile
-(JNIEnv *env, jclass clz, jstring jpath, jboolean print)
+(JNIEnv *env, jclass clz, jstring jpath, jint action, jstring jtmpTxtPath)
 {
-    OSStatus status = noErr;
+    __block OSStatus status = noErr;
 JNI_COCOA_ENTER(env);
 
-    // I would love to use NSWorkspace here, but it's not thread safe. Why? I don't know.
-    // So we use LaunchServices directly.
-
     NSString *path  = NormalizedPathNSStringFromJavaString(env, jpath);
-
-    NSURL *url = [NSURL fileURLWithPath:(NSString *)path];
+    NSURL *urlToOpen = [NSURL fileURLWithPath:(NSString *)path];
 
     // This byzantine workaround is necessary, or else directories won't open in Finder
-    url = (NSURL *)CFURLCreateWithFileSystemPath(NULL, (CFStringRef)[url path], kCFURLPOSIXPathStyle, false);
+    urlToOpen = (NSURL *)CFURLCreateWithFileSystemPath(NULL, (CFStringRef)[urlToOpen path],
+                                                        kCFURLPOSIXPathStyle, false);
 
-    LSLaunchFlags flags = kLSLaunchDefaults;
-    if (print) flags |= kLSLaunchAndPrint;
+    NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
+    NSURL *appURI = [workspace URLForApplicationToOpenURL:urlToOpen];
+    NSURL *defaultTerminalApp = [workspace URLForApplicationToOpenURL:[NSURL URLWithString:@"file:///bin/sh"]];
+
+    // Prepare NSOpenConfig object
+    NSArray *urls = @[urlToOpen];
+    NSWorkspaceOpenConfiguration *configuration = [NSWorkspaceOpenConfiguration configuration];
+    configuration.activates = YES; // To bring app to foreground
+    configuration.promptsUserIfNeeded = YES;  // To allow macOS desktop prompts
+
+    // pre-checks for open/print/edit before calling openURLs API
+    if (action == sun_lwawt_macosx_CDesktopPeer_OPEN
+            || action == sun_lwawt_macosx_CDesktopPeer_PRINT) {
+        if (appURI == nil
+            || [[urlToOpen absoluteString] containsString:[appURI absoluteString]]
+            || [[defaultTerminalApp absoluteString] containsString:[appURI absoluteString]]) {
+            return -1;
+        }
+        // Additionally set forPrinting=TRUE for print
+        if (action == sun_lwawt_macosx_CDesktopPeer_PRINT) {
+            configuration.forPrinting = YES;
+        }
+    } else if (action == sun_lwawt_macosx_CDesktopPeer_EDIT) {
+        if (appURI == nil
+            || [[urlToOpen absoluteString] containsString:[appURI absoluteString]]) {
+            return -1;
+        }
+        // for EDIT: if (defaultApp = TerminalApp) then set appURI = DefaultTextEditor
+        if ([[defaultTerminalApp absoluteString] containsString:[appURI absoluteString]]) {
+            NSString *path  = NormalizedPathNSStringFromJavaString(env, jtmpTxtPath);
+            NSURL *tempFilePath = [NSURL fileURLWithPath:(NSString *)path];
+            appURI = [workspace URLForApplicationToOpenURL:tempFilePath];
+        }
+    }
+
+    // dispatch semaphores used to wait for the completion handler to update and return status
+    dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
+    dispatch_time_t timeout = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(NSEC_PER_SEC)); // 1 second timeout
+
+    // Asynchronous call - openURLs:withApplicationAtURL
+    [[NSWorkspace sharedWorkspace] openURLs:urls
+                                   withApplicationAtURL:appURI
+                                   configuration:configuration
+                                   completionHandler:^(NSRunningApplication *app, NSError *error) {
+        if (error) {
+            status = (OSStatus) error.code;
+        }
+        dispatch_semaphore_signal(semaphore);
+    }];
 
-    LSApplicationParameters params = {0, flags, NULL, NULL, NULL, NULL, NULL};
-    status = LSOpenURLsWithRole((CFArrayRef)[NSArray arrayWithObject:url], kLSRolesAll, NULL, ¶ms, NULL, 0);
-    [url release];
+    dispatch_semaphore_wait(semaphore, timeout);
 
 JNI_COCOA_EXIT(env);
     return status;
 }
-
diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java openjdk-25-25.0.2+10/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	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/java/swing/SwingUtilities3.java	2025-12-18 08:04:02.000000000 +0000
@@ -72,10 +72,6 @@
     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}.
       */
@@ -210,7 +206,10 @@
 
 
     public static void paintAccText(Graphics g, MenuItemLayoutHelper lh,
-                             MenuItemLayoutHelper.LayoutResult lr) {
+                             MenuItemLayoutHelper.LayoutResult lr,
+                             Color disabledForeground,
+                             Color acceleratorSelectionForeground,
+                             Color acceleratorForeground) {
         if (!lh.getAccText().isEmpty()) {
             ButtonModel model = lh.getMenuItem().getModel();
             g.setFont(lh.getAccFontMetrics().getFont());
@@ -249,18 +248,6 @@
         }
     }
 
-    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) {
diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java
--- openjdk-25-25.0.1+8/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java	2025-12-18 08:04:02.000000000 +0000
@@ -1120,6 +1120,9 @@
             if (showFileIcons) {
                 setIcon(getFileChooser().getIcon((File)value));
             }
+
+            putClientProperty("html.disable", getFileChooser().getClientProperty("html.disable"));
+
             return this;
         }
     }
@@ -1137,6 +1140,9 @@
             } else {
                 setText(getFileChooser().getName((File)value) + "/");
             }
+
+            putClientProperty("html.disable", getFileChooser().getClientProperty("html.disable"));
+
             return this;
         }
     }
diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java openjdk-25-25.0.2+10/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java
--- openjdk-25-25.0.1+8/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java	2025-12-18 08:04:02.000000000 +0000
@@ -41,6 +41,7 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InvalidObjectException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.ObjectStreamException;
@@ -1567,33 +1568,19 @@
     private void readObject(ObjectInputStream s)
             throws IOException, ClassNotFoundException {
         s.defaultReadObject();
-
-        String csName = (String) s.readObject();
-        byte[] data = (byte[]) s.readObject();
-
-        int cspace = 0;         // ColorSpace.CS_* constant if known
-        boolean isKnownPredefinedCS = false;
-        if (csName != null) {
-            isKnownPredefinedCS = true;
-            if (csName.equals("CS_sRGB")) {
-                cspace = ColorSpace.CS_sRGB;
-            } else if (csName.equals("CS_CIEXYZ")) {
-                cspace = ColorSpace.CS_CIEXYZ;
-            } else if (csName.equals("CS_PYCC")) {
-                cspace = ColorSpace.CS_PYCC;
-            } else if (csName.equals("CS_GRAY")) {
-                cspace = ColorSpace.CS_GRAY;
-            } else if (csName.equals("CS_LINEAR_RGB")) {
-                cspace = ColorSpace.CS_LINEAR_RGB;
-            } else {
-                isKnownPredefinedCS = false;
-            }
-        }
-
-        if (isKnownPredefinedCS) {
-            resolvedDeserializedProfile = getInstance(cspace);
-        } else {
-            resolvedDeserializedProfile = getInstance(data);
+        try {
+            String csName = (String) s.readObject();
+            byte[] data = (byte[]) s.readObject();
+            resolvedDeserializedProfile = switch (csName) {
+                case "CS_sRGB" -> getInstance(ColorSpace.CS_sRGB);
+                case "CS_CIEXYZ" -> getInstance(ColorSpace.CS_CIEXYZ);
+                case "CS_PYCC" -> getInstance(ColorSpace.CS_PYCC);
+                case "CS_GRAY" -> getInstance(ColorSpace.CS_GRAY);
+                case "CS_LINEAR_RGB" -> getInstance(ColorSpace.CS_LINEAR_RGB);
+                case null, default -> getInstance(data);
+            };
+        } catch (ClassCastException | IllegalArgumentException e) {
+            throw new InvalidObjectException("Invalid ICC Profile Data", e);
         }
     }
 
diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/classes/javax/swing/border/LineBorder.java openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/border/LineBorder.java
--- openjdk-25-25.0.1+8/src/java.desktop/share/classes/javax/swing/border/LineBorder.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/border/LineBorder.java	2025-12-18 08:04:02.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2023, 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
@@ -37,6 +37,8 @@
 
 import com.sun.java.swing.SwingUtilities3;
 
+import static sun.java2d.pipe.Region.clipRound;
+
 /**
  * A class which implements a line border of arbitrary thickness
  * and of a single color.
@@ -161,7 +163,7 @@
             Shape outer;
             Shape inner;
 
-            int offs = this.thickness * (int) scaleFactor;
+            int offs = clipRound(this.thickness * scaleFactor);
             int size = offs + offs;
             if (this.roundedCorners) {
                 float arc = .2f * offs;
diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java openjdk-25-25.0.2+10/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	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicMenuItemUI.java	2025-12-18 08:04:02.000000000 +0000
@@ -716,11 +716,10 @@
 
     private void paintAccText(Graphics g, MenuItemLayoutHelper lh,
                               MenuItemLayoutHelper.LayoutResult lr) {
-        SwingUtilities3.setDisabledForeground(disabledForeground);
-        SwingUtilities3.setAcceleratorSelectionForeground(
-                        acceleratorSelectionForeground);
-        SwingUtilities3.setAcceleratorForeground(acceleratorForeground);
-        SwingUtilities3.paintAccText(g, lh, lr);
+        SwingUtilities3.paintAccText(g, lh, lr,
+                                     disabledForeground,
+                                     acceleratorSelectionForeground,
+                                     acceleratorForeground);
     }
 
     private void paintText(Graphics g, MenuItemLayoutHelper lh,
diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java
--- openjdk-25-25.0.1+8/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java	2025-09-25 16:16:56.000000000 +0000
+++ openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicOptionPaneUI.java	2025-12-18 08:04:02.000000000 +0000
@@ -452,78 +452,54 @@
             } else if ((nl = s.indexOf('\n')) >= 0) {
                 nll = 1;
             }
-            if (s.contains("")) {
-                /* line break in html text is done by 
tag - * and not by /n so it's incorrect to address newline - * same as non-html text. - * Text between tags are extracted - * and rendered as JLabel text - */ - int index1 = s.indexOf(""); - int index2 = s.indexOf(""); - String str = ""; - if (index2 >= 0) { - str = s.substring(index2 + "".length()); - s = s.substring(index1, index2 + + "".length()); + if (nl >= 0) { + // break up newlines + if (nl == 0) { + JPanel breakPanel = new JPanel() { + public Dimension getPreferredSize() { + Font f = getFont(); + + if (f != null) { + return new Dimension(1, f.getSize() + 2); + } + return new Dimension(0, 0); + } + }; + breakPanel.setName("OptionPane.break"); + addMessageComponents(container, cons, breakPanel, maxll, + true); + } else { + addMessageComponents(container, cons, s.substring(0, nl), + maxll, false); + } + // Prevent recursion of more than + // 200 successive newlines in a message + // and indicate message is truncated via ellipsis + if (recursionCount++ > 200) { + recursionCount = 0; + addMessageComponents(container, cons, new String("..."), + maxll, false); + return; } - JLabel label; - label = new JLabel(s, JLabel.LEADING); + addMessageComponents(container, cons, s.substring(nl + nll), maxll, + false); + + } else if (len > maxll) { + Container c = Box.createVerticalBox(); + c.setName("OptionPane.verticalBox"); + burstStringInto(c, s, maxll); + addMessageComponents(container, cons, c, maxll, true); + + } else { + JLabel label = new JLabel(); if (Boolean.TRUE.equals( - this.optionPane.getClientProperty("html.disable"))) { + optionPane.getClientProperty("html.disable"))) { label.putClientProperty("html.disable", true); } + label.setText(s); label.setName("OptionPane.label"); configureMessageLabel(label); addMessageComponents(container, cons, label, maxll, true); - if (!str.isEmpty()) { - addMessageComponents(container, cons, str, maxll, false); - } - } else { - if (nl >= 0) { - // break up newlines - if (nl == 0) { - JPanel breakPanel = new JPanel() { - public Dimension getPreferredSize() { - Font f = getFont(); - - if (f != null) { - return new Dimension(1, f.getSize() + 2); - } - return new Dimension(0, 0); - } - }; - breakPanel.setName("OptionPane.break"); - addMessageComponents(container, cons, breakPanel, maxll, - true); - } else { - addMessageComponents(container, cons, s.substring(0, nl), - maxll, false); - } - // Prevent recursion of more than - // 200 successive newlines in a message - // and indicate message is truncated via ellipsis - if (recursionCount++ > 200) { - recursionCount = 0; - addMessageComponents(container, cons, new String("..."), - maxll, false); - return; - } - addMessageComponents(container, cons, s.substring(nl + nll), maxll, - false); - - } else if (len > maxll) { - Container c = Box.createVerticalBox(); - c.setName("OptionPane.verticalBox"); - burstStringInto(c, s, maxll); - addMessageComponents(container, cons, c, maxll, true); - - } else { - JLabel label; - label = new JLabel(s, JLabel.LEADING); - label.setName("OptionPane.label"); - configureMessageLabel(label); - addMessageComponents(container, cons, label, maxll, true); - } } } } diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPasswordFieldUI.java openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPasswordFieldUI.java --- openjdk-25-25.0.1+8/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPasswordFieldUI.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPasswordFieldUI.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2006, 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 @@ -91,23 +91,4 @@ public View create(Element elem) { return new PasswordView(elem); } - - /** - * Create the action map for Password Field. This map provides - * same actions for double mouse click and - * and for triple mouse click (see bug 4231444). - */ - - ActionMap createActionMap() { - ActionMap map = super.createActionMap(); - if (map.get(DefaultEditorKit.selectWordAction) != null) { - Action a = map.get(DefaultEditorKit.selectLineAction); - if (a != null) { - map.remove(DefaultEditorKit.selectWordAction); - map.put(DefaultEditorKit.selectWordAction, a); - } - } - return map; - } - } diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java --- openjdk-25-25.0.1+8/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTextUI.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2023, 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 @@ -647,6 +647,22 @@ TransferHandler.getCopyAction()); map.put(TransferHandler.getPasteAction().getValue(Action.NAME), TransferHandler.getPasteAction()); + + if (getComponent() instanceof JPasswordField) { + // Edit the action map for Password Field. This map provides + // same actions for double mouse click and + // and for triple mouse click (see bugs 4231444, 8354646). + + if (map.get(DefaultEditorKit.selectWordAction) != null) { + map.remove(DefaultEditorKit.selectWordAction); + + Action a = map.get(DefaultEditorKit.selectLineAction); + if (a != null) { + map.put(DefaultEditorKit.selectWordAction, a); + } + } + } + return map; } diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthPasswordFieldUI.java openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthPasswordFieldUI.java --- openjdk-25-25.0.1+8/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthPasswordFieldUI.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthPasswordFieldUI.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2013, 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 @@ -108,19 +108,4 @@ int y, int w, int h) { context.getPainter().paintPasswordFieldBorder(context, g, x, y, w, h); } - - /** - * {@inheritDoc} - */ - @Override - protected void installKeyboardActions() { - super.installKeyboardActions(); - ActionMap map = SwingUtilities.getUIActionMap(getComponent()); - if (map != null && map.get(DefaultEditorKit.selectWordAction) != null) { - Action a = map.get(DefaultEditorKit.selectLineAction); - if (a != null) { - map.put(DefaultEditorKit.selectWordAction, a); - } - } - } } diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/classes/sun/awt/image/XbmImageDecoder.java openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/awt/image/XbmImageDecoder.java --- openjdk-25-25.0.1+8/src/java.desktop/share/classes/sun/awt/image/XbmImageDecoder.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/awt/image/XbmImageDecoder.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 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,13 +23,22 @@ * questions. */ -/*- +/* * Reads xbitmap format images into a DIBitmap structure. */ package sun.awt.image; -import java.io.*; -import java.awt.image.*; +import java.awt.image.ImageConsumer; +import java.awt.image.IndexColorModel; +import java.io.BufferedInputStream; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static java.lang.Math.multiplyExact; /** * Parse files of the form: @@ -50,6 +59,8 @@ ImageConsumer.COMPLETESCANLINES | ImageConsumer.SINGLEPASS | ImageConsumer.SINGLEFRAME); + private static final int MAX_XBM_SIZE = 16384; + private static final int HEADER_SCAN_LIMIT = 100; public XbmImageDecoder(InputStreamImageSource src, InputStream is) { super(src, is); @@ -72,107 +83,125 @@ * produce an image from the stream. */ public void produceImage() throws IOException, ImageFormatException { - char[] nm = new char[80]; - int c; - int i = 0; - int state = 0; int H = 0; int W = 0; int x = 0; int y = 0; - boolean start = true; + int n = 0; + int state = 0; byte[] raster = null; IndexColorModel model = null; - while (!aborted && (c = input.read()) != -1) { - if ('a' <= c && c <= 'z' || - 'A' <= c && c <= 'Z' || - '0' <= c && c <= '9' || c == '#' || c == '_') { - if (i < 78) - nm[i++] = (char) c; - } else if (i > 0) { - int nc = i; - i = 0; - if (start) { - if (nc != 7 || - nm[0] != '#' || - nm[1] != 'd' || - nm[2] != 'e' || - nm[3] != 'f' || - nm[4] != 'i' || - nm[5] != 'n' || - nm[6] != 'e') - { - error("Not an XBM file"); + + String matchRegex = "(0[xX])?[0-9a-fA-F]+[\\s+]?[,|};]"; + String replaceRegex = "(0[xX])|,|[\\s+]|[};]"; + + String line; + int lineNum = 0; + + try (BufferedReader br = new BufferedReader(new InputStreamReader(input))) { + // loop to process XBM header - width, height and create raster + while (!aborted && (line = br.readLine()) != null + && lineNum <= HEADER_SCAN_LIMIT) { + lineNum++; + // process #define stmts + if (line.trim().startsWith("#define")) { + String[] token = line.split("\\s+"); + if (token.length != 3) { + error("Error while parsing define statement"); + } + try { + if (!token[2].isBlank() && state == 0) { + W = Integer.parseInt(token[2]); + state = 1; // after width is set + } else if (!token[2].isBlank() && state == 1) { + H = Integer.parseInt(token[2]); + state = 2; // after height is set + } + } catch (NumberFormatException nfe) { + // parseInt() can throw NFE + error("Error while parsing width or height."); } - start = false; } - if (nm[nc - 1] == 'h') - state = 1; /* expecting width */ - else if (nm[nc - 1] == 't' && nc > 1 && nm[nc - 2] == 'h') - state = 2; /* expecting height */ - else if (nc > 2 && state < 0 && nm[0] == '0' && nm[1] == 'x') { - int n = 0; - for (int p = 2; p < nc; p++) { - c = nm[p]; - if ('0' <= c && c <= '9') - c = c - '0'; - else if ('A' <= c && c <= 'Z') - c = c - 'A' + 10; - else if ('a' <= c && c <= 'z') - c = c - 'a' + 10; - else - c = 0; - n = n * 16 + c; + + if (state == 2) { + if (W <= 0 || H <= 0) { + error("Invalid values for width or height."); } - for (int mask = 1; mask <= 0x80; mask <<= 1) { - if (x < W) { - if ((n & mask) != 0) - raster[x] = 1; - else - raster[x] = 0; - } - x++; + if (multiplyExact(W, H) > MAX_XBM_SIZE) { + error("Large XBM file size." + + " Maximum allowed size: " + MAX_XBM_SIZE); } - if (x >= W) { - if (setPixels(0, y, W, 1, model, raster, 0, W) <= 0) { - return; - } - x = 0; - if (y++ >= H) { - break; + model = new IndexColorModel(8, 2, XbmColormap, + 0, false, 0); + setDimensions(W, H); + setColorModel(model); + setHints(XbmHints); + headerComplete(); + raster = new byte[W]; + state = 3; + break; + } + } + + if (state != 3) { + error("Width or Height of XBM file not defined"); + } + + // loop to process image data + while (!aborted && (line = br.readLine()) != null) { + lineNum++; + + if (line.contains("[]")) { + Matcher matcher = Pattern.compile(matchRegex).matcher(line); + while (matcher.find()) { + if (y >= H) { + error("Scan size of XBM file exceeds" + + " the defined width x height"); } - } - } else { - int n = 0; - for (int p = 0; p < nc; p++) - if ('0' <= (c = nm[p]) && c <= '9') - n = n * 10 + c - '0'; - else { - n = -1; - break; - } - if (n > 0 && state > 0) { - if (state == 1) - W = n; - else - H = n; - if (W == 0 || H == 0) - state = 0; - else { - model = new IndexColorModel(8, 2, XbmColormap, - 0, false, 0); - setDimensions(W, H); - setColorModel(model); - setHints(XbmHints); - headerComplete(); - raster = new byte[W]; - state = -1; + + int startIndex = matcher.start(); + int endIndex = matcher.end(); + String hexByte = line.substring(startIndex, endIndex); + + if (!(hexByte.startsWith("0x") + || hexByte.startsWith("0X"))) { + error("Invalid hexadecimal number at Ln#:" + lineNum + + " Col#:" + (startIndex + 1)); + } + hexByte = hexByte.replaceAll(replaceRegex, ""); + if (hexByte.length() != 2) { + error("Invalid hexadecimal number at Ln#:" + lineNum + + " Col#:" + (startIndex + 1)); + } + + try { + n = Integer.parseInt(hexByte, 16); + } catch (NumberFormatException nfe) { + error("Error parsing hexadecimal at Ln#:" + lineNum + + " Col#:" + (startIndex + 1)); + } + for (int mask = 1; mask <= 0x80; mask <<= 1) { + if (x < W) { + if ((n & mask) != 0) + raster[x] = 1; + else + raster[x] = 0; + } + x++; + } + + if (x >= W) { + int result = setPixels(0, y, W, 1, model, raster, 0, W); + if (result <= 0) { + error("Unexpected error occurred during setPixel()"); + } + x = 0; + y++; } } } } + imageComplete(ImageConsumer.STATICIMAGEDONE, true); } - input.close(); - imageComplete(ImageConsumer.STATICIMAGEDONE, true); } } diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java --- openjdk-25-25.0.1+8/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java 2025-12-18 08:04:02.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 @@ -1898,14 +1898,16 @@ protected void validateCompClip() { int origClipState = clipState; - if (usrClip == null) { + final Shape clip = usrClip; + + if (clip == null) { clipState = CLIP_DEVICE; clipRegion = devClip; - } else if (usrClip instanceof Rectangle2D) { + } else if (clip instanceof Rectangle2D rect2d) { clipState = CLIP_RECTANGULAR; - clipRegion = devClip.getIntersection((Rectangle2D) usrClip); + clipRegion = devClip.getIntersection(rect2d); } else { - PathIterator cpi = usrClip.getPathIterator(null); + PathIterator cpi = clip.getPathIterator(null); int[] box = new int[4]; ShapeSpanIterator sr = LoopPipe.getFillSSI(this); try { diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java --- openjdk-25-25.0.1+8/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 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 @@ -125,7 +125,9 @@ static LCMSImageLayout createImageLayout(BufferedImage image) { LCMSImageLayout l = new LCMSImageLayout(); - switch (image.getType()) { + Raster raster = image.getRaster(); + int type = image.getType(); + switch (type) { case BufferedImage.TYPE_INT_RGB, BufferedImage.TYPE_INT_ARGB: l.pixelType = PT_ARGB_8 ^ SWAP_ENDIAN; break; @@ -164,7 +166,7 @@ return null; } } - return createImageLayout(image.getRaster(), cm); + return createImageLayout(raster, cm); } return null; } @@ -172,11 +174,13 @@ l.width = image.getWidth(); l.height = image.getHeight(); - switch (image.getType()) { + switch (type) { case BufferedImage.TYPE_INT_RGB, BufferedImage.TYPE_INT_ARGB, BufferedImage.TYPE_INT_ARGB_PRE, BufferedImage.TYPE_INT_BGR -> { - var intRaster = (IntegerComponentRaster) image.getRaster(); + if (!(raster instanceof IntegerComponentRaster intRaster)) { + return null; + } l.nextRowOffset = safeMult(4, intRaster.getScanlineStride()); l.nextPixelOffset = safeMult(4, intRaster.getPixelStride()); l.offset = safeMult(4, intRaster.getDataOffset(0)); @@ -188,7 +192,9 @@ BufferedImage.TYPE_4BYTE_ABGR, BufferedImage.TYPE_4BYTE_ABGR_PRE -> { - var byteRaster = (ByteComponentRaster) image.getRaster(); + if (!(raster instanceof ByteComponentRaster byteRaster)) { + return null; + } l.nextRowOffset = byteRaster.getScanlineStride(); l.nextPixelOffset = byteRaster.getPixelStride(); int firstBand = byteRaster.getSampleModel().getNumBands() - 1; @@ -198,7 +204,9 @@ l.dataType = DT_BYTE; } case BufferedImage.TYPE_USHORT_GRAY -> { - var shortRaster = (ShortComponentRaster) image.getRaster(); + if (!(raster instanceof ShortComponentRaster shortRaster)) { + return null; + } l.nextRowOffset = safeMult(2, shortRaster.getScanlineStride()); l.nextPixelOffset = safeMult(2, shortRaster.getPixelStride()); l.offset = safeMult(2, shortRaster.getDataOffset(0)); diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/classes/sun/java2d/pipe/SpanClipRenderer.java openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/java2d/pipe/SpanClipRenderer.java --- openjdk-25-25.0.1+8/src/java.desktop/share/classes/sun/java2d/pipe/SpanClipRenderer.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/classes/sun/java2d/pipe/SpanClipRenderer.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2021, 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 @@ -27,6 +27,8 @@ import java.awt.Rectangle; import java.awt.Shape; + +import sun.java2d.InvalidPipeException; import sun.java2d.SunGraphics2D; /** @@ -67,7 +69,9 @@ public Object startSequence(SunGraphics2D sg, Shape s, Rectangle devR, int[] abox) { RegionIterator ri = sg.clipRegion.getIterator(); - + if (ri.region.isRectangular()) { + throw new InvalidPipeException("Invalid clip data"); + } return new SCRcontext(ri, outpipe.startSequence(sg, s, devR, abox)); } diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/native/common/java2d/opengl/OGLContext.c openjdk-25-25.0.2+10/src/java.desktop/share/native/common/java2d/opengl/OGLContext.c --- openjdk-25-25.0.1+8/src/java.desktop/share/native/common/java2d/opengl/OGLContext.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/native/common/java2d/opengl/OGLContext.c 2025-12-18 08:04:02.000000000 +0000 @@ -484,6 +484,7 @@ if (oglc->xformMatrix == NULL) { size_t arrsize = 16 * sizeof(GLdouble); oglc->xformMatrix = (GLdouble *)malloc(arrsize); + RETURN_IF_NULL(oglc->xformMatrix); memset(oglc->xformMatrix, 0, arrsize); oglc->xformMatrix[10] = 1.0; oglc->xformMatrix[15] = 1.0; diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConvMxN_Fp.c openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConvMxN_Fp.c --- openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConvMxN_Fp.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConvMxN_Fp.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, 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 @@ -76,6 +76,7 @@ #include "mlib_ImageCheck.h" #include "mlib_SysMath.h" #include "mlib_ImageConv.h" +#include "safe_math.h" /***************************************************************/ static void mlib_ImageConvMxNMulAdd_F32(mlib_f32 *dst, @@ -272,6 +273,9 @@ mlib_s32 nch = mlib_ImageGetChannels(dst); mlib_s32 i, j, j1, k; + if (!SAFE_TO_MULT(3, wid_e) || !SAFE_TO_ADD(3 * wid_e, m)) { + return MLIB_FAILURE; + } if (3 * wid_e + m > 1024) { dsa = mlib_malloc((3 * wid_e + m) * sizeof(mlib_d64)); @@ -629,6 +633,9 @@ mlib_s32 nch = mlib_ImageGetChannels(dst); mlib_s32 i, j, j1, k; + if (!SAFE_TO_MULT(3, wid_e) || !SAFE_TO_ADD(3 * wid_e, m)) { + return MLIB_FAILURE; + } if (3 * wid_e + m > 1024) { dsa = mlib_malloc((3 * wid_e + m) * sizeof(mlib_d64)); diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConvMxN_ext.c openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConvMxN_ext.c --- openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConvMxN_ext.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConvMxN_ext.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, 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 @@ -82,6 +82,7 @@ #include "mlib_image.h" #include "mlib_ImageConv.h" +#include "safe_math.h" /***************************************************************/ static void mlib_ImageConvMxNMulAdd_S32(mlib_d64 *dst, @@ -229,6 +230,9 @@ /* internal buffer */ + if (!SAFE_TO_MULT(3, wid_e) || !SAFE_TO_ADD(3 * wid_e, m)) { + return MLIB_FAILURE; + } if (3 * wid_e + m > 1024) { dsa = mlib_malloc((3 * wid_e + m) * sizeof(mlib_d64)); diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_16ext.c openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_16ext.c --- openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_16ext.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_16ext.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, 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 @@ -33,6 +33,7 @@ #include "mlib_image.h" #include "mlib_ImageConv.h" #include "mlib_c_ImageConv.h" +#include "safe_math.h" /* * This define switches between functions of different data types @@ -260,8 +261,14 @@ if (max_hsize > hgt) max_hsize = hgt; shgt = hgt + (n - 1); + if (!SAFE_TO_ADD(max_hsize, (n - 1))) { + return MLIB_FAILURE; + } smax_hsize = max_hsize + (n - 1); + if (!SAFE_TO_ADD(smax_hsize, 1) || !SAFE_TO_MULT(2, (smax_hsize + 1))) { + return MLIB_FAILURE; + } bsize = 2 * (smax_hsize + 1); if (bsize > BUFF_SIZE) { @@ -509,8 +516,16 @@ FREE_AND_RETURN_STATUS; } + if (!SAFE_TO_ADD(wid, (m - 1))) { + status = MLIB_FAILURE; + FREE_AND_RETURN_STATUS; + } swid = wid + (m - 1); + if (!SAFE_TO_MULT((n + 3), swid)) { + status = MLIB_FAILURE; + FREE_AND_RETURN_STATUS; + } bsize = (n + 3)*swid; if ((bsize > BUFF_SIZE) || (n > MAX_N)) { @@ -919,8 +934,14 @@ chan1 = nchannel; chan2 = chan1 + chan1; + if (!SAFE_TO_ADD(wid, (m - 1))) { + return MLIB_FAILURE; + } swid = wid + (m - 1); + if (!SAFE_TO_MULT((n + 2), swid)) { + return MLIB_FAILURE; + } bsize = (n + 2)*swid; if ((bsize > BUFF_SIZE) || (n > MAX_N)) { diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_16nw.c openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_16nw.c --- openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_16nw.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_16nw.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2020, 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 @@ -32,6 +32,7 @@ #include "mlib_image.h" #include "mlib_c_ImageConv.h" +#include "safe_math.h" /* This define switches between functions of different data types @@ -466,6 +467,10 @@ FREE_AND_RETURN_STATUS; } + if (!SAFE_TO_MULT((n + 3), wid)) { + status = MLIB_FAILURE; + FREE_AND_RETURN_STATUS; + } bsize = (n + 3)*wid; if ((bsize > BUFF_SIZE) || (n > MAX_N)) { diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_32nw.c openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_32nw.c --- openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_32nw.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_32nw.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2020, 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 @@ -33,6 +33,7 @@ #include "mlib_image.h" #include "mlib_ImageConv.h" +#include "safe_math.h" /***************************************************************/ #define CACHE_SIZE (64*1024) @@ -335,6 +336,10 @@ FREE_AND_RETURN_STATUS; } + if (!SAFE_TO_MULT((n + 2), wid)) { + status = MLIB_FAILURE; + FREE_AND_RETURN_STATUS; + } bsize = (n + 2)*wid; if ((bsize > BUFF_SIZE) || (n > MAX_N)) { diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_8ext.c openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_8ext.c --- openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_8ext.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_8ext.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, 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 @@ -33,6 +33,7 @@ #include "mlib_image.h" #include "mlib_ImageConv.h" #include "mlib_c_ImageConv.h" +#include "safe_math.h" /* * This define switches between functions of different data types @@ -245,8 +246,14 @@ if (max_hsize > hgt) max_hsize = hgt; shgt = hgt + (n - 1); + if (!SAFE_TO_ADD(max_hsize, (n - 1))) { + return MLIB_FAILURE; + } smax_hsize = max_hsize + (n - 1); + if (!SAFE_TO_ADD(smax_hsize, 1) || !SAFE_TO_MULT(2, (smax_hsize + 1))) { + return MLIB_FAILURE; + } bsize = 2 * (smax_hsize + 1); if (bsize > BUFF_SIZE) { @@ -494,8 +501,16 @@ FREE_AND_RETURN_STATUS; } + if (!SAFE_TO_ADD(wid, (m - 1))) { + status = MLIB_FAILURE; + FREE_AND_RETURN_STATUS; + } swid = wid + (m - 1); + if (!SAFE_TO_MULT((n + 3), swid)) { + status = MLIB_FAILURE; + FREE_AND_RETURN_STATUS; + } bsize = (n + 3)*swid; if ((bsize > BUFF_SIZE) || (n > MAX_N)) { @@ -904,8 +919,14 @@ chan1 = nchannel; chan2 = chan1 + chan1; + if (!SAFE_TO_ADD(wid, (m - 1))) { + return MLIB_FAILURE; + } swid = wid + (m - 1); + if (!SAFE_TO_MULT((n + 2), swid)) { + return MLIB_FAILURE; + } bsize = (n + 2)*swid; if ((bsize > BUFF_SIZE) || (n > MAX_N)) { diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_8nw.c openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_8nw.c --- openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_8nw.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_8nw.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, 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 @@ -33,6 +33,7 @@ #include "mlib_image.h" #include "mlib_ImageConv.h" #include "mlib_c_ImageConv.h" +#include "safe_math.h" /* This define switches between functions of different data types @@ -467,6 +468,10 @@ FREE_AND_RETURN_STATUS; } + if (!SAFE_TO_MULT((n + 3), wid)) { + status = MLIB_FAILURE; + FREE_AND_RETURN_STATUS; + } bsize = (n + 3)*wid; if ((bsize > BUFF_SIZE) || (n > MAX_N)) { diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_u16ext.c openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_u16ext.c --- openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_u16ext.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_u16ext.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, 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 @@ -33,6 +33,7 @@ #include "mlib_image.h" #include "mlib_ImageConv.h" #include "mlib_c_ImageConv.h" +#include "safe_math.h" /* * This define switches between functions of different data types @@ -270,8 +271,14 @@ if (max_hsize > hgt) max_hsize = hgt; shgt = hgt + (n - 1); + if (!SAFE_TO_ADD(max_hsize, (n - 1))) { + return MLIB_FAILURE; + } smax_hsize = max_hsize + (n - 1); + if (!SAFE_TO_ADD(smax_hsize, 1) || !SAFE_TO_MULT(2, (smax_hsize + 1))) { + return MLIB_FAILURE; + } bsize = 2 * (smax_hsize + 1); if (bsize > BUFF_SIZE) { @@ -519,8 +526,16 @@ FREE_AND_RETURN_STATUS; } + if (!SAFE_TO_ADD(wid, (m - 1))) { + status = MLIB_FAILURE; + FREE_AND_RETURN_STATUS; + } swid = wid + (m - 1); + if (!SAFE_TO_MULT((n + 3), swid)) { + status = MLIB_FAILURE; + FREE_AND_RETURN_STATUS; + } bsize = (n + 3)*swid; if ((bsize > BUFF_SIZE) || (n > MAX_N)) { @@ -927,8 +942,14 @@ chan1 = nchannel; chan2 = chan1 + chan1; + if (!SAFE_TO_ADD(wid, (m - 1))) { + return MLIB_FAILURE; + } swid = wid + (m - 1); + if (!SAFE_TO_MULT((n + 2), swid)) { + return MLIB_FAILURE; + } bsize = (n + 2)*swid; if ((bsize > BUFF_SIZE) || (n > MAX_N)) { diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_u16nw.c openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_u16nw.c --- openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_u16nw.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageConv_u16nw.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, 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 @@ -32,6 +32,7 @@ #include "mlib_image.h" #include "mlib_c_ImageConv.h" +#include "safe_math.h" /* This define switches between functions of different data types @@ -466,6 +467,10 @@ FREE_AND_RETURN_STATUS; } + if (!SAFE_TO_MULT((n + 3), wid)) { + status = MLIB_FAILURE; + FREE_AND_RETURN_STATUS; + } bsize = (n + 3)*wid; if ((bsize > BUFF_SIZE) || (n > MAX_N)) { diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageLookUp_Bit.c openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageLookUp_Bit.c --- openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageLookUp_Bit.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageLookUp_Bit.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2020, 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 @@ -50,6 +50,7 @@ #include "mlib_image.h" #include "mlib_ImageLookUp.h" +#include "safe_math.h" /***************************************************************/ #define MAX_WIDTH 512 @@ -302,6 +303,9 @@ mlib_u8 *buff = (mlib_u8*)buff_lcl, *buffs; mlib_u32 val0, val1; + if (!SAFE_TO_MULT(xsize, 2)) { + return MLIB_FAILURE; + } size = xsize * 2; if (size > MAX_WIDTH) { @@ -440,6 +444,9 @@ mlib_u8 *buff = (mlib_u8*)buff_lcl, *buffs; mlib_u32 l0, h0, v0, l1, h1, v1, l2, h2, v2; + if (!SAFE_TO_MULT(3, xsize)) { + return MLIB_FAILURE; + } size = 3 * xsize; if (size > MAX_WIDTH) { @@ -583,6 +590,9 @@ mlib_u8 *buff = (mlib_u8*)buff_lcl, *buffs; mlib_u32 l, h; + if (!SAFE_TO_MULT(xsize, 4)) { + return MLIB_FAILURE; + } size = xsize * 4; if (size > MAX_WIDTH) { diff -Nru openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageScanPoly.c openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageScanPoly.c --- openjdk-25-25.0.1+8/src/java.desktop/share/native/libmlib_image/mlib_ImageScanPoly.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/share/native/libmlib_image/mlib_ImageScanPoly.c 2025-12-18 08:04:02.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 @@ -101,6 +101,11 @@ return MLIB_FAILURE; } + int intSize = sizeof(mlib_s32); + if (!SAFE_TO_MULT(dstHeight, intSize) || + !SAFE_TO_ADD(dstHeight * intSize, 7)) { + return MLIB_FAILURE; + } bsize0 = (dstHeight * sizeof(mlib_s32) + 7) & ~7; if (lineAddr == NULL) { @@ -109,6 +114,10 @@ param->buff_malloc = NULL; + if (!SAFE_TO_MULT(4, bsize0) || !SAFE_TO_ADD(4 * bsize0, bsize1)) { + return MLIB_FAILURE; + } + if ((4 * bsize0 + bsize1) > buff_size) { buff = param->buff_malloc = mlib_malloc(4 * bsize0 + bsize1); diff -Nru openjdk-25-25.0.1+8/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java openjdk-25-25.0.2+10/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java --- openjdk-25-25.0.1+8/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java 2025-12-18 08:04:02.000000000 +0000 @@ -333,7 +333,7 @@ private static native void enterFullScreenExclusive(long window); private static native void exitFullScreenExclusive(long window); - private static native boolean initXrandrExtension(); + private static native boolean initXrandrExtension(boolean useOldConfigDisplayMode); private static native DisplayMode getCurrentDisplayMode(int screen); private static native void enumDisplayModes(int screen, ArrayList modes); @@ -350,10 +350,11 @@ */ private static synchronized boolean isXrandrExtensionSupported() { if (xrandrExtSupported == null) { - xrandrExtSupported = - Boolean.valueOf(initXrandrExtension()); + boolean useOldConfigDisplayMode = + Boolean.getBoolean("awt.x11useOldConfigDisplayMode"); + xrandrExtSupported = initXrandrExtension(useOldConfigDisplayMode); } - return xrandrExtSupported.booleanValue(); + return xrandrExtSupported; } @Override diff -Nru openjdk-25-25.0.1+8/src/java.desktop/unix/classes/sun/print/PrintServiceLookupProvider.java openjdk-25-25.0.2+10/src/java.desktop/unix/classes/sun/print/PrintServiceLookupProvider.java --- openjdk-25-25.0.1+8/src/java.desktop/unix/classes/sun/print/PrintServiceLookupProvider.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/unix/classes/sun/print/PrintServiceLookupProvider.java 2025-12-18 08:04:02.000000000 +0000 @@ -876,12 +876,16 @@ FileReader reader = new FileReader(f); bufferedReader = new BufferedReader(reader); String line; + results = new ArrayList<>(); while ((line = bufferedReader.readLine()) != null) { results.add(line); } } - } finally { + } catch (Exception e) { + // Print exception for tracking printer command errors + IPPPrintService.debug_println("Printer command error: " + e); + } finally { f.delete(); // promptly close all streams. if (bufferedReader != null) { diff -Nru openjdk-25-25.0.1+8/src/java.desktop/unix/native/common/awt/awt_GraphicsEnv.h openjdk-25-25.0.2+10/src/java.desktop/unix/native/common/awt/awt_GraphicsEnv.h --- openjdk-25-25.0.1+8/src/java.desktop/unix/native/common/awt/awt_GraphicsEnv.h 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/unix/native/common/awt/awt_GraphicsEnv.h 2025-12-18 08:04:02.000000000 +0000 @@ -62,4 +62,11 @@ jfieldID bitsPerPixel; }; +#define MAX_DISPLAY_MODES 256 +typedef struct { + unsigned int width; + unsigned int height; + jint refresh; +} DisplayMode; + #endif /* _AWT_GRAPHICSENV_H_ */ diff -Nru openjdk-25-25.0.1+8/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c openjdk-25-25.0.2+10/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c --- openjdk-25-25.0.1+8/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c 2025-12-18 08:04:02.000000000 +0000 @@ -55,6 +55,7 @@ #include "gdefs.h" #include #include "Trace.h" +#include int awt_numScreens; /* Xinerama-aware number of screens */ @@ -76,6 +77,8 @@ jmethodID awtNotifyAllMID = NULL; jboolean awtLockInited = JNI_FALSE; +static Bool useNewConfigDisplayMode = True; + /** Convenience macro for loading the lock-related method IDs. */ #define GET_STATIC_METHOD(klass, method_id, method_name, method_sig) \ do { \ @@ -1505,6 +1508,20 @@ typedef void (*XRRFreeCrtcInfoType)(XRRCrtcInfo *crtcInfo); +typedef void (*XRRSetScreenSizeType)(Display *dpy, Window window, + int width, int height, + int mmWidth, int mmHeight); + +typedef Status (*XRRSetCrtcConfigType)(Display *dpy, + XRRScreenResources *resources, + RRCrtc crtc, + Time timestamp, + int x, int y, + RRMode mode, + Rotation rotation, + RROutput *outputs, + int noutputs); + static XRRQueryVersionType awt_XRRQueryVersion; static XRRGetScreenInfoType awt_XRRGetScreenInfo; static XRRFreeScreenConfigInfoType awt_XRRFreeScreenConfigInfo; @@ -1520,6 +1537,8 @@ static XRRFreeOutputInfoType awt_XRRFreeOutputInfo; static XRRGetCrtcInfoType awt_XRRGetCrtcInfo; static XRRFreeCrtcInfoType awt_XRRFreeCrtcInfo; +static XRRSetScreenSizeType awt_XRRSetScreenSize; +static XRRSetCrtcConfigType awt_XRRSetCrtcConfig; #define LOAD_XRANDR_FUNC(f) \ do { \ @@ -1597,6 +1616,8 @@ LOAD_XRANDR_FUNC(XRRFreeOutputInfo); LOAD_XRANDR_FUNC(XRRGetCrtcInfo); LOAD_XRANDR_FUNC(XRRFreeCrtcInfo); + LOAD_XRANDR_FUNC(XRRSetScreenSize); + LOAD_XRANDR_FUNC(XRRSetCrtcConfig); return JNI_TRUE; } @@ -1697,11 +1718,11 @@ /* * Class: sun_awt_X11GraphicsDevice * Method: initXrandrExtension - * Signature: ()Z + * Signature: (Z)Z */ JNIEXPORT jboolean JNICALL Java_sun_awt_X11GraphicsDevice_initXrandrExtension - (JNIEnv *env, jclass x11gd) + (JNIEnv *env, jclass x11gd, jboolean useOldConfigDisplayMode) { #if defined(NO_XRANDR) return JNI_FALSE; @@ -1717,10 +1738,305 @@ } AWT_FLUSH_UNLOCK(); + useNewConfigDisplayMode = !useOldConfigDisplayMode; + return ret; #endif /* NO_XRANDR */ } +// --------------------------------------------------- +// display mode change via XRRSetCrtcConfig +// --------------------------------------------------- +#if !defined(NO_XRANDR) +static jint refreshRateFromModeInfo(const XRRModeInfo *modeInfo) { + if (!modeInfo->hTotal || !modeInfo->vTotal) { + return 0; + } + + double vTotal = modeInfo->vTotal; + + if (modeInfo->modeFlags & RR_Interlace) { + vTotal /= 2; + } + + if (modeInfo->modeFlags & RR_DoubleScan) { + vTotal *= 2; + } + + return (jint) round((double) modeInfo->dotClock / (vTotal * (double) modeInfo->hTotal)); +} + +static inline Bool isLandscapeOrientation(XRRCrtcInfo* info) { + if (!info) { + return True; + } + return info->rotation == RR_Rotate_0 || info->rotation == RR_Rotate_180; +} + +static Bool xrrGetInfoForScreen(XRRScreenResources *res, + int screen, + XRRCrtcInfo **outCrtcInfo, + XRROutputInfo **outOutputInfo) { + if (!res) { + return False; + } + + int screenX = 0; + int screenY = 0; + + if (usingXinerama) { + int nscreens = 0; + XineramaScreenInfo *screens = XineramaQueryScreens(awt_display, &nscreens); + + if (!screens) { + return False; + } + + if (screen >= nscreens) { + XFree(screens); + return False; + } + + XineramaScreenInfo xScreenInfo = screens[screen]; + + screenX = xScreenInfo.x_org; + screenY= xScreenInfo.y_org; + + XFree(screens); + } + + for (int i = 0; i < res->noutput; ++i) { + XRROutputInfo *output = awt_XRRGetOutputInfo(awt_display, res, res->outputs[i]); + if (!output) { + continue; + } + if (output->connection == RR_Connected && output->crtc) { + // output is connected and has an active mode + XRRCrtcInfo *crtcInfo = awt_XRRGetCrtcInfo(awt_display, res, output->crtc); + if (crtcInfo) { + if (crtcInfo->mode != None + && crtcInfo->x == screenX + && crtcInfo->y == screenY) { + if (outCrtcInfo) { + *outCrtcInfo = crtcInfo; + } else { + awt_XRRFreeCrtcInfo(crtcInfo); + } + if (outOutputInfo) { + *outOutputInfo = output; + } else { + awt_XRRFreeOutputInfo(output); + } + return True; + } + awt_XRRFreeCrtcInfo(crtcInfo); + } + } + awt_XRRFreeOutputInfo(output); + } + + return False; +} + +static jobject xrrGetCurrentDisplayMode(JNIEnv* env, int screen) { + XRRScreenResources *res = awt_XRRGetScreenResources(awt_display, DefaultRootWindow(awt_display)); + if (!res) { + return NULL; + } + + XRRCrtcInfo* currentCrtcInfo = NULL; + if (!xrrGetInfoForScreen(res, screen, ¤tCrtcInfo, NULL)) { + goto cleanup; + } + + if (!currentCrtcInfo || currentCrtcInfo->mode == None) { + goto cleanup; + } + + for (int i = 0; i < res->nmode; ++i) { + if (res->modes[i].id == currentCrtcInfo->mode) { + XRRModeInfo mode = res->modes[i]; + DisplayMode dm = { + mode.width, + mode.height, + refreshRateFromModeInfo(&mode) + }; + + Bool isLandscape = isLandscapeOrientation(currentCrtcInfo); + + jint resultWidth = isLandscape ? (jint) dm.width : (jint) dm.height; + jint resultHeight = isLandscape ? (jint) dm.height : (jint) dm.width; + + jobject displayMode = X11GD_CreateDisplayMode(env, + resultWidth, + resultHeight, + BIT_DEPTH_MULTI, + dm.refresh); + + awt_XRRFreeCrtcInfo(currentCrtcInfo); + awt_XRRFreeScreenResources(res); + + return displayMode; + } + } + + cleanup: + if (currentCrtcInfo) { + awt_XRRFreeCrtcInfo(currentCrtcInfo); + } + awt_XRRFreeScreenResources(res); + return NULL; +} + +static Bool isUniqueDisplayMode(DisplayMode seen[], int count, unsigned int width, unsigned int height, int refresh) { + for (int i = 0; i < count; ++i) { + if (seen[i].width == width && + seen[i].height == height && + seen[i].refresh == refresh) { + return False; + } + } + return True; +} + +static void xrrEnumDisplayModes(JNIEnv *env, jobject arrayList, jint screen) { + XRRScreenResources *res = awt_XRRGetScreenResources(awt_display, DefaultRootWindow(awt_display)); + if (!res) { + return; + } + + XRRCrtcInfo *crtcInfo = NULL; + XRROutputInfo *outputInfo = NULL; + if (!xrrGetInfoForScreen(res, screen, &crtcInfo, &outputInfo)) { + goto cleanup; + } + + DisplayMode seenModes[MAX_DISPLAY_MODES]; + int seenCount = 0; + + Bool isLandscape = isLandscapeOrientation(crtcInfo); + + for (int i = 0; i < outputInfo->nmode; ++i) { + RRMode mode_id = outputInfo->modes[i]; + + for (int j = 0; j < res->nmode; ++j) { + if (res->modes[j].id == mode_id) { + XRRModeInfo mode = res->modes[j]; + jint rr = refreshRateFromModeInfo(&mode); + + // The refresh rate is stored as an integer in Java, so we need to round the double value. + // Because of this rounding, duplicate modes may appear. We only keep the first one encountered. + if (isUniqueDisplayMode(seenModes, seenCount, mode.width, mode.height, rr)) { + seenModes[seenCount++] = (DisplayMode) { + mode.width, + mode.height, + rr + }; + X11GD_AddDisplayMode(env, arrayList, + isLandscape ? (jint) mode.width : (jint) mode.height, + isLandscape ? (jint) mode.height : (jint) mode.width, + BIT_DEPTH_MULTI, + rr); + if ((*env)->ExceptionCheck(env)) { + goto cleanup; + } + } + break; + } + } + } + + cleanup: + if (outputInfo) { + awt_XRRFreeOutputInfo(outputInfo); + } + if (crtcInfo) { + awt_XRRFreeCrtcInfo(crtcInfo); + } + awt_XRRFreeScreenResources(res); +} + +static void xrrChangeDisplayMode(jint screen, jint width, jint height, jint refreshRate) { + Drawable root = DefaultRootWindow(awt_display); + + + XRRScreenResources *res = awt_XRRGetScreenResources(awt_display, root); + if (!res) { + return; + } + + XRRCrtcInfo *crtcInfo = NULL; + XRROutputInfo *outputInfo = NULL; + + if (!xrrGetInfoForScreen(res, screen, &crtcInfo, &outputInfo)) { + goto cleanup; + } + + RRMode new_mode = None; + + Bool isLandscape = isLandscapeOrientation(crtcInfo); + + for (int i = 0; i < res->nmode; ++i) { + XRRModeInfo mode = res->modes[i]; + jint rr = refreshRateFromModeInfo(&mode); + + Bool matchW = (isLandscape ? mode.width : mode.height) == (unsigned int) width; + Bool matchH = (isLandscape ? mode.height : mode.width) == (unsigned int) height; + + if (matchW && matchH && rr == refreshRate) { + for (int j = 0; j < outputInfo->nmode; ++j) { + if (mode.id == outputInfo->modes[j]) { + // belongs to our output + new_mode = mode.id; + break; + } + } + if (new_mode != None) { + break; + } + } + } + + if (new_mode == None) { + goto cleanup; + } + + awt_XRRSetCrtcConfig (awt_display, res, outputInfo->crtc, CurrentTime, + 0, 0, None, RR_Rotate_0, NULL, 0); + + int resultMmWidth = outputInfo->mm_width + ? (int) outputInfo->mm_width + : DisplayWidthMM(awt_display, DefaultScreen(awt_display)); + + int resultMmHeight = outputInfo->mm_height + ? (int) outputInfo->mm_height + : XDisplayHeightMM(awt_display, DefaultScreen(awt_display)); + + awt_XRRSetScreenSize(awt_display, root, + width, height, + resultMmWidth, resultMmHeight); + + Status s = awt_XRRSetCrtcConfig(awt_display, res, outputInfo->crtc, + CurrentTime, + crtcInfo->x, crtcInfo->y, + new_mode, crtcInfo->rotation, + crtcInfo->outputs, crtcInfo->noutput); + + cleanup: + if (crtcInfo) { + awt_XRRFreeCrtcInfo(crtcInfo); + } + if (outputInfo) { + awt_XRRFreeOutputInfo(outputInfo); + } + awt_XRRFreeScreenResources(res); +} +#endif + +// --------------------------------------------------- +// display mode change via XRRSetCrtcConfig +// --------------------------------------------------- + /* * Class: sun_awt_X11GraphicsDevice * Method: getCurrentDisplayMode @@ -1733,9 +2049,17 @@ #if defined(NO_XRANDR) return NULL; #else - XRRScreenConfiguration *config; jobject displayMode = NULL; + if (useNewConfigDisplayMode) { + AWT_LOCK(); + displayMode = xrrGetCurrentDisplayMode(env, screen); + AWT_FLUSH_UNLOCK(); + return displayMode; + } + + XRRScreenConfiguration *config; + AWT_LOCK(); if (screen < ScreenCount(awt_display)) { @@ -1786,7 +2110,12 @@ { #if !defined(NO_XRANDR) - AWT_LOCK(); + if (useNewConfigDisplayMode) { + AWT_LOCK(); + xrrEnumDisplayModes(env, arrayList, screen); + AWT_FLUSH_UNLOCK(); + return; + } if (XScreenCount(awt_display) > 0) { @@ -1836,6 +2165,15 @@ jint screen, jint width, jint height, jint refreshRate) { #if !defined(NO_XRANDR) + if (useNewConfigDisplayMode) { + AWT_LOCK(); + XGrabServer(awt_display); + xrrChangeDisplayMode(screen, width, height, refreshRate); + XUngrabServer(awt_display); + AWT_FLUSH_UNLOCK(); + return; + } + jboolean success = JNI_FALSE; XRRScreenConfiguration *config; Drawable root; diff -Nru openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxMenuItemUI.java openjdk-25-25.0.2+10/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 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsCheckBoxMenuItemUI.java 2025-12-18 08:04:02.000000000 +0000 @@ -84,7 +84,9 @@ int defaultTextIconGap) { if (WindowsMenuItemUI.isVistaPainting()) { WindowsMenuItemUI.paintMenuItem(accessor, g, c, checkIcon, - arrowIcon, background, foreground, defaultTextIconGap, + arrowIcon, background, foreground, + disabledForeground, acceleratorSelectionForeground, + acceleratorForeground, defaultTextIconGap, menuItem, getPropertyPrefix()); return; } diff -Nru openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java openjdk-25-25.0.2+10/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 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java 2025-12-18 08:04:02.000000000 +0000 @@ -914,8 +914,15 @@ } } if (icon != null) { - icon.paintIcon(c, g, x + VistaMenuItemCheckIconFactory.getIconWidth(), - y + OFFSET); + if (WindowsGraphicsUtils.isLeftToRight(c)) { + icon.paintIcon(c, g, + x + VistaMenuItemCheckIconFactory.getIconWidth(), + y + OFFSET); + } else { + icon.paintIcon(c, g, + x - VistaMenuItemCheckIconFactory.getIconWidth() + 2 * OFFSET, + y + OFFSET); + } } } private static WindowsMenuItemUIAccessor getAccessor( diff -Nru openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java openjdk-25-25.0.2+10/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 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuItemUI.java 2025-12-18 08:04:02.000000000 +0000 @@ -43,6 +43,7 @@ import javax.swing.JComponent; import javax.swing.JMenu; import javax.swing.JMenuItem; +import javax.swing.SwingConstants; import javax.swing.UIManager; import javax.swing.plaf.ComponentUI; import javax.swing.plaf.UIResource; @@ -67,9 +68,6 @@ * 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() { @@ -167,36 +165,6 @@ 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, @@ -204,7 +172,8 @@ if (WindowsMenuItemUI.isVistaPainting()) { WindowsMenuItemUI.paintMenuItem(accessor, g, c, checkIcon, arrowIcon, background, foreground, - defaultTextIconGap, menuItem, + disabledForeground, acceleratorSelectionForeground, + acceleratorForeground, defaultTextIconGap, menuItem, getPropertyPrefix()); return; } @@ -215,6 +184,9 @@ static void paintMenuItem(WindowsMenuItemUIAccessor accessor, Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, + Color disabledForeground, + Color acceleratorSelectionForeground, + Color acceleratorForeground, int defaultTextIconGap, JMenuItem menuItem, String prefix) { // Save original graphics font and color Font holdf = g.getFont(); @@ -224,7 +196,7 @@ g.setFont(mi.getFont()); Rectangle viewRect = new Rectangle(0, 0, mi.getWidth(), mi.getHeight()); - applyInsets(viewRect, mi.getInsets()); + SwingUtilities3.applyInsets(viewRect, mi.getInsets()); String acceleratorDelimiter = UIManager.getString("MenuItem.acceleratorDelimiter"); @@ -242,13 +214,22 @@ MenuItemLayoutHelper.LayoutResult lr = lh.layoutMenuItem(); paintBackground(accessor, g, mi, background); - paintCheckIcon(g, lh, lr, holdc, foreground); - paintIcon(g, lh, lr, holdc); + SwingUtilities3.paintCheckIcon(g, lh, lr, holdc, foreground); + SwingUtilities3.paintIcon(g, lh, lr, holdc); if (lh.getCheckIcon() != null && lh.useCheckAndArrow()) { Rectangle rect = lr.getTextRect(); - - rect.x += lh.getAfterCheckIconGap(); + if (menuItem.getComponentOrientation().isLeftToRight()) { + if (menuItem.getHorizontalTextPosition() != SwingConstants.LEADING + && menuItem.getHorizontalTextPosition() != SwingConstants.LEFT) { + rect.x += lh.getAfterCheckIconGap(); + } + } else { + if (menuItem.getHorizontalTextPosition() != SwingConstants.LEADING + && menuItem.getHorizontalTextPosition() != SwingConstants.RIGHT) { + rect.x -= lh.getAfterCheckIconGap(); + } + } lr.setTextRect(rect); } @@ -264,11 +245,17 @@ } if (lh.getCheckIcon() != null && lh.useCheckAndArrow()) { Rectangle rect = lr.getAccRect(); - rect.x += lh.getAfterCheckIconGap(); + if (menuItem.getComponentOrientation().isLeftToRight()) { + rect.x += lh.getAfterCheckIconGap(); + } else { + rect.x -= lh.getAfterCheckIconGap(); + } lr.setAccRect(rect); } - paintAccText(g, lh, lr); - paintArrowIcon(g, lh, lr, foreground); + SwingUtilities3.paintAccText(g, lh, lr, disabledForeground, + acceleratorSelectionForeground, + acceleratorForeground); + SwingUtilities3.paintArrowIcon(g, lh, lr, foreground); // Restore original graphics font and color g.setColor(holdc); diff -Nru openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuUI.java openjdk-25-25.0.2+10/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 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsMenuUI.java 2025-12-18 08:04:02.000000000 +0000 @@ -140,7 +140,8 @@ if (WindowsMenuItemUI.isVistaPainting()) { WindowsMenuItemUI.paintMenuItem(accessor, g, c, checkIcon, arrowIcon, background, foreground, - defaultTextIconGap, menuItem, + disabledForeground, acceleratorSelectionForeground, + acceleratorForeground, defaultTextIconGap, menuItem, getPropertyPrefix()); return; } diff -Nru openjdk-25-25.0.1+8/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsRadioButtonMenuItemUI.java openjdk-25-25.0.2+10/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 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/windows/classes/com/sun/java/swing/plaf/windows/WindowsRadioButtonMenuItemUI.java 2025-12-18 08:04:02.000000000 +0000 @@ -84,7 +84,9 @@ int defaultTextIconGap) { if (WindowsMenuItemUI.isVistaPainting()) { WindowsMenuItemUI.paintMenuItem(accessor, g, c, checkIcon, - arrowIcon, background, foreground, defaultTextIconGap, + arrowIcon, background, foreground, + disabledForeground, acceleratorSelectionForeground, + acceleratorForeground, defaultTextIconGap, menuItem, getPropertyPrefix()); return; } diff -Nru openjdk-25-25.0.1+8/src/java.desktop/windows/classes/sun/awt/windows/WDesktopPeer.java openjdk-25-25.0.2+10/src/java.desktop/windows/classes/sun/awt/windows/WDesktopPeer.java --- openjdk-25-25.0.1+8/src/java.desktop/windows/classes/sun/awt/windows/WDesktopPeer.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/windows/classes/sun/awt/windows/WDesktopPeer.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,6 +38,9 @@ import java.io.IOException; import java.net.URI; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import javax.swing.event.EventListenerList; import sun.awt.shell.ShellFolder; @@ -50,9 +53,11 @@ */ final class WDesktopPeer implements DesktopPeer { /* Constants for the operation verbs */ - private static String ACTION_OPEN_VERB = "open"; - private static String ACTION_EDIT_VERB = "edit"; - private static String ACTION_PRINT_VERB = "print"; + private static final String ACTION_OPEN_VERB = "open"; + private static final String ACTION_EDIT_VERB = "edit"; + private static final String ACTION_PRINT_VERB = "print"; + private static final String ACTION_BROWSE_VERB = "browse"; + private static final String ACTION_MAIL_VERB = "mail"; private static native void init(); @@ -95,12 +100,12 @@ @Override public void mail(URI uri) throws IOException { - this.ShellExecute(uri, ACTION_OPEN_VERB); + this.ShellExecute(uri, ACTION_MAIL_VERB); } @Override public void browse(URI uri) throws IOException { - this.ShellExecute(uri, ACTION_OPEN_VERB); + this.launchUriInBrowser(uri); } private void ShellExecute(File file, String verb) throws IOException { @@ -121,6 +126,42 @@ } } + private void launchUriInBrowser(URI uri) throws IOException { + String defaultBrowser = getDefaultBrowser(); + if (defaultBrowser == null) { + throw new IOException("Failed to get default browser"); + } + + List cmdLineTokens = getCmdLineTokens(uri, defaultBrowser); + try { + ProcessBuilder pb = new ProcessBuilder(cmdLineTokens); + pb.start(); + } catch (Exception e) { + throw new IOException("Error launching Browser: ", e); + } + } + + private static List getCmdLineTokens(URI uri, String defaultBrowser) { + if (defaultBrowser.contains("%1")) { + defaultBrowser = defaultBrowser.replace("%1", uri.toString()); + } else { + defaultBrowser = defaultBrowser + " " + uri.toString(); + } + + List cmdLineTokens = new ArrayList<>(); + int firstIndex = defaultBrowser.indexOf("\""); + int secondIndex = defaultBrowser.indexOf("\"", firstIndex + 1); + + if (firstIndex == 0 && secondIndex != firstIndex) { + cmdLineTokens.add(defaultBrowser.substring(firstIndex, secondIndex + 1)); + defaultBrowser = defaultBrowser.substring(secondIndex + 1).trim(); + } + cmdLineTokens.addAll(Arrays.asList(defaultBrowser.split(" "))); + return cmdLineTokens; + } + + private static native String getDefaultBrowser(); + private static native String ShellExecute(String fileOrUri, String verb); private static final EventListenerList listenerList = new EventListenerList(); diff -Nru openjdk-25-25.0.1+8/src/java.desktop/windows/native/libawt/windows/awt_Desktop.cpp openjdk-25-25.0.2+10/src/java.desktop/windows/native/libawt/windows/awt_Desktop.cpp --- openjdk-25-25.0.1+8/src/java.desktop/windows/native/libawt/windows/awt_Desktop.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/windows/native/libawt/windows/awt_Desktop.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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,12 @@ #include #include #include "awt_Toolkit.h" +#include +#include // for AssocQueryStringW +#include +#include +#include +#include // for SaferiIsExecutableFileType #define BUFFER_LIMIT MAX_PATH+1 @@ -78,14 +84,23 @@ LPCWSTR fileOrUri_c = JNU_GetStringPlatformChars(env, fileOrUri_j, NULL); CHECK_NULL_RETURN(fileOrUri_c, NULL); LPCWSTR verb_c = JNU_GetStringPlatformChars(env, verb_j, NULL); + if (verb_c == NULL) { JNU_ReleaseStringPlatformChars(env, fileOrUri_j, fileOrUri_c); return NULL; } + if (wcscmp(verb_c, L"open") == 0) { + BOOL isExecutable = SaferiIsExecutableFileType(fileOrUri_c, FALSE); + if (isExecutable) { + return env->NewStringUTF("Unsupported URI content"); + } + } + // set action verb for mail() to open before calling ShellExecute + LPCWSTR actionVerb = wcscmp(verb_c, L"mail") == 0 ? L"open" : verb_c; // 6457572: ShellExecute possibly changes FPU control word - saving it here unsigned oldcontrol87 = _control87(0, 0); - HINSTANCE retval = ::ShellExecute(NULL, verb_c, fileOrUri_c, NULL, NULL, + HINSTANCE retval = ::ShellExecute(NULL, actionVerb, fileOrUri_c, NULL, NULL, SW_SHOWNORMAL); DWORD error = ::GetLastError(); _control87(oldcontrol87, 0xffffffff); @@ -113,11 +128,39 @@ return errmsg; } } - return NULL; } /* + * Class: sun_awt_windows_WDesktopPeer + * Method: getDefaultBrowser + * Signature: ()Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_sun_awt_windows_WDesktopPeer_getDefaultBrowser +(JNIEnv *env, jclass cls) +{ + LPCWSTR fileExtension = L"https"; + WCHAR defaultBrowser_c [MAX_PATH]; + DWORD cchBuffer = MAX_PATH; + + // Use AssocQueryString to get the default browser + HRESULT hr = AssocQueryStringW( + ASSOCF_NONE, // No special flags + ASSOCSTR_COMMAND, // Request the command string + fileExtension, // File extension + NULL, // pszExtra (optional) + defaultBrowser_c, // Output buffer - result + &cchBuffer // Size of the output buffer + ); + + if (FAILED(hr)) { + return NULL; + } + + return JNU_NewStringPlatform(env, defaultBrowser_c); +} + +/* * Class: sun_awt_windows_WDesktopPeer * Method: moveToTrash * Signature: (Ljava/lang/String;)Z diff -Nru openjdk-25-25.0.1+8/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp openjdk-25-25.0.2+10/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp --- openjdk-25-25.0.1+8/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.desktop/windows/native/libawt/windows/awt_Window.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -2498,32 +2498,22 @@ jobject self = (jobject)param; - // It's entirely possible that our native resources have been destroyed - // before our java peer - if we're dispose()d, for instance. - // Alert caller w/ IllegalComponentStateException. - if (self == NULL) { - JNU_ThrowByName(env, "java/awt/IllegalComponentStateException", - "Peer null in JNI"); - return 0; - } - PDATA pData = JNI_GET_PDATA(self); - if (pData == NULL) { - JNU_ThrowByName(env, "java/awt/IllegalComponentStateException", - "Native resources unavailable"); - env->DeleteGlobalRef(self); - return 0; - } + jint result = -1; + AwtWindow* window = NULL; - jint result = 0; - AwtWindow *w = (AwtWindow *)pData; - if (::IsWindow(w->GetHWnd())) + // Our native resources may have been destroyed before the Java peer, + // e.g., if dispose() was called. In that case, return the default screen. + PDATA pData; + JNI_CHECK_PEER_GOTO(self, ret); + window = (AwtWindow *)pData; + if (::IsWindow(window->GetHWnd())) { - result = (jint)w->GetScreenImOn(); + result = (jint)window->GetScreenImOn(); } + ret: env->DeleteGlobalRef(self); - - return result; + return (result != -1) ? result : AwtWin32GraphicsDevice::GetDefaultDeviceIndex(); } void AwtWindow::_SetFocusableWindow(void *param) diff -Nru openjdk-25-25.0.1+8/src/java.rmi/share/classes/javax/rmi/ssl/SslRMIClientSocketFactory.java openjdk-25-25.0.2+10/src/java.rmi/share/classes/javax/rmi/ssl/SslRMIClientSocketFactory.java --- openjdk-25-25.0.1+8/src/java.rmi/share/classes/javax/rmi/ssl/SslRMIClientSocketFactory.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/java.rmi/share/classes/javax/rmi/ssl/SslRMIClientSocketFactory.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2008, 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 @@ -31,6 +31,7 @@ import java.rmi.server.RMIClientSocketFactory; import java.util.StringTokenizer; import javax.net.SocketFactory; +import javax.net.ssl.SSLParameters; import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; @@ -119,6 +120,16 @@ // final SSLSocket sslSocket = (SSLSocket) sslSocketFactory.createSocket(host, port); + + if (Boolean.parseBoolean( + System.getProperty("jdk.rmi.ssl.client.enableEndpointIdentification", "true"))) { + SSLParameters params = sslSocket.getSSLParameters(); + if (params == null) { + params = new SSLParameters(); + } + params.setEndpointIdentificationAlgorithm("HTTPS"); + sslSocket.setSSLParameters(params); + } // Set the SSLSocket Enabled Cipher Suites // final String enabledCipherSuites = diff -Nru openjdk-25-25.0.1+8/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_convert.c openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_convert.c --- openjdk-25-25.0.1+8/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_convert.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_convert.c 2025-12-18 08:04:02.000000000 +0000 @@ -1461,8 +1461,7 @@ case CKA_OWNER: case CKA_AC_ISSUER: case CKA_ATTR_TYPES: - case CKA_ECDSA_PARAMS: - /* CKA_EC_PARAMS is the same, these two are equivalent */ + case CKA_EC_PARAMS: case CKA_EC_POINT: case CKA_PRIVATE_EXPONENT: case CKA_PRIME_1: diff -Nru openjdk-25-25.0.1+8/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_crypt.c openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_crypt.c --- openjdk-25-25.0.1+8/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_crypt.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_crypt.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 2002 Graz University of Technology. All rights reserved. @@ -184,9 +184,12 @@ if (directIn != 0) { inBufP = (CK_BYTE_PTR) jlong_to_ptr(directIn); - } else { + } else if (jIn != NULL) { inBufP = (*env)->GetPrimitiveArrayCritical(env, jIn, NULL); + // may happen if out of memory if (inBufP == NULL) { return 0; } + } else { + inBufP = NULL; } if (directOut != 0) { @@ -194,7 +197,7 @@ } else { outBufP = (*env)->GetPrimitiveArrayCritical(env, jOut, NULL); if (outBufP == NULL) { - if (directIn == 0) { + if (directIn == 0 && inBufP != NULL) { (*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT); } return 0; @@ -208,7 +211,7 @@ (CK_BYTE_PTR)(outBufP + jOutOfs), &ckEncryptedLen); - if (directIn == 0) { + if (directIn == 0 && inBufP != NULL) { (*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT); } if (directOut == 0) { @@ -251,9 +254,12 @@ if (directIn != 0) { inBufP = (CK_BYTE_PTR) jlong_to_ptr(directIn); - } else { + } else if (jIn != NULL) { inBufP = (*env)->GetPrimitiveArrayCritical(env, jIn, NULL); + // may happen if out of memory if (inBufP == NULL) { return 0; } + } else { + inBufP = NULL; } if (directOut != 0) { @@ -261,7 +267,7 @@ } else { outBufP = (*env)->GetPrimitiveArrayCritical(env, jOut, NULL); if (outBufP == NULL) { - if (directIn == 0) { + if (directIn == 0 && inBufP != NULL) { (*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT); } return 0; @@ -275,7 +281,7 @@ (CK_BYTE_PTR)(outBufP + jOutOfs), &ckEncryptedPartLen); - if (directIn == 0) { + if (directIn == 0 && inBufP != NULL) { (*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT); } if (directOut == 0) { @@ -462,9 +468,12 @@ if (directIn != 0) { inBufP = (CK_BYTE_PTR) jlong_to_ptr(directIn); - } else { + } else if (jIn != NULL) { inBufP = (*env)->GetPrimitiveArrayCritical(env, jIn, NULL); + // may happen if out of memory if (inBufP == NULL) { return 0; } + } else { + inBufP = NULL; } if (directOut != 0) { @@ -472,7 +481,7 @@ } else { outBufP = (*env)->GetPrimitiveArrayCritical(env, jOut, NULL); if (outBufP == NULL) { - if (directIn == 0) { + if (directIn == 0 && inBufP != NULL) { (*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT); } return 0; @@ -485,7 +494,7 @@ (CK_BYTE_PTR)(outBufP + jOutOfs), &ckOutLen); - if (directIn == 0) { + if (directIn == 0 && inBufP != NULL) { (*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT); } if (directOut == 0) { @@ -528,9 +537,12 @@ if (directIn != 0) { inBufP = (CK_BYTE_PTR) jlong_to_ptr(directIn); - } else { + } else if (jIn != NULL) { inBufP = (*env)->GetPrimitiveArrayCritical(env, jIn, NULL); + // may happen if out of memory if (inBufP == NULL) { return 0; } + } else { + inBufP = NULL; } if (directOut != 0) { @@ -538,7 +550,7 @@ } else { outBufP = (*env)->GetPrimitiveArrayCritical(env, jOut, NULL); if (outBufP == NULL) { - if (directIn == 0) { + if (directIn == 0 && inBufP != NULL) { (*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT); } return 0; @@ -551,7 +563,7 @@ (CK_BYTE_PTR)(outBufP + jOutOfs), &ckDecryptedPartLen); - if (directIn == 0) { + if (directIn == 0 && inBufP != NULL) { (*env)->ReleasePrimitiveArrayCritical(env, jIn, inBufP, JNI_ABORT); } if (directOut == 0) { diff -Nru openjdk-25-25.0.1+8/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_keymgmt.c openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_keymgmt.c --- openjdk-25-25.0.1+8/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_keymgmt.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_keymgmt.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. */ /* Copyright (c) 2002 Graz University of Technology. All rights reserved. @@ -56,69 +56,78 @@ #ifdef P11_ENABLE_GETNATIVEKEYINFO -#define CK_ATTRIBUTES_TEMPLATE_LENGTH (CK_ULONG)61U +#define CK_ATTRIBUTES_TEMPLATE_LENGTH (CK_ULONG)60U +// Group attributes based on their value types; put attributes whose values +// requiring address alignments, e.g. CK_ULONG, first static CK_ATTRIBUTE ckpAttributesTemplate[CK_ATTRIBUTES_TEMPLATE_LENGTH] = { - {CKA_CLASS, 0, 0}, - {CKA_TOKEN, 0, 0}, - {CKA_PRIVATE, 0, 0}, - {CKA_LABEL, 0, 0}, - {CKA_APPLICATION, 0, 0}, - {CKA_VALUE, 0, 0}, - {CKA_OBJECT_ID, 0, 0}, + // CK_ULONG {CKA_CERTIFICATE_TYPE, 0, 0}, - {CKA_ISSUER, 0, 0}, - {CKA_SERIAL_NUMBER, 0, 0}, - {CKA_AC_ISSUER, 0, 0}, - {CKA_OWNER, 0, 0}, - {CKA_ATTR_TYPES, 0, 0}, - {CKA_TRUSTED, 0, 0}, + {CKA_CLASS, 0, 0}, + {CKA_HW_FEATURE_TYPE, 0, 0}, + {CKA_KEY_GEN_MECHANISM, 0, 0}, {CKA_KEY_TYPE, 0, 0}, - {CKA_SUBJECT, 0, 0}, - {CKA_ID, 0, 0}, - {CKA_SENSITIVE, 0, 0}, - {CKA_ENCRYPT, 0, 0}, - {CKA_DECRYPT, 0, 0}, - {CKA_WRAP, 0, 0}, - {CKA_UNWRAP, 0, 0}, - {CKA_SIGN, 0, 0}, - {CKA_SIGN_RECOVER, 0, 0}, - {CKA_VERIFY, 0, 0}, - {CKA_VERIFY_RECOVER, 0, 0}, - {CKA_DERIVE, 0, 0}, - {CKA_START_DATE, 0, 0}, - {CKA_END_DATE, 0, 0}, - {CKA_MODULUS, 0, 0}, {CKA_MODULUS_BITS, 0, 0}, - {CKA_PUBLIC_EXPONENT, 0, 0}, - {CKA_PRIVATE_EXPONENT, 0, 0}, - {CKA_PRIME_1, 0, 0}, - {CKA_PRIME_2, 0, 0}, - {CKA_EXPONENT_1, 0, 0}, - {CKA_EXPONENT_2, 0, 0}, - {CKA_COEFFICIENT, 0, 0}, - {CKA_PRIME, 0, 0}, - {CKA_SUBPRIME, 0, 0}, - {CKA_BASE, 0, 0}, {CKA_PRIME_BITS, 0, 0}, {CKA_SUB_PRIME_BITS, 0, 0}, {CKA_VALUE_BITS, 0, 0}, {CKA_VALUE_LEN, 0, 0}, + // CK_BBOOL + {CKA_ALWAYS_SENSITIVE, 0, 0}, + {CKA_DECRYPT, 0, 0}, + {CKA_DERIVE, 0, 0}, + {CKA_ENCRYPT, 0, 0}, {CKA_EXTRACTABLE, 0, 0}, + {CKA_HAS_RESET, 0, 0}, {CKA_LOCAL, 0, 0}, - {CKA_NEVER_EXTRACTABLE, 0, 0}, - {CKA_ALWAYS_SENSITIVE, 0, 0}, - {CKA_KEY_GEN_MECHANISM, 0, 0}, {CKA_MODIFIABLE, 0, 0}, - {CKA_ECDSA_PARAMS, 0, 0}, + {CKA_NEVER_EXTRACTABLE, 0, 0}, + {CKA_PRIVATE, 0, 0}, + {CKA_RESET_ON_INIT, 0, 0}, + {CKA_SENSITIVE, 0, 0}, + {CKA_SIGN, 0, 0}, + {CKA_SIGN_RECOVER, 0, 0}, + {CKA_TOKEN, 0, 0}, + {CKA_TRUSTED, 0, 0}, + {CKA_UNWRAP, 0, 0}, + {CKA_VERIFY, 0, 0}, + {CKA_VERIFY_RECOVER, 0, 0}, + {CKA_WRAP, 0, 0}, + // PTR: byte[] + {CKA_AC_ISSUER, 0, 0}, + {CKA_ATTR_TYPES, 0, 0}, + {CKA_BASE, 0, 0}, + {CKA_COEFFICIENT, 0, 0}, {CKA_EC_PARAMS, 0, 0}, {CKA_EC_POINT, 0, 0}, + {CKA_EXPONENT_1, 0, 0}, + {CKA_EXPONENT_2, 0, 0}, + {CKA_ID, 0, 0}, + {CKA_ISSUER, 0, 0}, + {CKA_MODULUS, 0, 0}, + {CKA_OBJECT_ID, 0, 0}, + {CKA_OWNER, 0, 0}, + {CKA_PRIME, 0, 0}, + {CKA_PRIME_1, 0, 0}, + {CKA_PRIME_2, 0, 0}, + {CKA_PRIVATE_EXPONENT, 0, 0}, + {CKA_PUBLIC_EXPONENT, 0, 0}, + {CKA_SERIAL_NUMBER, 0, 0}, + {CKA_SUBJECT, 0, 0}, + {CKA_SUBPRIME, 0, 0}, + {CKA_VALUE, 0, 0}, + // PTR: CK_UTF8CHAR[] + {CKA_APPLICATION, 0, 0}, + {CKA_LABEL, 0, 0}, + // PTR: CK_DATE + {CKA_START_DATE, 0, 0}, + {CKA_END_DATE, 0, 0}, + // deprecated {CKA_SECONDARY_AUTH, 0, 0}, {CKA_AUTH_PIN_FLAGS, 0, 0}, - {CKA_HW_FEATURE_TYPE, 0, 0}, - {CKA_RESET_ON_INIT, 0, 0}, - {CKA_HAS_RESET, 0, 0}, + // misc {CKA_VENDOR_DEFINED, 0, 0}, + // keep this at the end to match the impl in getNativeKeyInfo(...) {CKA_NETSCAPE_DB, 0, 0}, }; diff -Nru openjdk-25-25.0.1+8/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c --- openjdk-25-25.0.1+8/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c 2025-12-18 08:04:02.000000000 +0000 @@ -481,6 +481,10 @@ // CK_GCM_PARAMS => CK_GCM_PARAMS_NO_IVBITS pParams = (CK_GCM_PARAMS*) mechPtr->pParameter; pParamsNoIvBits = calloc(1, sizeof(CK_GCM_PARAMS_NO_IVBITS)); + if (pParamsNoIvBits == NULL) { + p11ThrowOutOfMemoryError(env, 0); + return NULL; + } pParamsNoIvBits->pIv = pParams->pIv; pParamsNoIvBits->ulIvLen = pParams->ulIvLen; pParamsNoIvBits->pAAD = pParams->pAAD; @@ -495,6 +499,10 @@ // CK_GCM_PARAMS_NO_IVBITS => CK_GCM_PARAMS pParamsNoIvBits = (CK_GCM_PARAMS_NO_IVBITS*) mechPtr->pParameter; pParams = calloc(1, sizeof(CK_GCM_PARAMS)); + if (pParams == NULL) { + p11ThrowOutOfMemoryError(env, 0); + return NULL; + } pParams->pIv = pParamsNoIvBits->pIv; pParams->ulIvLen = pParamsNoIvBits->ulIvLen; pParams->ulIvBits = pParamsNoIvBits->ulIvLen << 3; @@ -1201,7 +1209,7 @@ jclass jBooleanArrayClass, jIntArrayClass, jLongArrayClass; jclass jStringClass; jclass jObjectClass, jClassClass; - CK_VOID_PTR ckpObject; + CK_VOID_PTR ckpObject = NULL; jmethodID jMethod; jobject jClassObject; jstring jClassNameString; diff -Nru openjdk-25-25.0.1+8/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java openjdk-25-25.0.2+10/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java --- openjdk-25-25.0.1+8/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.httpserver/share/classes/com/sun/net/httpserver/Headers.java 2025-12-18 08:04:02.000000000 +0000 @@ -36,6 +36,7 @@ import java.util.function.BiFunction; import java.util.stream.Collectors; import sun.net.httpserver.UnmodifiableHeaders; +import sun.net.httpserver.Utils; /** * HTTP request and response headers are represented by this class which @@ -176,8 +177,13 @@ @Override public List put(String key, List value) { + // checkHeader is called in this class to fail fast + // It also must be called in sendResponseHeaders because + // Headers instances internal state can be modified + // external to these methods. + Utils.checkHeader(key, false); for (String v : value) - checkValue(v); + Utils.checkHeader(v, true); return map.put(normalize(key), value); } @@ -189,7 +195,8 @@ * @param value the value to add to the header */ public void add(String key, String value) { - checkValue(value); + Utils.checkHeader(key, false); + Utils.checkHeader(value, true); String k = normalize(key); List l = map.get(k); if (l == null) { @@ -199,30 +206,6 @@ l.add(value); } - private static void checkValue(String value) { - int len = value.length(); - for (int i=0; i= len - 2) { - throw new IllegalArgumentException("Illegal CR found in header"); - } - char c1 = value.charAt(i+1); - char c2 = value.charAt(i+2); - if (c1 != '\n') { - throw new IllegalArgumentException("Illegal char found after CR in header"); - } - if (c2 != ' ' && c2 != '\t') { - throw new IllegalArgumentException("No whitespace found after CRLF in header"); - } - i+=2; - } else if (c == '\n') { - throw new IllegalArgumentException("Illegal LF found in header"); - } - } - } - /** * Sets the given {@code value} as the sole header value for the given * {@code key}. If the mapping does not already exist, then it is created. @@ -264,7 +247,7 @@ public void replaceAll(BiFunction, ? extends List> function) { var f = function.andThen(values -> { Objects.requireNonNull(values); - values.forEach(Headers::checkValue); + values.forEach(value -> Utils.checkHeader(value, true)); return values; }); Map.super.replaceAll(f); diff -Nru openjdk-25-25.0.1+8/src/jdk.httpserver/share/classes/sun/net/httpserver/ExchangeImpl.java openjdk-25-25.0.2+10/src/jdk.httpserver/share/classes/sun/net/httpserver/ExchangeImpl.java --- openjdk-25-25.0.1+8/src/jdk.httpserver/share/classes/sun/net/httpserver/ExchangeImpl.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.httpserver/share/classes/sun/net/httpserver/ExchangeImpl.java 2025-12-18 08:04:02.000000000 +0000 @@ -198,6 +198,8 @@ return uos_orig; } + private static final byte[] CRLF = new byte[] {0x0D, 0x0A}; + public void sendResponseHeaders (int rCode, long contentLen) throws IOException { @@ -206,10 +208,11 @@ throw new IOException ("headers already sent"); } this.rcode = rCode; - String statusLine = "HTTP/1.1 "+rCode+Code.msg(rCode)+"\r\n"; + String statusLine = "HTTP/1.1 "+rCode+Code.msg(rCode); ByteArrayOutputStream tmpout = new ByteArrayOutputStream(); PlaceholderOutputStream o = getPlaceholderResponseBody(); - tmpout.write (bytes(statusLine, 0), 0, statusLine.length()); + tmpout.write (bytes(statusLine, false, 0), 0, statusLine.length()); + tmpout.write (CRLF); boolean noContentToSend = false; // assume there is content boolean noContentLengthHeader = false; // must not send Content-length is set rspHdrs.set("Date", FORMATTER.format(Instant.now())); @@ -296,11 +299,11 @@ List values = entry.getValue(); for (String val : values) { int i = key.length(); - buf = bytes (key, 2); + buf = bytes (key, true, 2); buf[i++] = ':'; buf[i++] = ' '; os.write (buf, 0, i); - buf = bytes (val, 2); + buf = bytes (val, false, 2); i = val.length(); buf[i++] = '\r'; buf[i++] = '\n'; @@ -318,8 +321,14 @@ * Make sure that at least "extra" bytes are free at end * of rspbuf. Reallocate rspbuf if not big enough. * caller must check return value to see if rspbuf moved + * + * Header values are supposed to be limited to 7-bit ASCII + * but 8-bit has to be allowed (for ISO_8859_1). For efficiency + * we just down cast 16 bit Java chars to byte. We don't allow + * any character that can't be encoded in 8 bits. */ - private byte[] bytes (String s, int extra) { + private byte[] bytes (String s, boolean isKey, int extra) throws IOException { + Utils.checkHeader(s, !isKey); int slen = s.length(); if (slen+extra > rspbuf.length) { int diff = slen + extra - rspbuf.length; diff -Nru openjdk-25-25.0.1+8/src/jdk.httpserver/share/classes/sun/net/httpserver/Utils.java openjdk-25-25.0.2+10/src/jdk.httpserver/share/classes/sun/net/httpserver/Utils.java --- openjdk-25-25.0.1+8/src/jdk.httpserver/share/classes/sun/net/httpserver/Utils.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.httpserver/share/classes/sun/net/httpserver/Utils.java 2025-12-18 08:04:02.000000000 +0000 @@ -88,4 +88,37 @@ } return true; } + + /* Throw IAE if illegal character found. isValue is true if String is + * a value. Otherwise it is header name + */ + public static void checkHeader(String str, boolean isValue) { + int len = str.length(); + for (int i=0; i= len - 2) { + throw new IllegalArgumentException("Illegal CR found in header"); + } + char c1 = str.charAt(i+1); + char c2 = str.charAt(i+2); + if (c1 != '\n') { + throw new IllegalArgumentException("Illegal char found after CR in header"); + } + if (c2 != ' ' && c2 != '\t') { + throw new IllegalArgumentException("No whitespace found after CRLF in header"); + } + i+=2; + } else if (c == '\n') { + throw new IllegalArgumentException("Illegal LF found in header"); + } else if (c > 255) { + throw new IllegalArgumentException("Illegal character found in header"); + } + } + } + } diff -Nru openjdk-25-25.0.1+8/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java --- openjdk-25-25.0.1+8/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java 2025-12-18 08:04:02.000000000 +0000 @@ -186,7 +186,10 @@ // Can only do eager initialization of the JVMCI compiler // once the singleton instance is available. if (result.config.getFlag("EagerJVMCI", Boolean.class)) { - result.getCompiler(); + // EagerJVMCI only applies to JVMCI when used by the CompileBroker. + if (result.getCompilerToVM().isCompilerThread()) { + result.getCompiler(); + } } } // Ensures JVMCIRuntime::_HotSpotJVMCIRuntime_instance is diff -Nru openjdk-25-25.0.1+8/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java --- openjdk-25-25.0.1+8/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotMetaspaceConstantImpl.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -43,9 +43,6 @@ private HotSpotMetaspaceConstantImpl(MetaspaceObject metaspaceObject, boolean compressed) { this.metaspaceObject = metaspaceObject; this.compressed = compressed; - if (compressed && !canBeStoredInCompressibleMetaSpace()) { - throw new IllegalArgumentException("constant cannot be compressed: " + metaspaceObject); - } } @Override @@ -88,19 +85,7 @@ @Override public boolean isCompressible() { - if (compressed) { - return false; - } - return canBeStoredInCompressibleMetaSpace(); - } - - private boolean canBeStoredInCompressibleMetaSpace() { - if (metaspaceObject instanceof HotSpotResolvedJavaType t && !t.isArray()) { - // As of JDK-8338526, interface and abstract types are not stored - // in compressible metaspace. - return !t.isInterface() && !t.isAbstract(); - } - return true; + return !compressed; } @Override diff -Nru openjdk-25-25.0.1+8/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotVMConfig.java openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotVMConfig.java --- openjdk-25-25.0.1+8/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotVMConfig.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotVMConfig.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 diff -Nru openjdk-25-25.0.1+8/src/jdk.jartool/share/classes/sun/tools/jar/Main.java openjdk-25-25.0.2+10/src/jdk.jartool/share/classes/sun/tools/jar/Main.java --- openjdk-25-25.0.1+8/src/jdk.jartool/share/classes/sun/tools/jar/Main.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.jartool/share/classes/sun/tools/jar/Main.java 2025-12-18 08:04:02.000000000 +0000 @@ -420,7 +420,8 @@ if (fname != null) { file = new File(fname); } else { - file = createTemporaryFile("tmpJar", ".jar"); + tmpFile = createTemporaryFile("tmpJar", ".jar"); + file = tmpFile; try (InputStream in = new FileInputStream(FileDescriptor.in); OutputStream os = Files.newOutputStream(file.toPath())) { in.transferTo(os); diff -Nru openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/events/MethodTraceEvent.java openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/events/MethodTraceEvent.java --- openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/events/MethodTraceEvent.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/events/MethodTraceEvent.java 2025-12-18 08:04:02.000000000 +0000 @@ -49,7 +49,7 @@ return 0; } - public static boolean enabled() { + public static boolean shouldCommit(long duration) { // Generated by JFR return false; } diff -Nru openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataRepository.java openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataRepository.java --- openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataRepository.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataRepository.java 2025-12-18 08:04:02.000000000 +0000 @@ -291,7 +291,7 @@ } } - synchronized boolean isEnabled(String eventName) { + boolean isEnabled(String eventName) { return settingsManager.isEnabled(eventName); } diff -Nru openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/internal/SettingsManager.java openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/SettingsManager.java --- openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/internal/SettingsManager.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/internal/SettingsManager.java 2025-12-18 08:04:02.000000000 +0000 @@ -129,7 +129,7 @@ } } - private Map availableSettings = new LinkedHashMap<>(); + private volatile Map availableSettings = new LinkedHashMap<>(); void setSettings(List> activeSettings, boolean writeSettingEvents) { // store settings so they are available if a new event class is loaded @@ -194,7 +194,7 @@ String key = entry.getKey(); String value = entry.getValue(); int index = key.indexOf("#"); - if (index > 1 && index < key.length() - 2) { + if (index > 0 && index < key.length() - 1) { String eventName = key.substring(0, index); eventName = Utils.upgradeLegacyJDKEvent(eventName); InternalSetting s = internals.get(eventName); diff -Nru openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java --- openjdk-25-25.0.1+8/src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.jfr/share/classes/jdk/jfr/tracing/MethodTracer.java 2025-12-18 08:04:02.000000000 +0000 @@ -50,7 +50,7 @@ public static void traceObjectInit(long startTime, long methodId) { long endTime = JVM.counterTime(); long duration = endTime - startTime; - if (MethodTraceEvent.enabled() && JVM.getEventWriter() != null) { + if (MethodTraceEvent.shouldCommit(duration) && JVM.getEventWriter() != null) { MethodTraceEvent.commit(startTime, duration, methodId); } } @@ -66,7 +66,7 @@ public static void traceTimingObjectInit(long startTime, long methodId) { long endTime = JVM.counterTime(); long duration = endTime - startTime; - if (MethodTraceEvent.enabled() && JVM.getEventWriter() != null) { + if (MethodTraceEvent.shouldCommit(duration) && JVM.getEventWriter() != null) { MethodTraceEvent.commit(startTime, duration, methodId); } if (MethodTimingEvent.enabled()) { @@ -77,7 +77,7 @@ public static void trace(long startTime, long methodId) { long endTime = JVM.counterTime(); long duration = endTime - startTime; - if (MethodTraceEvent.enabled()) { + if (MethodTraceEvent.shouldCommit(duration)) { MethodTraceEvent.commit(startTime, duration, methodId); } } @@ -96,7 +96,7 @@ if (MethodTimingEvent.enabled()) { PlatformTracer.addTiming(methodId, duration); } - if (MethodTraceEvent.enabled()) { + if (MethodTraceEvent.shouldCommit(duration)) { MethodTraceEvent.commit(startTime, duration, methodId); } } diff -Nru openjdk-25-25.0.1+8/src/jdk.jfr/share/conf/jfr/default.jfc openjdk-25-25.0.2+10/src/jdk.jfr/share/conf/jfr/default.jfc --- openjdk-25-25.0.1+8/src/jdk.jfr/share/conf/jfr/default.jfc 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.jfr/share/conf/jfr/default.jfc 2025-12-18 08:04:02.000000000 +0000 @@ -33,12 +33,12 @@ - true + false 10 s - true + false 10 s @@ -762,7 +762,7 @@ - true + false endChunk diff -Nru openjdk-25-25.0.1+8/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/AppImageSigner.java openjdk-25-25.0.2+10/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/AppImageSigner.java --- openjdk-25-25.0.1+8/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/AppImageSigner.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/AppImageSigner.java 2025-12-18 08:04:02.000000000 +0000 @@ -229,7 +229,7 @@ final var codesignExecutableFile = Codesign.build(signingCfg::toCodesignArgs).quiet(true).create().asConsumer(); final var codesignFile = Codesign.build(signingCfgWithoutEntitlements::toCodesignArgs).quiet(true).create().asConsumer(); - final var codesignDir = Codesign.build(signingCfgWithoutEntitlements::toCodesignArgs).force(true).create().asConsumer(); + final var codesignDir = Codesign.build(signingCfg::toCodesignArgs).force(true).create().asConsumer(); return new Codesigners(codesignFile, codesignExecutableFile, codesignDir); } diff -Nru openjdk-25-25.0.1+8/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/SigningIdentityBuilder.java openjdk-25-25.0.2+10/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/SigningIdentityBuilder.java --- openjdk-25-25.0.1+8/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/SigningIdentityBuilder.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/SigningIdentityBuilder.java 2025-12-18 08:04:02.000000000 +0000 @@ -113,14 +113,16 @@ final var signingIdentityNames = certificateSelector.signingIdentities(); + // Look up for the exact match. var matchingCertificates = mappedCertficates.stream().filter(e -> { return signingIdentityNames.contains(e.getKey()); }).map(Map.Entry::getValue).toList(); if (matchingCertificates.isEmpty()) { + // No exact matches found, look up for substrings. matchingCertificates = mappedCertficates.stream().filter(e -> { return signingIdentityNames.stream().anyMatch(filter -> { - return filter.startsWith(e.getKey()); + return e.getKey().startsWith(filter); }); }).map(Map.Entry::getValue).toList(); } diff -Nru openjdk-25-25.0.1+8/src/jdk.jpackage/share/classes/jdk/jpackage/internal/FromParams.java openjdk-25-25.0.2+10/src/jdk.jpackage/share/classes/jdk/jpackage/internal/FromParams.java --- openjdk-25-25.0.1+8/src/jdk.jpackage/share/classes/jdk/jpackage/internal/FromParams.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.jpackage/share/classes/jdk/jpackage/internal/FromParams.java 2025-12-18 08:04:02.000000000 +0000 @@ -52,6 +52,7 @@ import java.io.IOException; import java.nio.file.Path; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -194,8 +195,14 @@ // mainParams), APP_NAME.fetchFrom(launcherParams))); launcherParams.put(DESCRIPTION.getID(), DESCRIPTION.fetchFrom(mainParams)); } - return AddLauncherArguments.merge(mainParams, launcherParams, ICON.getID(), ADD_LAUNCHERS - .getID(), FILE_ASSOCIATIONS.getID()); + + var excludes = new ArrayList(List.of(ICON.getID(), ADD_LAUNCHERS.getID())); + if (!NAME.findIn(mainParams).equals(NAME.findIn(launcherParams))) { + // This is the additional launcher. It shouldn't have FA. + excludes.add(FILE_ASSOCIATIONS.getID()); + } + + return AddLauncherArguments.merge(mainParams, launcherParams, excludes.toArray(String[]::new)); } static final BundlerParamInfo APPLICATION = createApplicationBundlerParam(null); diff -Nru openjdk-25-25.0.1+8/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/PListReader.java openjdk-25-25.0.2+10/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/PListReader.java --- openjdk-25-25.0.1+8/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/PListReader.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.jpackage/share/classes/jdk/jpackage/internal/util/PListReader.java 2025-12-18 08:04:02.000000000 +0000 @@ -24,21 +24,141 @@ */ package jdk.jpackage.internal.util; +import static jdk.jpackage.internal.util.function.ThrowingSupplier.toSupplier; + import java.io.ByteArrayInputStream; import java.io.IOException; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.NoSuchElementException; import java.util.Objects; import java.util.Optional; +import java.util.stream.Stream; import javax.xml.parsers.ParserConfigurationException; +import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; -import jdk.jpackage.internal.util.function.ThrowingSupplier; +import org.w3c.dom.Element; import org.w3c.dom.Node; import org.xml.sax.SAXException; +/** + * Property list (plist) file reader. + */ public final class PListReader { + public record Raw(String value, Type type) { + + public enum Type { + STRING, + BOOLEAN, + REAL, + INTEGER, + DATE, + DATA; + + private static Optional fromElementName(String name) { + switch (name) { + case "string" -> { + return Optional.of(STRING); + } + case "true" -> { + return Optional.of(BOOLEAN); + } + case "false" -> { + return Optional.of(BOOLEAN); + } + case "real" -> { + return Optional.of(REAL); + } + case "integer" -> { + return Optional.of(INTEGER); + } + case "date" -> { + return Optional.of(DATE); + } + case "data" -> { + return Optional.of(DATA); + } + default -> { + return Optional.empty(); + } + } + } + } + + public Raw { + Objects.requireNonNull(value); + Objects.requireNonNull(type); + } + + private static Optional tryCreate(Element e) { + return Type.fromElementName(e.getNodeName()).map(type -> { + if (type == Type.BOOLEAN) { + if ("true".equals(e.getNodeName())) { + return new Raw(Boolean.TRUE.toString(), type); + } else { + return new Raw(Boolean.FALSE.toString(), type); + } + } else { + return new Raw(e.getTextContent(), type); + } + }); + } + } + + /** + * Returns the contents of the the underlying "dict" element as a Map. + *

+ * The keys in the returned map are names of the properties. + *

+ * Values of nested "dict" properties are stored as {@code Map} + * or {@code PListReader} objects depending on the value of the + * {@code fetchDictionaries} parameter. + *

+ * Values of "array" properties are stored as {@code List} objects. + *

+ * Values of other properties are stored as {@code Raw} objects. + * + * @param fetchDictionaries controls the type of objects of nested "dict" + * elements. If the value is {@code true}, + * {@code Map} type is used, and + * {@code PListReader} type otherwise. + * @return the contents of the the underlying "dict" element as a Map + */ + public Map toMap(boolean fetchDictionaries) { + Map reply = new HashMap<>(); + var nodes = root.getChildNodes(); + for (int i = 0; i != nodes.getLength(); i++) { + if (nodes.item(i) instanceof Element e) { + tryCreateValue(e, fetchDictionaries).ifPresent(value -> { + final var query = "preceding-sibling::*[1]"; + Optional.ofNullable(toSupplier(() -> { + return (Node) XPathSingleton.INSTANCE.evaluate(query, e, XPathConstants.NODE); + }).get()).ifPresent(n -> { + if ("key".equals(n.getNodeName())) { + var keyName = n.getTextContent(); + reply.putIfAbsent(keyName, value); + } + }); + }); + } + } + + return reply; + } + + /** + * Returns the value of the given string property in the underlying "dict" + * element. + * + * @param keyName the name of a string property whose value to query + * @return the value of the string property with the specified name in the + * underlying "dict" element + * @throws NoSuchElementException if there is no string property with the given + * name in the underlying "dict" element + */ public String queryValue(String keyName) { final var node = getNode(keyName); switch (node.getNodeName()) { @@ -51,6 +171,38 @@ } } + /** + * Returns the value of the given "dict" property in the underlying "dict" + * element. + * + * @param keyName the name of a "dict" property whose value to query + * @return the value of the "dict" property with the specified name in the + * underlying "dict" element + * @throws NoSuchElementException if there is no "dict" property with the given + * name in the underlying "dict" element + */ + public PListReader queryDictValue(String keyName) { + final var node = getNode(keyName); + switch (node.getNodeName()) { + case "dict" -> { + return new PListReader(node); + } + default -> { + throw new NoSuchElementException(); + } + } + } + + /** + * Returns the value of the given boolean property in the underlying "dict" + * element. + * + * @param keyName the name of a boolean property whose value to query + * @return the value of the boolean property with the specified name in the + * underlying "dict" element + * @throws NoSuchElementException if there is no string property with the given + * name in the underlying "dict" element + */ public boolean queryBoolValue(String keyName) { final var node = getNode(keyName); switch (node.getNodeName()) { @@ -66,13 +218,58 @@ } } - public List queryArrayValue(String keyName) { + /** + * Returns the value of the given array property in the underlying "dict" + * element as a list of strings. + *

+ * Processes the result of calling {@link #queryArrayValue(String)} on the + * specified property name by filtering {@link Raw} instances of type + * {@link Raw.Type#STRING}. + * + * @param keyName the name of an array property whose value to query + * @return the value of the array property with the specified name in the + * underlying "dict" element + * @throws NoSuchElementException if there is no array property with the given + * name in the underlying "dict" element + */ + public List queryStringArrayValue(String keyName) { + return queryArrayValue(keyName, false).map(v -> { + if (v instanceof Raw r) { + if (r.type() == Raw.Type.STRING) { + return r.value(); + } + } + return (String)null; + }).filter(Objects::nonNull).toList(); + } + + /** + * Returns the value of the given array property in the underlying "dict" + * element as a stream of {@link Object}-s. + *

+ * Values of "dict" array items are stored as {@code Map} or + * {@code PListReader} objects depending on the value of the + * {@code fetchDictionaries} parameter. + *

+ * Values of "array" array items are stored as {@code List} objects. + *

+ * Values of other types are stored as {@code Raw} objects. + * + * @param keyName the name of an array property whose value to query + * @param fetchDictionaries controls the type of objects of "dict" elements. If + * the value is {@code true}, + * {@code Map} type is used, and + * {@code PListReader} type otherwise. + * @return the value of the array property with the specified name in the + * underlying "dict" element + * @throws NoSuchElementException if there is no array key with the given name + * in the underlying "dict" element + */ + public Stream queryArrayValue(String keyName, boolean fetchDictionaries) { final var node = getNode(keyName); switch (node.getNodeName()) { case "array" -> { - return XmlUtils.toStream(node.getChildNodes()).filter(n -> { - return n.getNodeName().equals("string"); - }).map(Node::getTextContent).toList(); + return readArray(node, fetchDictionaries); } default -> { throw new NoSuchElementException(); @@ -80,21 +277,75 @@ } } - public PListReader(Node doc) { - this.root = Objects.requireNonNull(doc); + /** + * Creates plist reader from the given node. + *

+ * If the specified node is an element with the name "dict", the reader is bound + * to the specified node; otherwise, it is bound to the {@code /plist/dict} + * element in the document. + * + * @param node the node + * @throws NoSuchElementException if the specified node is not an element with + * name "dict" and there is no + * {@code /plist/dict} node in the document + */ + public PListReader(Node node) { + Objects.requireNonNull(node); + if (node.getNodeName().equals("dict")) { + this.root = node; + } else { + this.root = Optional.ofNullable(toSupplier(() -> { + return (Node) XPathSingleton.INSTANCE.evaluate("/plist[1]/dict[1]", node, XPathConstants.NODE); + }).get()).orElseThrow(NoSuchElementException::new); + } } public PListReader(byte[] xmlData) throws ParserConfigurationException, SAXException, IOException { this(XmlUtils.initDocumentBuilder().parse(new ByteArrayInputStream(xmlData))); } + private Optional tryCreateValue(Element e, boolean fetchDictionaries) { + switch (e.getNodeName()) { + case "dict" -> { + var plistReader = new PListReader(e); + if (fetchDictionaries) { + return Optional.of(plistReader.toMap(fetchDictionaries)); + } else { + return Optional.of(plistReader); + } + } + case "array" -> { + return Optional.of(readArray(e, fetchDictionaries).toList()); + } + default -> { + return Raw.tryCreate(e); + } + } + } + + private Stream readArray(Node node, boolean fetchDictionaries) { + return XmlUtils.toStream(node.getChildNodes()).map(n -> { + if (n instanceof Element e) { + return tryCreateValue(e, fetchDictionaries); + } else { + return Optional.empty(); + } + }).filter(Optional::isPresent).map(Optional::get); + } + private Node getNode(String keyName) { - final var xPath = XPathFactory.newInstance().newXPath(); - final var query = String.format("//*[preceding-sibling::key = \"%s\"][1]", keyName); - return Optional.ofNullable(ThrowingSupplier.toSupplier(() -> { - return (Node) xPath.evaluate(query, root, XPathConstants.NODE); + Objects.requireNonNull(keyName); + final var query = String.format("*[preceding-sibling::key = \"%s\"][1]", keyName); + return Optional.ofNullable(toSupplier(() -> { + return (Node) XPathSingleton.INSTANCE.evaluate(query, root, XPathConstants.NODE); }).get()).orElseThrow(NoSuchElementException::new); } + + private static final class XPathSingleton { + private static final XPath INSTANCE = XPathFactory.newInstance().newXPath(); + } + + private final Node root; } diff -Nru openjdk-25-25.0.1+8/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp openjdk-25-25.0.2+10/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp --- openjdk-25-25.0.1+8/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.jpackage/windows/native/applauncher/WinLauncher.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 @@ -256,6 +256,16 @@ } +void enableConsoleCtrlHandler(bool enable) { + if (!SetConsoleCtrlHandler(NULL, enable ? FALSE : TRUE)) { + JP_THROW(SysError(tstrings::any() << "SetConsoleCtrlHandler(NULL, " + << (enable ? "FALSE" : "TRUE") + << ") failed", + SetConsoleCtrlHandler)); + } +} + + void launchApp() { // [RT-31061] otherwise UI can be left in back of other windows. ::AllowSetForegroundWindow(ASFW_ANY); @@ -310,6 +320,19 @@ exec.arg(arg); }); + exec.afterProcessCreated([&](HANDLE pid) { + // + // Ignore Ctrl+C in the current process. + // This will prevent child process termination without allowing + // it to handle Ctrl+C events. + // + // Disable the default Ctrl+C handler *after* the child process + // has been created as it is inheritable and we want the child + // process to have the default handler. + // + enableConsoleCtrlHandler(false); + }); + DWORD exitCode = RunExecutorWithMsgLoop::apply(exec); exit(exitCode); diff -Nru openjdk-25-25.0.1+8/src/jdk.jpackage/windows/native/common/Executor.cpp openjdk-25-25.0.2+10/src/jdk.jpackage/windows/native/common/Executor.cpp --- openjdk-25-25.0.1+8/src/jdk.jpackage/windows/native/common/Executor.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.jpackage/windows/native/common/Executor.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 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 @@ -161,6 +161,10 @@ } } + if (afterProcessCreatedCallback) { + afterProcessCreatedCallback(processInfo.hProcess); + } + // Return process handle. return UniqueHandle(processInfo.hProcess); } diff -Nru openjdk-25-25.0.1+8/src/jdk.jpackage/windows/native/common/Executor.h openjdk-25-25.0.2+10/src/jdk.jpackage/windows/native/common/Executor.h --- openjdk-25-25.0.1+8/src/jdk.jpackage/windows/native/common/Executor.h 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.jpackage/windows/native/common/Executor.h 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 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 @@ -26,6 +26,8 @@ #ifndef EXECUTOR_H #define EXECUTOR_H +#include + #include "tstrings.h" #include "UniqueHandle.h" @@ -97,6 +99,14 @@ */ int execAndWaitForExit() const; + /** + * Call provided function after the process hass been created. + */ + Executor& afterProcessCreated(const std::function& v) { + afterProcessCreatedCallback = v; + return *this; + } + private: UniqueHandle startProcess(UniqueHandle* threadHandle=0) const; @@ -106,6 +116,7 @@ HANDLE jobHandle; tstring_array argsArray; std::wstring appPath; + std::function afterProcessCreatedCallback; }; #endif // #ifndef EXECUTOR_H diff -Nru openjdk-25-25.0.1+8/src/jdk.management/linux/native/libmanagement_ext/UnixOperatingSystem.c openjdk-25-25.0.2+10/src/jdk.management/linux/native/libmanagement_ext/UnixOperatingSystem.c --- openjdk-25-25.0.1+8/src/jdk.management/linux/native/libmanagement_ext/UnixOperatingSystem.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.management/linux/native/libmanagement_ext/UnixOperatingSystem.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -195,7 +195,7 @@ uint64_t userTicks; uint64_t systemTicks; - if (read_ticks("/proc/self/stat", &userTicks, &systemTicks) < 0) { + if (read_ticks("/proc/self/stat", &userTicks, &systemTicks) != 2) { return -1; } diff -Nru openjdk-25-25.0.1+8/src/jdk.management.jfr/share/classes/jdk/management/jfr/RemoteRecordingStream.java openjdk-25-25.0.2+10/src/jdk.management.jfr/share/classes/jdk/management/jfr/RemoteRecordingStream.java --- openjdk-25-25.0.1+8/src/jdk.management.jfr/share/classes/jdk/management/jfr/RemoteRecordingStream.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/src/jdk.management.jfr/share/classes/jdk/management/jfr/RemoteRecordingStream.java 2025-12-18 08:04:02.000000000 +0000 @@ -98,10 +98,12 @@ private final FlightRecorderMXBean mbean; private final long recordingId; + private final String identifier; - RemoteSettings(FlightRecorderMXBean mbean, long recordingId) { + RemoteSettings(FlightRecorderMXBean mbean, long recordingId, String identifier) { this.mbean = mbean; this.recordingId = recordingId; + this.identifier = identifier; } @Override @@ -111,7 +113,7 @@ // FlightRecorderMXBean implementation always returns // new instance of Map so no need to create new here. Map newSettings = getEventSettings(); - newSettings.put(name, value); + newSettings.put(identifier + "#" + name, value); mbean.setRecordingSettings(recordingId, newSettings); } @@ -340,9 +342,9 @@ */ public EventSettings disable(String name) { Objects.requireNonNull(name, "name"); - EventSettings s = ManagementSupport.newEventSettings(new RemoteSettings(mbean, recordingId)); + EventSettings s = ManagementSupport.newEventSettings(new RemoteSettings(mbean, recordingId, name)); try { - return s.with(name + "#" + ENABLED, "false"); + return s.with(ENABLED, "false"); } catch (Exception e) { ManagementSupport.logDebug(e.getMessage()); close(); @@ -364,9 +366,9 @@ */ public EventSettings enable(String name) { Objects.requireNonNull(name, "name"); - EventSettings s = ManagementSupport.newEventSettings(new RemoteSettings(mbean, recordingId)); + EventSettings s = ManagementSupport.newEventSettings(new RemoteSettings(mbean, recordingId, name)); try { - return s.with(name + "#" + ENABLED, "true"); + return s.with(ENABLED, "true"); } catch (Exception e) { ManagementSupport.logDebug(e.getMessage()); close(); diff -Nru openjdk-25-25.0.1+8/test/docs/TEST.ROOT openjdk-25-25.0.2+10/test/docs/TEST.ROOT --- openjdk-25-25.0.1+8/test/docs/TEST.ROOT 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/docs/TEST.ROOT 2025-12-18 08:04:02.000000000 +0000 @@ -38,7 +38,7 @@ groups=TEST.groups # Minimum jtreg version -requiredVersion=7.5.1+1 +requiredVersion=8+2 # Use new module options useNewOptions=true diff -Nru openjdk-25-25.0.1+8/test/hotspot/gtest/gc/shenandoah/test_shenandoahAgeCensus.cpp openjdk-25-25.0.2+10/test/hotspot/gtest/gc/shenandoah/test_shenandoahAgeCensus.cpp --- openjdk-25-25.0.1+8/test/hotspot/gtest/gc/shenandoah/test_shenandoahAgeCensus.cpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/gtest/gc/shenandoah/test_shenandoahAgeCensus.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,159 @@ +/* + * Copyright Amazon.com Inc. 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 "gc/shenandoah/shenandoahAgeCensus.hpp" +#include "unittest.hpp" + +class ShenandoahAgeCensusTest : public ::testing::Test { +protected: + static constexpr size_t MinimumPopulationSize = 4*K; + static constexpr size_t InitialPopulationSize = MinimumPopulationSize * 1000; + + size_t _cohorts_count = ShenandoahAgeCensus::MAX_COHORTS; + double _mortality_rates[ShenandoahAgeCensus::MAX_COHORTS]; + size_t _cohort_populations[ShenandoahAgeCensus::MAX_COHORTS]; + + ShenandoahAgeCensusTest() + : _mortality_rates{0.9, 0.7, 0.5, 0.3, 0.09, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0} + { + build_cohort_populations(_mortality_rates, _cohort_populations, _cohorts_count); + } + + static void add_population(ShenandoahAgeCensus& census, const uint age, const size_t population_words) { + CENSUS_NOISE(census.add(age, 0, 0, population_words, 0)); + NO_CENSUS_NOISE(census.add(age, 0, population_words, 0)); + } + + void update(ShenandoahAgeCensus& census, size_t cohorts) const { + for (uint i = 1; i < cohorts; i++) { + add_population(census, i, _cohort_populations[i]); + } + census.update_census(_cohort_populations[0]); + } + + void update(ShenandoahAgeCensus& census) const { + update(census, _cohorts_count); + } + + size_t get_total_population_older_than(const size_t min_cohort_age) const { + size_t total = 0; + for (size_t i = 0; i < _cohorts_count; i++) { + if (i >= min_cohort_age) { + total += _cohort_populations[i]; + } + } + return total; + } + + void promote_all_tenurable(const size_t tenuring_threshold) { + for (size_t i = 0; i < _cohorts_count; i++) { + if (i > tenuring_threshold) { + _cohort_populations[i] = 0; + } + } + } + + static void build_cohort_populations(const double mortality_rates[], size_t cohort_populations[], const size_t cohorts) { + cohort_populations[0] = InitialPopulationSize; + for (size_t i = 1; i < cohorts; i++) { + cohort_populations[i] = cohort_populations[i - 1] * (1.0 - mortality_rates[i - 1]); + } + } +}; + +TEST_F(ShenandoahAgeCensusTest, initialize) { + const ShenandoahAgeCensus census(1); + EXPECT_EQ(census.tenuring_threshold(), ShenandoahAgeCensus::MAX_COHORTS); +} + +TEST_F(ShenandoahAgeCensusTest, ignore_small_populations) { + // Small populations are ignored so we do not return early before reaching the youngest cohort. + ShenandoahAgeCensus census(1); + add_population(census,1, 32); + add_population(census,1, 32); + census.update_census(64); + EXPECT_EQ(1u, census.tenuring_threshold()); +} + +TEST_F(ShenandoahAgeCensusTest, find_high_mortality_rate) { + ShenandoahAgeCensus census(1); + + // Initial threshold, no data + EXPECT_EQ(16u, census.tenuring_threshold()); + + // Provide population data for 1st cohort. Previous epoch has no population data so our + // algorithm skips over all cohorts, leaving tenuring threshold at 1. + update(census, 1); + EXPECT_EQ(1u, census.tenuring_threshold()); + + // Mortality rate of 1st cohort at age 1 is 0.9, we don't want to promote here. Move threshold to 2. + update(census, 2); + EXPECT_EQ(2u, census.tenuring_threshold()); + + // Mortality rate of 1st cohort at age 2 is 0.7, we don't want to promote here. Move threshold to 3. + update(census, 3); + EXPECT_EQ(3u, census.tenuring_threshold()); + + // Mortality rate of 1st cohort at age 3 is 0.5, we don't want to promote here. Move threshold to 4. + update(census, 4); + EXPECT_EQ(4u, census.tenuring_threshold()); + + // Mortality rate of 1st cohort at age 4 is 0.3, we don't want to promote here. Move threshold to 5. + update(census, 5); + EXPECT_EQ(5u, census.tenuring_threshold()); + + // Mortality rate of 1st cohort at age 5 is 0.09, this is less than the mortality rate threshold. It + // is okay to tenure objects older than 5 now. Keep threshold at 5. + update(census, 6); + EXPECT_EQ(5u, census.tenuring_threshold()); + + // Mortality rate at this age is 0. Keep tenuring threshold at 5. + update(census, 7); + EXPECT_EQ(5u, census.tenuring_threshold()); +} + +TEST_F(ShenandoahAgeCensusTest, ignore_mortality_caused_by_promotions) { + ShenandoahAgeCensus census(1); + + // Simulate a sequence of censuses with the same mortality rate. Each one will see a + // mortality rate above the tenuring threshold and raise the tenuring threshold by one. + update(census, 1); + update(census, 2); + update(census, 3); + update(census, 4); + update(census, 5); + + EXPECT_EQ(5u, census.tenuring_threshold()); + + // Simulate the effect of promoting all objects above the tenuring threshold + // out of the young generation. This will look like a very high (100%) mortality + // rate for these cohorts. However, we do _not_ want to raise the threshold in + // this case because these objects haven't really "died", they have just been + // tenured. + promote_all_tenurable(census.tenuring_threshold()); + update(census); + + // We want this to stay at 5 - the mortality in 1st cohort at age 6 was caused by expected promotions. + EXPECT_EQ(5u, census.tenuring_threshold()); +} diff -Nru openjdk-25-25.0.1+8/test/hotspot/gtest/gc/shenandoah/test_shenandoahCollectorPolicy.cpp openjdk-25-25.0.2+10/test/hotspot/gtest/gc/shenandoah/test_shenandoahCollectorPolicy.cpp --- openjdk-25-25.0.1+8/test/hotspot/gtest/gc/shenandoah/test_shenandoahCollectorPolicy.cpp 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/gtest/gc/shenandoah/test_shenandoahCollectorPolicy.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,72 @@ +/* + * Copyright Amazon.com Inc. 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 "gc/shenandoah/shenandoahCollectorPolicy.hpp" +#include "unittest.hpp" + +TEST(ShenandoahCollectorPolicyTest, track_degen_cycles_sanity) { + ShenandoahCollectorPolicy policy; + EXPECT_EQ(policy.consecutive_degenerated_gc_count(), 0UL); + EXPECT_EQ(policy.generational_should_upgrade_degenerated_gc(), false); +} + +TEST(ShenandoahCollectorPolicyTest, track_degen_cycles_no_upgrade) { + ShenandoahCollectorPolicy policy; + policy.record_degenerated(true, true, true); + policy.record_degenerated(true, true, true); + EXPECT_EQ(policy.consecutive_degenerated_gc_count(), 2UL); + EXPECT_EQ(policy.generational_should_upgrade_degenerated_gc(), false); +} + +TEST(ShenandoahCollectorPolicyTest, track_degen_cycles_upgrade) { + ShenandoahCollectorPolicy policy; + policy.record_degenerated(true, true, false); + policy.record_degenerated(true, true, false); + EXPECT_EQ(policy.consecutive_degenerated_gc_count(), 2UL); + EXPECT_EQ(policy.generational_should_upgrade_degenerated_gc(), true); +} + +TEST(ShenandoahCollectorPolicyTest, track_degen_cycles_reset_progress) { + ShenandoahCollectorPolicy policy; + policy.record_degenerated(true, true, false); + policy.record_degenerated(true, true, true); + EXPECT_EQ(policy.consecutive_degenerated_gc_count(), 2UL); + EXPECT_EQ(policy.generational_should_upgrade_degenerated_gc(), false); +} + +TEST(ShenandoahCollectorPolicyTest, track_degen_cycles_full_reset) { + ShenandoahCollectorPolicy policy; + policy.record_degenerated(true, true, false); + policy.record_success_full(); + EXPECT_EQ(policy.consecutive_degenerated_gc_count(), 0UL); + EXPECT_EQ(policy.generational_should_upgrade_degenerated_gc(), false); +} + +TEST(ShenandoahCollectorPolicyTest, track_degen_cycles_reset) { + ShenandoahCollectorPolicy policy; + policy.record_degenerated(true, true, false); + policy.record_success_concurrent(true, true); + EXPECT_EQ(policy.consecutive_degenerated_gc_count(), 0UL); + EXPECT_EQ(policy.generational_should_upgrade_degenerated_gc(), false); +} diff -Nru openjdk-25-25.0.1+8/test/hotspot/gtest/nmt/test_nmt_buffer_overflow_detection.cpp openjdk-25-25.0.2+10/test/hotspot/gtest/nmt/test_nmt_buffer_overflow_detection.cpp --- openjdk-25-25.0.1+8/test/hotspot/gtest/nmt/test_nmt_buffer_overflow_detection.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/gtest/nmt/test_nmt_buffer_overflow_detection.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -35,7 +35,7 @@ // This prefix shows up on any c heap corruption NMT detects. If unsure which assert will // come, just use this one. -#define COMMON_NMT_HEAP_CORRUPTION_MESSAGE_PREFIX "NMT corruption" +#define COMMON_NMT_HEAP_CORRUPTION_MESSAGE_PREFIX "NMT has detected a memory corruption bug." #define DEFINE_TEST(test_function, expected_assertion_message) \ TEST_VM_FATAL_ERROR_MSG(NMT, test_function, ".*" expected_assertion_message ".*") { \ diff -Nru openjdk-25-25.0.1+8/test/hotspot/gtest/runtime/test_arguments.cpp openjdk-25-25.0.2+10/test/hotspot/gtest/runtime/test_arguments.cpp --- openjdk-25-25.0.1+8/test/hotspot/gtest/runtime/test_arguments.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/gtest/runtime/test_arguments.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -22,7 +22,6 @@ */ #include "jvm.h" -#include "unittest.hpp" #include "runtime/arguments.hpp" #include "runtime/flags/jvmFlag.hpp" #include "utilities/align.hpp" @@ -30,6 +29,8 @@ #include +#include "unittest.hpp" + class ArgumentsTest : public ::testing::Test { public: static intx parse_xss_inner_annotated(const char* str, jint expected_err, const char* file, int line_number); @@ -57,7 +58,7 @@ TEST_F(ArgumentsTest, atojulong) { char ullong_max[32]; - int ret = jio_snprintf(ullong_max, sizeof(ullong_max), JULONG_FORMAT, ULLONG_MAX); + int ret = jio_snprintf(ullong_max, sizeof(ullong_max), "%llu", ULLONG_MAX); ASSERT_NE(-1, ret); julong value; diff -Nru openjdk-25-25.0.1+8/test/hotspot/gtest/runtime/test_cgroupSubsystem_linux.cpp openjdk-25-25.0.2+10/test/hotspot/gtest/runtime/test_cgroupSubsystem_linux.cpp --- openjdk-25-25.0.1+8/test/hotspot/gtest/runtime/test_cgroupSubsystem_linux.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/gtest/runtime/test_cgroupSubsystem_linux.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -341,7 +341,6 @@ ok = controller->read_string(base_with_slash, result, 1024); EXPECT_FALSE(ok) << "Empty file should have failed"; EXPECT_STREQ("", result) << "Expected untouched result"; - delete_file(test_file); // File contents larger than 1K // We only read in the first 1K - 1 bytes @@ -358,6 +357,8 @@ EXPECT_TRUE(1023 == strlen(result)) << "Expected only the first 1023 chars to be read in"; EXPECT_EQ(0, strncmp(too_large, result, 1023)); EXPECT_EQ(result[1023], '\0') << "The last character must be the null character"; + + delete_file(test_file); } TEST(cgroupTest, read_number_tuple_test) { @@ -393,6 +394,8 @@ ok = controller->read_numerical_tuple_value(base_with_slash, true /* use_first */, &result); EXPECT_FALSE(ok) << "Empty file should be an error"; EXPECT_EQ((jlong)-10, result) << "result value should be unchanged"; + + delete_file(test_file); } TEST(cgroupTest, read_numerical_key_beyond_max_path) { diff -Nru openjdk-25-25.0.1+8/test/hotspot/gtest/runtime/test_os.cpp openjdk-25-25.0.2+10/test/hotspot/gtest/runtime/test_os.cpp --- openjdk-25-25.0.1+8/test/hotspot/gtest/runtime/test_os.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/gtest/runtime/test_os.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -935,7 +935,7 @@ LOG("shorten_paths=%d, demangle=%d, strip_arguments=%d, provide_scratch_buffer=%d", shorten_paths, demangle, strip_arguments, provide_scratch_buffer); - // Should show os::min_page_size in libjvm + // Should show Threads::create_vm in libjvm addr = CAST_FROM_FN_PTR(address, Threads::create_vm); st.reset(); EXPECT_TRUE(os::print_function_and_library_name(&st, addr, @@ -943,8 +943,16 @@ sizeof(tmp), shorten_paths, demangle, strip_arguments)); + +#ifdef _WINDOWS + // On Windows, if no full .pdb file is available, the output can be something like "0x... in ..." + if (strncmp(output, "0x", 2) != 0) { +#endif EXPECT_CONTAINS(output, "Threads"); EXPECT_CONTAINS(output, "create_vm"); +#ifdef _WINDOWS + } +#endif EXPECT_CONTAINS(output, "jvm"); // "jvm.dll" or "libjvm.so" or similar LOG("%s", output); diff -Nru openjdk-25-25.0.1+8/test/hotspot/gtest/x86/asmtest.out.h openjdk-25-25.0.2+10/test/hotspot/gtest/x86/asmtest.out.h --- openjdk-25-25.0.1+8/test/hotspot/gtest/x86/asmtest.out.h 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/gtest/x86/asmtest.out.h 2025-12-18 08:04:02.000000000 +0000 @@ -289,667 +289,751 @@ __ exorl(rdx, Address(r10, r16, (Address::ScaleFactor)2, -0x161e1d47), 16777216, false); // {EVEX}xor edx, dword ptr [r10+r16*4-0x161e1d47], 16777216 IID265 __ exorl(rdx, Address(r29, r23, (Address::ScaleFactor)1, +0x1b34e2f8), 16777216, true); // {NF}xor edx, dword ptr [r29+r23*2+0x1b34e2f8], 16777216 IID266 __ eaddl(r19, Address(r27, r31, (Address::ScaleFactor)0, +0x1f3ce7d8), r29, false); // {EVEX}add r19d, dword ptr [r27+r31*1+0x1f3ce7d8], r29d IID267 - __ eaddl(r28, Address(r24, rcx, (Address::ScaleFactor)3, -0x6053edc2), r28, false); // {EVEX}add r28d, dword ptr [r24+rcx*8-0x6053edc2], r28d IID268 + __ eaddl(r28, Address(r24, rcx, (Address::ScaleFactor)3, -0x6053edc2), r28, false); // add r28d, dword ptr [r24+rcx*8-0x6053edc2] IID268 __ eaddl(r17, Address(r18, r24, (Address::ScaleFactor)3, -0x1bf71f78), r29, true); // {NF}add r17d, dword ptr [r18+r24*8-0x1bf71f78], r29d IID269 __ eaddl(rcx, Address(r15, r28, (Address::ScaleFactor)1, +0x15b8216), rcx, true); // {NF}add ecx, dword ptr [r15+r28*2+0x15b8216], ecx IID270 - __ eorl(r30, Address(rbx, rdx, (Address::ScaleFactor)3, -0x463540b4), r28, false); // {EVEX}or r30d, dword ptr [rbx+rdx*8-0x463540b4], r28d IID271 - __ eorl(r18, Address(r28, r10, (Address::ScaleFactor)3, +0x3523a73b), r18, false); // {EVEX}or r18d, dword ptr [r28+r10*8+0x3523a73b], r18d IID272 - __ eorl(r9, Address(r15, r15, (Address::ScaleFactor)1, -0x2a0bdd56), r21, true); // {NF}or r9d, dword ptr [r15+r15*2-0x2a0bdd56], r21d IID273 - __ eorl(r16, Address(r23, -0x165064ff), r16, true); // {NF}or r16d, dword ptr [r23-0x165064ff], r16d IID274 - __ eorb(r28, Address(r30, r11, (Address::ScaleFactor)0, +0x17281e3a), r20, false); // {EVEX}or r28b, byte ptr [r30+r11*1+0x17281e3a], r20b IID275 - __ eorb(rdx, Address(rbx, r31, (Address::ScaleFactor)2, +0x2477b5bb), rdx, false); // {EVEX}or dl, byte ptr [rbx+r31*4+0x2477b5bb], dl IID276 - __ eorb(r16, Address(r11, rcx, (Address::ScaleFactor)1, -0x3175d1af), r24, true); // {NF}or r16b, byte ptr [r11+rcx*2-0x3175d1af], r24b IID277 - __ eorb(rbx, Address(r11, r20, (Address::ScaleFactor)3, -0x22d67bd3), rbx, true); // {NF}or bl, byte ptr [r11+r20*8-0x22d67bd3], bl IID278 - __ esubl(r26, Address(r27, r30, (Address::ScaleFactor)1, -0x3d9bce2e), rdx, false); // {EVEX}sub r26d, dword ptr [r27+r30*2-0x3d9bce2e], edx IID279 - __ esubl(r31, Address(r22, r29, (Address::ScaleFactor)1, +0x14218519), r31, false); // {EVEX}sub r31d, dword ptr [r22+r29*2+0x14218519], r31d IID280 - __ esubl(r21, Address(r9, -0x1050127a), r13, true); // {NF}sub r21d, dword ptr [r9-0x1050127a], r13d IID281 - __ esubl(r31, Address(r9, r8, (Address::ScaleFactor)0, -0xae18961), r31, true); // {NF}sub r31d, dword ptr [r9+r8*1-0xae18961], r31d IID282 - __ exorl(r15, Address(r18, +0x5c2bbce5), r12, false); // {EVEX}xor r15d, dword ptr [r18+0x5c2bbce5], r12d IID283 - __ exorl(r27, Address(r25, r23, (Address::ScaleFactor)0, +0x5c6078b3), r27, false); // {EVEX}xor r27d, dword ptr [r25+r23*1+0x5c6078b3], r27d IID284 - __ exorl(r18, Address(r8, rdx, (Address::ScaleFactor)3, -0x9ed3881), r14, true); // {NF}xor r18d, dword ptr [r8+rdx*8-0x9ed3881], r14d IID285 - __ exorl(r9, Address(r15, +0x775acdad), r9, true); // {NF}xor r9d, dword ptr [r15+0x775acdad], r9d IID286 - __ exorb(r21, Address(r18, r26, (Address::ScaleFactor)1, +0x2fe31fd5), r23, false); // {EVEX}xor r21b, byte ptr [r18+r26*2+0x2fe31fd5], r23b IID287 - __ exorb(r10, Address(r27, +0xa3150de), r10, false); // {EVEX}xor r10b, byte ptr [r27+0xa3150de], r10b IID288 - __ exorb(r18, Address(r22, r30, (Address::ScaleFactor)3, +0x1ad4e897), r24, true); // {NF}xor r18b, byte ptr [r22+r30*8+0x1ad4e897], r24b IID289 - __ exorb(r8, Address(r16, r20, (Address::ScaleFactor)0, +0x626eae82), r8, true); // {NF}xor r8b, byte ptr [r16+r20*1+0x626eae82], r8b IID290 - __ eaddl(r21, r15, 1048576, false); // {EVEX}add r21d, r15d, 1048576 IID291 - __ eaddl(rax, r18, 1048576, false); // {EVEX}add eax, r18d, 1048576 IID292 - __ eaddl(r18, r18, 256, false); // add r18d, 256 IID293 - __ eaddl(r13, r19, 16, true); // {NF}add r13d, r19d, 16 IID294 - __ eaddl(rax, r23, 16, true); // {NF}add eax, r23d, 16 IID295 - __ eaddl(r25, r25, 16777216, true); // {NF}add r25d, r25d, 16777216 IID296 - __ eandl(r29, r18, 1048576, false); // {EVEX}and r29d, r18d, 1048576 IID297 - __ eandl(rax, r14, 1048576, false); // {EVEX}and eax, r14d, 1048576 IID298 - __ eandl(r19, r19, 65536, false); // and r19d, 65536 IID299 - __ eandl(r27, r25, 1048576, true); // {NF}and r27d, r25d, 1048576 IID300 - __ eandl(rax, r20, 1048576, true); // {NF}and eax, r20d, 1048576 IID301 - __ eandl(r28, r28, 16, true); // {NF}and r28d, r28d, 16 IID302 - __ eimull(r31, r22, 4096, false); // {EVEX}imul r31d, r22d, 4096 IID303 -#endif // _LP64 - __ eimull(rax, rbx, 4096, false); // {EVEX}imul eax, ebx, 4096 IID304 -#ifdef _LP64 - __ eimull(r24, r24, 1048576, false); // {EVEX}imul r24d, r24d, 1048576 IID305 - __ eimull(r21, r16, 65536, true); // {NF}imul r21d, r16d, 65536 IID306 - __ eimull(rax, r24, 65536, true); // {NF}imul eax, r24d, 65536 IID307 - __ eimull(r13, r13, 16, true); // {NF}imul r13d, r13d, 16 IID308 - __ eorl(r29, r8, 16777216, false); // {EVEX}or r29d, r8d, 16777216 IID309 - __ eorl(rax, r12, 16777216, false); // {EVEX}or eax, r12d, 16777216 IID310 - __ eorl(r30, r30, 4096, false); // or r30d, 4096 IID311 - __ eorl(r24, rdx, 16, true); // {NF}or r24d, edx, 16 IID312 - __ eorl(rax, r8, 16, true); // {NF}or eax, r8d, 16 IID313 - __ eorl(r13, r13, 4096, true); // {NF}or r13d, r13d, 4096 IID314 - __ ercll(r25, r13, 1); // {EVEX}rcl r25d, r13d, 1 IID315 - __ ercll(rax, r18, 1); // {EVEX}rcl eax, r18d, 1 IID316 - __ ercll(r9, r9, 16); // rcl r9d, 16 IID317 - __ eroll(r26, r25, 8, false); // {EVEX}rol r26d, r25d, 8 IID318 -#endif // _LP64 - __ eroll(rax, rdx, 8, false); // {EVEX}rol eax, edx, 8 IID319 -#ifdef _LP64 - __ eroll(r24, r24, 16, false); // rol r24d, 16 IID320 - __ eroll(r24, rcx, 8, true); // {NF}rol r24d, ecx, 8 IID321 - __ eroll(rax, r30, 8, true); // {NF}rol eax, r30d, 8 IID322 - __ eroll(r28, r28, 16, true); // {NF}rol r28d, r28d, 16 IID323 - __ erorl(r17, r28, 4, false); // {EVEX}ror r17d, r28d, 4 IID324 -#endif // _LP64 - __ erorl(rax, rdx, 4, false); // {EVEX}ror eax, edx, 4 IID325 -#ifdef _LP64 - __ erorl(r8, r8, 16, false); // ror r8d, 16 IID326 - __ erorl(r19, rdx, 16, true); // {NF}ror r19d, edx, 16 IID327 - __ erorl(rax, r31, 16, true); // {NF}ror eax, r31d, 16 IID328 - __ erorl(r22, r22, 8, true); // {NF}ror r22d, r22d, 8 IID329 - __ esall(r23, r25, 16, false); // {EVEX}sal r23d, r25d, 16 IID330 - __ esall(rax, r14, 16, false); // {EVEX}sal eax, r14d, 16 IID331 - __ esall(r31, r31, 8, false); // sal r31d, 8 IID332 - __ esall(r30, r24, 2, true); // {NF}sal r30d, r24d, 2 IID333 - __ esall(rax, r29, 2, true); // {NF}sal eax, r29d, 2 IID334 - __ esall(r8, r8, 2, true); // {NF}sal r8d, r8d, 2 IID335 - __ esarl(r18, r24, 16, false); // {EVEX}sar r18d, r24d, 16 IID336 - __ esarl(rax, r13, 16, false); // {EVEX}sar eax, r13d, 16 IID337 - __ esarl(r24, r24, 1, false); // sar r24d, 1 IID338 - __ esarl(r28, r17, 16, true); // {NF}sar r28d, r17d, 16 IID339 - __ esarl(rax, r24, 16, true); // {NF}sar eax, r24d, 16 IID340 - __ esarl(r17, r17, 4, true); // {NF}sar r17d, r17d, 4 IID341 - __ eshll(r24, rcx, 4, false); // {EVEX}shl r24d, ecx, 4 IID342 - __ eshll(rax, r16, 4, false); // {EVEX}shl eax, r16d, 4 IID343 - __ eshll(r15, r15, 2, false); // shl r15d, 2 IID344 - __ eshll(r14, r27, 4, true); // {NF}shl r14d, r27d, 4 IID345 - __ eshll(rax, r23, 4, true); // {NF}shl eax, r23d, 4 IID346 - __ eshll(r30, r30, 4, true); // {NF}shl r30d, r30d, 4 IID347 - __ eshrl(r27, rdx, 2, false); // {EVEX}shr r27d, edx, 2 IID348 - __ eshrl(rax, r19, 2, false); // {EVEX}shr eax, r19d, 2 IID349 - __ eshrl(r20, r20, 2, false); // shr r20d, 2 IID350 - __ eshrl(r21, r23, 1, true); // {NF}shr r21d, r23d, 1 IID351 - __ eshrl(rax, r30, 1, true); // {NF}shr eax, r30d, 1 IID352 - __ eshrl(r25, r25, 2, true); // {NF}shr r25d, r25d, 2 IID353 - __ esubl(r24, r19, 1048576, false); // {EVEX}sub r24d, r19d, 1048576 IID354 - __ esubl(rax, r14, 1048576, false); // {EVEX}sub eax, r14d, 1048576 IID355 - __ esubl(r22, r22, 268435456, false); // sub r22d, 268435456 IID356 - __ esubl(r24, r24, 65536, true); // {NF}sub r24d, r24d, 65536 IID357 - __ esubl(rax, r14, 65536, true); // {NF}sub eax, r14d, 65536 IID358 - __ esubl(r28, r28, 268435456, true); // {NF}sub r28d, r28d, 268435456 IID359 - __ exorl(rbx, r20, 256, false); // {EVEX}xor ebx, r20d, 256 IID360 - __ exorl(rax, r15, 256, false); // {EVEX}xor eax, r15d, 256 IID361 -#endif // _LP64 - __ exorl(rbx, rbx, 4096, false); // xor ebx, 4096 IID362 -#ifdef _LP64 - __ exorl(r24, r30, 65536, true); // {NF}xor r24d, r30d, 65536 IID363 - __ exorl(rax, r31, 65536, true); // {NF}xor eax, r31d, 65536 IID364 - __ exorl(r31, r31, 4096, true); // {NF}xor r31d, r31d, 4096 IID365 - __ esubl_imm32(r20, r10, 1048576, false); // {EVEX}sub r20d, r10d, 1048576 IID366 - __ esubl_imm32(rax, r13, 1048576, false); // {EVEX}sub eax, r13d, 1048576 IID367 - __ esubl_imm32(r25, r25, 1048576, false); // sub r25d, 1048576 IID368 - __ esubl_imm32(r23, r12, 1073741824, true); // {NF}sub r23d, r12d, 1073741824 IID369 - __ esubl_imm32(rax, r16, 1073741824, true); // {NF}sub eax, r16d, 1073741824 IID370 - __ esubl_imm32(r31, r31, 65536, true); // {NF}sub r31d, r31d, 65536 IID371 - __ eaddl(r17, r13, Address(r9, +0x7fef2f98), false); // {EVEX}add r17d, r13d, dword ptr [r9+0x7fef2f98] IID372 - __ eaddl(r29, r8, Address(r22, -0x4df70aac), true); // {NF}add r29d, r8d, dword ptr [r22-0x4df70aac] IID373 - __ eandl(r13, r17, Address(r12, r15, (Address::ScaleFactor)3, +0x50a8a902), false); // {EVEX}and r13d, r17d, dword ptr [r12+r15*8+0x50a8a902] IID374 - __ eandl(r22, r25, Address(r26, r10, (Address::ScaleFactor)2, +0x70ea2754), true); // {NF}and r22d, r25d, dword ptr [r26+r10*4+0x70ea2754] IID375 - __ eimull(r19, r12, Address(r30, r8, (Address::ScaleFactor)0, +0x6a1a0a73), false); // {EVEX}imul r19d, r12d, dword ptr [r30+r8*1+0x6a1a0a73] IID376 - __ eimull(r30, r18, Address(r18, r19, (Address::ScaleFactor)2, -0x7fcd28c7), true); // {NF}imul r30d, r18d, dword ptr [r18+r19*4-0x7fcd28c7] IID377 - __ eorl(r16, r31, Address(r25, r11, (Address::ScaleFactor)3, +0x482d5dbc), false); // {EVEX}or r16d, r31d, dword ptr [r25+r11*8+0x482d5dbc] IID378 - __ eorl(r9, r27, Address(r11, +0x43d5ee01), true); // {NF}or r9d, r27d, dword ptr [r11+0x43d5ee01] IID379 - __ esubl(rcx, r23, Address(r21, r15, (Address::ScaleFactor)2, +0x2825c2bc), false); // {EVEX}sub ecx, r23d, dword ptr [r21+r15*4+0x2825c2bc] IID380 - __ esubl(r27, r22, Address(r13, r15, (Address::ScaleFactor)1, +0x771f0da7), true); // {NF}sub r27d, r22d, dword ptr [r13+r15*2+0x771f0da7] IID381 - __ exorl(r9, r30, Address(r9, r22, (Address::ScaleFactor)3, -0x4ad6c88e), false); // {EVEX}xor r9d, r30d, dword ptr [r9+r22*8-0x4ad6c88e] IID382 - __ exorl(r11, r16, Address(rbx, r28, (Address::ScaleFactor)2, +0xb0223ee), true); // {NF}xor r11d, r16d, dword ptr [rbx+r28*4+0xb0223ee] IID383 - __ exorb(r15, r29, Address(r15, r28, (Address::ScaleFactor)1, -0x1f297a69), false); // {EVEX}xor r15b, r29b, byte ptr [r15+r28*2-0x1f297a69] IID384 - __ exorb(r17, r30, Address(r23, rbx, (Address::ScaleFactor)1, +0xadc7545), true); // {NF}xor r17b, r30b, byte ptr [r23+rbx*2+0xadc7545] IID385 - __ exorw(r27, r9, Address(rdx, r22, (Address::ScaleFactor)2, -0x43d90f61), false); // {EVEX}xor r27w, r9w, word ptr [rdx+r22*4-0x43d90f61] IID386 - __ exorw(rbx, r22, Address(r28, r22, (Address::ScaleFactor)0, -0x7d30a0b1), true); // {NF}xor bx, r22w, word ptr [r28+r22*1-0x7d30a0b1] IID387 - __ eaddl(r14, r24, rcx, false); // {load}{EVEX}add r14d, r24d, ecx IID388 - __ eaddl(r8, r8, r17, false); // {load}add r8d, r17d IID389 - __ eaddl(r26, r24, r12, true); // {load}{NF}add r26d, r24d, r12d IID390 - __ eaddl(r24, r24, r23, true); // {load}{NF}add r24d, r24d, r23d IID391 - __ eandl(r13, r26, r31, false); // {load}{EVEX}and r13d, r26d, r31d IID392 - __ eandl(r11, r11, r8, false); // {load}and r11d, r8d IID393 - __ eandl(rcx, r19, r15, true); // {load}{NF}and ecx, r19d, r15d IID394 - __ eandl(r12, r12, r12, true); // {load}{NF}and r12d, r12d, r12d IID395 - __ eimull(r22, r20, r19, false); // {load}{EVEX}imul r22d, r20d, r19d IID396 - __ eimull(r8, r8, rdx, false); // {load}imul r8d, edx IID397 - __ eimull(r22, r27, r23, true); // {load}{NF}imul r22d, r27d, r23d IID398 - __ eimull(r9, r9, r18, true); // {load}{NF}imul r9d, r9d, r18d IID399 - __ eorw(rcx, r30, r13, false); // {load}{EVEX}or cx, r30w, r13w IID400 - __ eorw(r28, r28, r19, false); // {load}or r28w, r19w IID401 - __ eorw(r12, r30, r27, true); // {load}{NF}or r12w, r30w, r27w IID402 - __ eorw(r8, r8, r22, true); // {load}{NF}or r8w, r8w, r22w IID403 - __ eorl(r16, rcx, r30, false); // {load}{EVEX}or r16d, ecx, r30d IID404 - __ eorl(r10, r10, r25, false); // {load}or r10d, r25d IID405 - __ eorl(r15, r17, r17, true); // {load}{NF}or r15d, r17d, r17d IID406 - __ eorl(r9, r9, r30, true); // {load}{NF}or r9d, r9d, r30d IID407 - __ eshldl(r20, r21, r8, false); // {load}{EVEX}shld r20d, r21d, r8d, cl IID408 - __ eshldl(r26, r26, r14, false); // {load}shld r26d, r14d IID409 - __ eshldl(r16, rdx, r14, true); // {load}{NF}shld r16d, edx, r14d, cl IID410 - __ eshldl(r19, r19, r8, true); // {load}{NF}shld r19d, r19d, r8d, cl IID411 - __ eshrdl(r27, rbx, r26, false); // {load}{EVEX}shrd r27d, ebx, r26d, cl IID412 - __ eshrdl(r28, r28, r19, false); // {load}shrd r28d, r19d IID413 - __ eshrdl(rcx, r11, r14, true); // {load}{NF}shrd ecx, r11d, r14d, cl IID414 - __ eshrdl(r31, r31, r19, true); // {load}{NF}shrd r31d, r31d, r19d, cl IID415 - __ esubl(r26, r13, r25, false); // {load}{EVEX}sub r26d, r13d, r25d IID416 - __ esubl(r24, r24, r11, false); // {load}sub r24d, r11d IID417 - __ esubl(r18, r20, r13, true); // {load}{NF}sub r18d, r20d, r13d IID418 - __ esubl(r16, r16, r18, true); // {load}{NF}sub r16d, r16d, r18d IID419 - __ exorl(r19, r17, r8, false); // {load}{EVEX}xor r19d, r17d, r8d IID420 - __ exorl(r19, r19, r13, false); // {load}xor r19d, r13d IID421 - __ exorl(r23, r13, r15, true); // {load}{NF}xor r23d, r13d, r15d IID422 - __ exorl(r11, r11, r29, true); // {load}{NF}xor r11d, r11d, r29d IID423 - __ eshldl(r29, r17, r17, 1, false); // {EVEX}shld r29d, r17d, r17d, 1 IID424 - __ eshldl(r22, r22, r24, 4, false); // shld r22d, r24d, 4 IID425 - __ eshldl(r8, r28, r11, 16, true); // {NF}shld r8d, r28d, r11d, 16 IID426 - __ eshldl(r15, r15, r23, 4, true); // {NF}shld r15d, r15d, r23d, 4 IID427 - __ eshrdl(r29, r22, r16, 4, false); // {EVEX}shrd r29d, r22d, r16d, 4 IID428 - __ eshrdl(r13, r13, r9, 4, false); // shrd r13d, r9d, 4 IID429 - __ eshrdl(r15, r21, r12, 2, true); // {NF}shrd r15d, r21d, r12d, 2 IID430 - __ eshrdl(r17, r17, r23, 2, true); // {NF}shrd r17d, r17d, r23d, 2 IID431 - __ ecmovl (Assembler::Condition::overflow, rdx, r16, r29); // cmovo edx, r16d, r29d IID432 - __ ecmovl (Assembler::Condition::overflow, r10, r10, r21); // cmovo r10d, r21d IID433 - __ ecmovl (Assembler::Condition::noOverflow, r17, r29, r18); // cmovno r17d, r29d, r18d IID434 - __ ecmovl (Assembler::Condition::noOverflow, r28, r28, r24); // cmovno r28d, r24d IID435 - __ ecmovl (Assembler::Condition::below, r10, r20, r27); // cmovb r10d, r20d, r27d IID436 - __ ecmovl (Assembler::Condition::below, r10, r10, r14); // cmovb r10d, r14d IID437 - __ ecmovl (Assembler::Condition::aboveEqual, r11, r27, rcx); // cmovae r11d, r27d, ecx IID438 - __ ecmovl (Assembler::Condition::aboveEqual, r22, r22, r15); // cmovae r22d, r15d IID439 - __ ecmovl (Assembler::Condition::zero, r31, r30, r19); // cmovz r31d, r30d, r19d IID440 - __ ecmovl (Assembler::Condition::zero, r19, r19, r26); // cmovz r19d, r26d IID441 - __ ecmovl (Assembler::Condition::notZero, r21, r14, r26); // cmovnz r21d, r14d, r26d IID442 - __ ecmovl (Assembler::Condition::notZero, r20, r20, r15); // cmovnz r20d, r15d IID443 - __ ecmovl (Assembler::Condition::belowEqual, r12, r13, r23); // cmovbe r12d, r13d, r23d IID444 - __ ecmovl (Assembler::Condition::belowEqual, r28, r28, r20); // cmovbe r28d, r20d IID445 - __ ecmovl (Assembler::Condition::above, r20, r24, r11); // cmova r20d, r24d, r11d IID446 - __ ecmovl (Assembler::Condition::above, r10, r10, r15); // cmova r10d, r15d IID447 - __ ecmovl (Assembler::Condition::negative, r19, r20, r23); // cmovs r19d, r20d, r23d IID448 - __ ecmovl (Assembler::Condition::negative, r15, r15, r26); // cmovs r15d, r26d IID449 - __ ecmovl (Assembler::Condition::positive, r19, r24, r23); // cmovns r19d, r24d, r23d IID450 - __ ecmovl (Assembler::Condition::positive, r28, r28, r11); // cmovns r28d, r11d IID451 - __ ecmovl (Assembler::Condition::parity, r13, r13, rdx); // cmovp r13d, edx IID452 - __ ecmovl (Assembler::Condition::parity, r31, r31, r23); // cmovp r31d, r23d IID453 - __ ecmovl (Assembler::Condition::noParity, r23, r9, r27); // cmovnp r23d, r9d, r27d IID454 - __ ecmovl (Assembler::Condition::noParity, r21, r21, r20); // cmovnp r21d, r20d IID455 - __ ecmovl (Assembler::Condition::less, r24, r21, r29); // cmovl r24d, r21d, r29d IID456 - __ ecmovl (Assembler::Condition::less, rbx, rbx, r11); // cmovl ebx, r11d IID457 - __ ecmovl (Assembler::Condition::greaterEqual, r21, rbx, rcx); // cmovge r21d, ebx, ecx IID458 - __ ecmovl (Assembler::Condition::greaterEqual, r31, r31, r21); // cmovge r31d, r21d IID459 - __ ecmovl (Assembler::Condition::lessEqual, r15, r25, r30); // cmovle r15d, r25d, r30d IID460 - __ ecmovl (Assembler::Condition::lessEqual, r23, r23, r25); // cmovle r23d, r25d IID461 - __ ecmovl (Assembler::Condition::greater, r18, rcx, r10); // cmovg r18d, ecx, r10d IID462 - __ ecmovl (Assembler::Condition::greater, rcx, rcx, r31); // cmovg ecx, r31d IID463 - __ ecmovl (Assembler::Condition::overflow, r21, r19, Address(r26, -0x6e290873)); // cmovo r21d, r19d, dword ptr [r26-0x6e290873] IID464 - __ ecmovl (Assembler::Condition::noOverflow, r24, r19, Address(r22, rcx, (Address::ScaleFactor)0, +0x11f85f9a)); // cmovno r24d, r19d, dword ptr [r22+rcx*1+0x11f85f9a] IID465 - __ ecmovl (Assembler::Condition::below, r17, r24, Address(r20, +0x534d775e)); // cmovb r17d, r24d, dword ptr [r20+0x534d775e] IID466 - __ ecmovl (Assembler::Condition::aboveEqual, r20, r18, Address(r20, -0x47c94ecd)); // cmovae r20d, r18d, dword ptr [r20-0x47c94ecd] IID467 - __ ecmovl (Assembler::Condition::zero, r9, r13, Address(r23, -0x4b83c563)); // cmovz r9d, r13d, dword ptr [r23-0x4b83c563] IID468 - __ ecmovl (Assembler::Condition::notZero, r11, r25, Address(r24, r14, (Address::ScaleFactor)1, -0x446507af)); // cmovnz r11d, r25d, dword ptr [r24+r14*2-0x446507af] IID469 - __ ecmovl (Assembler::Condition::belowEqual, r14, r24, Address(r30, r13, (Address::ScaleFactor)2, +0xd0661d)); // cmovbe r14d, r24d, dword ptr [r30+r13*4+0xd0661d] IID470 - __ ecmovl (Assembler::Condition::above, r13, r25, Address(r14, r27, (Address::ScaleFactor)3, +0x47e1403)); // cmova r13d, r25d, dword ptr [r14+r27*8+0x47e1403] IID471 - __ ecmovl (Assembler::Condition::negative, r24, r19, Address(rcx, rdx, (Address::ScaleFactor)3, -0x644a5318)); // cmovs r24d, r19d, dword ptr [rcx+rdx*8-0x644a5318] IID472 - __ ecmovl (Assembler::Condition::positive, r26, r24, Address(r22, r22, (Address::ScaleFactor)0, +0x70352446)); // cmovns r26d, r24d, dword ptr [r22+r22*1+0x70352446] IID473 - __ ecmovl (Assembler::Condition::parity, r19, r26, Address(r8, r30, (Address::ScaleFactor)2, +0x78a12f5c)); // cmovp r19d, r26d, dword ptr [r8+r30*4+0x78a12f5c] IID474 - __ ecmovl (Assembler::Condition::noParity, r29, r11, Address(r25, r20, (Address::ScaleFactor)0, +0x27a8303a)); // cmovnp r29d, r11d, dword ptr [r25+r20*1+0x27a8303a] IID475 - __ ecmovl (Assembler::Condition::less, r22, r24, Address(r27, r16, (Address::ScaleFactor)1, +0x2541a10)); // cmovl r22d, r24d, dword ptr [r27+r16*2+0x2541a10] IID476 - __ ecmovl (Assembler::Condition::greaterEqual, r31, r15, Address(r8, r16, (Address::ScaleFactor)3, +0x558e3251)); // cmovge r31d, r15d, dword ptr [r8+r16*8+0x558e3251] IID477 - __ ecmovl (Assembler::Condition::lessEqual, r27, r18, Address(r8, r10, (Address::ScaleFactor)0, -0x471987b7)); // cmovle r27d, r18d, dword ptr [r8+r10*1-0x471987b7] IID478 - __ ecmovl (Assembler::Condition::greater, r18, r16, Address(r18, r19, (Address::ScaleFactor)2, -0x120ae81e)); // cmovg r18d, r16d, dword ptr [r18+r19*4-0x120ae81e] IID479 -#endif // _LP64 -#ifdef _LP64 - __ adcq(rbx, r31); // {load}adc rbx, r31 IID480 - __ cmpq(r30, r31); // {load}cmp r30, r31 IID481 - __ imulq(r29, r28); // {load}imul r29, r28 IID482 - __ popcntq(r25, r10); // {load}popcnt r25, r10 IID483 - __ sbbq(r24, r20); // {load}sbb r24, r20 IID484 - __ subq(r16, rdx); // {load}sub r16, rdx IID485 - __ tzcntq(r26, r28); // {load}tzcnt r26, r28 IID486 - __ lzcntq(r28, r9); // {load}lzcnt r28, r9 IID487 - __ addq(r20, r24); // {load}add r20, r24 IID488 - __ andq(r24, r29); // {load}and r24, r29 IID489 - __ orq(r23, r27); // {load}or r23, r27 IID490 - __ xorq(r15, r12); // {load}xor r15, r12 IID491 - __ movq(r18, r19); // {load}mov r18, r19 IID492 - __ bsfq(r31, rcx); // {load}bsf r31, rcx IID493 - __ bsrq(r9, r13); // {load}bsr r9, r13 IID494 - __ btq(r20, rcx); // {load}bt r20, rcx IID495 - __ xchgq(r8, r21); // {load}xchg r8, r21 IID496 - __ testq(r24, r14); // {load}test r24, r14 IID497 - __ addq(Address(rcx, r23, (Address::ScaleFactor)2, +0x4ff06c4d), r29); // add qword ptr [rcx+r23*4+0x4ff06c4d], r29 IID498 - __ andq(Address(r24, r10, (Address::ScaleFactor)1, -0x75d9a189), r26); // and qword ptr [r24+r10*2-0x75d9a189], r26 IID499 - __ cmpq(Address(rbx, rbx, (Address::ScaleFactor)0, +0x4033d59c), r17); // cmp qword ptr [rbx+rbx*1+0x4033d59c], r17 IID500 - __ orq(Address(r22, r12, (Address::ScaleFactor)3, -0x3893347d), r18); // or qword ptr [r22+r12*8-0x3893347d], r18 IID501 - __ xorq(Address(r20, r23, (Address::ScaleFactor)3, +0x4b311560), r12); // xor qword ptr [r20+r23*8+0x4b311560], r12 IID502 - __ subq(Address(r10, r28, (Address::ScaleFactor)2, +0x5c3a2657), r29); // sub qword ptr [r10+r28*4+0x5c3a2657], r29 IID503 - __ movq(Address(r13, r25, (Address::ScaleFactor)3, +0x1a3d6f3f), r22); // mov qword ptr [r13+r25*8+0x1a3d6f3f], r22 IID504 - __ xaddq(Address(r17, r24, (Address::ScaleFactor)3, -0x35addbd8), r25); // xadd qword ptr [r17+r24*8-0x35addbd8], r25 IID505 - __ andq(Address(r25, +0x632184c3), 16777216); // and qword ptr [r25+0x632184c3], 16777216 IID506 - __ addq(Address(r13, r13, (Address::ScaleFactor)0, -0x3972eac6), 16777216); // add qword ptr [r13+r13*1-0x3972eac6], 16777216 IID507 - __ cmpq(Address(r9, -0x13b4c806), 4096); // cmp qword ptr [r9-0x13b4c806], 4096 IID508 - __ sarq(Address(r31, +0x4fa7f551), 1); // sar qword ptr [r31+0x4fa7f551], 1 IID509 - __ salq(Address(r21, r31, (Address::ScaleFactor)2, +0x31aa8232), 1); // sal qword ptr [r21+r31*4+0x31aa8232], 1 IID510 - __ sbbq(Address(r24, r31, (Address::ScaleFactor)2, -0x466538b7), 268435456); // sbb qword ptr [r24+r31*4-0x466538b7], 268435456 IID511 - __ shrq(Address(r28, r22, (Address::ScaleFactor)0, -0x3efe85b1), 2); // shr qword ptr [r28+r22*1-0x3efe85b1], 2 IID512 - __ subq(Address(r16, -0x1389a3eb), 1048576); // sub qword ptr [r16-0x1389a3eb], 1048576 IID513 - __ xorq(Address(r29, r8, (Address::ScaleFactor)0, +0x1d022615), 16); // xor qword ptr [r29+r8*1+0x1d022615], 16 IID514 - __ orq(Address(r12, r28, (Address::ScaleFactor)1, -0x34c898e2), 1); // or qword ptr [r12+r28*2-0x34c898e2], 1 IID515 - __ movq(Address(rcx, r24, (Address::ScaleFactor)2, -0x1644eb08), 256); // mov qword ptr [rcx+r24*4-0x1644eb08], 256 IID516 - __ testq(Address(r29, -0x7d23890b), -65536); // test qword ptr [r29-0x7d23890b], -65536 IID517 - __ addq(r23, Address(rcx, r19, (Address::ScaleFactor)2, +0x70eac654)); // add r23, qword ptr [rcx+r19*4+0x70eac654] IID518 - __ andq(rdx, Address(r24, r15, (Address::ScaleFactor)0, -0x204ddaa9)); // and rdx, qword ptr [r24+r15*1-0x204ddaa9] IID519 - __ cmpq(rdx, Address(r23, r11, (Address::ScaleFactor)3, +0x32c930bd)); // cmp rdx, qword ptr [r23+r11*8+0x32c930bd] IID520 - __ lzcntq(r28, Address(rdx, -0x5433c28f)); // lzcnt r28, qword ptr [rdx-0x5433c28f] IID521 - __ orq(r22, Address(r19, r14, (Address::ScaleFactor)1, -0x2cc67d38)); // or r22, qword ptr [r19+r14*2-0x2cc67d38] IID522 - __ adcq(r10, Address(r10, +0x3d7c59f)); // adc r10, qword ptr [r10+0x3d7c59f] IID523 - __ imulq(r10, Address(r8, r8, (Address::ScaleFactor)3, -0xe61862d)); // imul r10, qword ptr [r8+r8*8-0xe61862d] IID524 - __ popcntq(r23, Address(r29, -0x777ed96d)); // popcnt r23, qword ptr [r29-0x777ed96d] IID525 - __ sbbq(rcx, Address(rbx, r19, (Address::ScaleFactor)1, +0x53c601cb)); // sbb rcx, qword ptr [rbx+r19*2+0x53c601cb] IID526 - __ subq(r14, Address(r17, rbx, (Address::ScaleFactor)0, -0x768bf073)); // sub r14, qword ptr [r17+rbx*1-0x768bf073] IID527 - __ tzcntq(r29, Address(r10, r19, (Address::ScaleFactor)1, +0x30c98d3c)); // tzcnt r29, qword ptr [r10+r19*2+0x30c98d3c] IID528 - __ xorq(r10, Address(r16, r27, (Address::ScaleFactor)0, -0x3d08d602)); // xor r10, qword ptr [r16+r27*1-0x3d08d602] IID529 - __ movq(r18, Address(r28, r28, (Address::ScaleFactor)3, -0x62fbac91)); // mov r18, qword ptr [r28+r28*8-0x62fbac91] IID530 - __ leaq(rbx, Address(rcx, +0x450602a5)); // lea rbx, qword ptr [rcx+0x450602a5] IID531 - __ cvttsd2siq(r12, Address(r30, r31, (Address::ScaleFactor)0, -0x6798a630)); // cvttsd2si r12, qword ptr [r30+r31*1-0x6798a630] IID532 - __ xchgq(r31, Address(r24, r10, (Address::ScaleFactor)1, -0x706712ed)); // xchg r31, qword ptr [r24+r10*2-0x706712ed] IID533 - __ testq(r14, Address(r13, r20, (Address::ScaleFactor)3, +0x171081f2)); // test r14, qword ptr [r13+r20*8+0x171081f2] IID534 - __ addq(r31, 16); // add r31, 16 IID535 - __ andq(r25, 16); // and r25, 16 IID536 - __ adcq(r23, 256); // adc r23, 256 IID537 - __ cmpq(r19, 268435456); // cmp r19, 268435456 IID538 - __ rclq(r31, 1); // rcl r31, 1 IID539 - __ rcrq(r17, 1); // rcr r17, 1 IID540 - __ rolq(r25, 2); // rol r25, 2 IID541 - __ rorq(r17, 4); // ror r17, 4 IID542 - __ sarq(r28, 1); // sar r28, 1 IID543 - __ salq(r15, 4); // sal r15, 4 IID544 - __ sbbq(rbx, 65536); // sbb rbx, 65536 IID545 - __ shlq(r21, 1); // shl r21, 1 IID546 - __ shrq(r10, 1); // shr r10, 1 IID547 - __ subq(r14, 16); // sub r14, 16 IID548 - __ xorq(r18, 268435456); // xor r18, 268435456 IID549 - __ movq(r23, 16); // mov r23, 16 IID550 - __ mov64(r12, 1099511627776); // mov r12, 1099511627776 IID551 - __ btq(r14, 4); // bt r14, 4 IID552 - __ testq(r24, -4096); // test r24, -4096 IID553 - __ orq_imm32(r19, 1048576); // or r19, 1048576 IID554 - __ subq_imm32(rcx, 268435456); // sub rcx, 268435456 IID555 - __ cmovq(Assembler::Condition::overflow, rdx, Address(r19, rbx, (Address::ScaleFactor)3, +0x211c8c4)); // cmovo rdx, qword ptr [r19+rbx*8+0x211c8c4] IID556 - __ cmovq(Assembler::Condition::noOverflow, rbx, Address(r21, +0x49267743)); // cmovno rbx, qword ptr [r21+0x49267743] IID557 - __ cmovq(Assembler::Condition::below, r21, Address(r8, r28, (Address::ScaleFactor)1, -0x4c8c2946)); // cmovb r21, qword ptr [r8+r28*2-0x4c8c2946] IID558 - __ cmovq(Assembler::Condition::aboveEqual, r12, Address(r26, r20, (Address::ScaleFactor)0, -0x264df89c)); // cmovae r12, qword ptr [r26+r20*1-0x264df89c] IID559 - __ cmovq(Assembler::Condition::zero, r17, Address(r28, r9, (Address::ScaleFactor)2, +0x3497196b)); // cmovz r17, qword ptr [r28+r9*4+0x3497196b] IID560 - __ cmovq(Assembler::Condition::notZero, r13, Address(r15, r23, (Address::ScaleFactor)1, -0x27a30999)); // cmovnz r13, qword ptr [r15+r23*2-0x27a30999] IID561 - __ cmovq(Assembler::Condition::belowEqual, r22, Address(r22, +0xf39ab05)); // cmovbe r22, qword ptr [r22+0xf39ab05] IID562 - __ cmovq(Assembler::Condition::above, rcx, Address(r22, r26, (Address::ScaleFactor)3, -0x48c954c)); // cmova rcx, qword ptr [r22+r26*8-0x48c954c] IID563 - __ cmovq(Assembler::Condition::negative, r25, Address(r19, r21, (Address::ScaleFactor)0, +0xe405b0b)); // cmovs r25, qword ptr [r19+r21*1+0xe405b0b] IID564 - __ cmovq(Assembler::Condition::positive, r12, Address(r19, r29, (Address::ScaleFactor)3, -0x7762044b)); // cmovns r12, qword ptr [r19+r29*8-0x7762044b] IID565 - __ cmovq(Assembler::Condition::parity, rbx, Address(r30, r10, (Address::ScaleFactor)1, -0x19798323)); // cmovp rbx, qword ptr [r30+r10*2-0x19798323] IID566 - __ cmovq(Assembler::Condition::noParity, r21, Address(r24, r31, (Address::ScaleFactor)0, -0x5731652b)); // cmovnp r21, qword ptr [r24+r31*1-0x5731652b] IID567 - __ cmovq(Assembler::Condition::less, r18, Address(r8, r10, (Address::ScaleFactor)1, -0x5613be89)); // cmovl r18, qword ptr [r8+r10*2-0x5613be89] IID568 - __ cmovq(Assembler::Condition::greaterEqual, r28, Address(r21, r21, (Address::ScaleFactor)3, +0x65a0fdc4)); // cmovge r28, qword ptr [r21+r21*8+0x65a0fdc4] IID569 - __ cmovq(Assembler::Condition::lessEqual, r23, Address(r11, r18, (Address::ScaleFactor)0, -0x1d1af10c)); // cmovle r23, qword ptr [r11+r18*1-0x1d1af10c] IID570 - __ cmovq(Assembler::Condition::greater, r22, Address(r18, r12, (Address::ScaleFactor)1, +0x1a5f1c38)); // cmovg r22, qword ptr [r18+r12*2+0x1a5f1c38] IID571 - __ call(r23); // call r23 IID572 - __ divq(r30); // div r30 IID573 - __ idivq(r19); // idiv r19 IID574 - __ imulq(r9); // imul r9 IID575 - __ mulq(r13); // mul r13 IID576 - __ negq(r16); // neg r16 IID577 - __ notq(r29); // not r29 IID578 - __ rolq(rcx); // rol rcx, cl IID579 - __ rorq(r25); // ror r25, cl IID580 - __ sarq(r8); // sar r8, cl IID581 - __ salq(r27); // sal r27, cl IID582 - __ shlq(r30); // shl r30, cl IID583 - __ shrq(r23); // shr r23, cl IID584 - __ incrementq(rbx); // inc rbx IID585 - __ decrementq(r14); // dec r14 IID586 - __ pushp(r21); // pushp r21 IID587 - __ popp(r21); // popp r21 IID588 - __ call(Address(r20, r21, (Address::ScaleFactor)1, +0x56c6af2f)); // call qword ptr [r20+r21*2+0x56c6af2f] IID589 - __ mulq(Address(r31, r19, (Address::ScaleFactor)3, -0x1b4eb23)); // mul qword ptr [r31+r19*8-0x1b4eb23] IID590 - __ negq(Address(r27, r27, (Address::ScaleFactor)0, -0x58dbfc1f)); // neg qword ptr [r27+r27*1-0x58dbfc1f] IID591 - __ sarq(Address(rbx, r22, (Address::ScaleFactor)2, -0x606349d1)); // sar qword ptr [rbx+r22*4-0x606349d1], cl IID592 - __ salq(Address(r26, r23, (Address::ScaleFactor)3, +0xb95a079)); // sal qword ptr [r26+r23*8+0xb95a079], cl IID593 - __ shrq(Address(r14, r26, (Address::ScaleFactor)0, +0x3544e09)); // shr qword ptr [r14+r26*1+0x3544e09], cl IID594 - __ incrementq(Address(r27, rdx, (Address::ScaleFactor)0, +0x120b3250)); // inc qword ptr [r27+rdx*1+0x120b3250] IID595 - __ decrementq(Address(r9, r25, (Address::ScaleFactor)2, -0x34aaeccb)); // dec qword ptr [r9+r25*4-0x34aaeccb] IID596 - __ imulq(r20, Address(r16, r28, (Address::ScaleFactor)1, -0x59de05a5), 1048576); // imul r20, qword ptr [r16+r28*2-0x59de05a5], 1048576 IID597 - __ imulq(r17, r23, 256); // imul r17, r23, 256 IID598 - __ shldq(r19, r11, 8); // shld r19, r11, 8 IID599 - __ shrdq(r28, r10, 8); // shrd r28, r10, 8 IID600 - __ pop2(r29, r26); // {load}pop2 r26, r29 IID601 - __ pop2p(r22, r10); // {load}pop2p r10, r22 IID602 - __ push2(r25, r30); // {load}push2 r30, r25 IID603 - __ push2p(r28, r15); // {load}push2p r15, r28 IID604 - __ movzbq(r11, Address(r29, r19, (Address::ScaleFactor)2, -0x12368d34)); // movzx r11, byte ptr [r29+r19*4-0x12368d34] IID605 - __ movzwq(r14, Address(r8, r30, (Address::ScaleFactor)2, -0x4a9392de)); // movzx r14, word ptr [r8+r30*4-0x4a9392de] IID606 - __ movsbq(r28, Address(r23, r15, (Address::ScaleFactor)0, +0x6189cb54)); // movsx r28, byte ptr [r23+r15*1+0x6189cb54] IID607 - __ movswq(r28, Address(rbx, r23, (Address::ScaleFactor)3, -0x2de86561)); // movsx r28, word ptr [rbx+r23*8-0x2de86561] IID608 - __ movzbq(r11, rcx); // movzx r11, cl IID609 - __ movzwq(r30, r15); // movzx r30, r15w IID610 - __ movsbq(r14, rcx); // movsx r14, cl IID611 - __ movswq(r23, r9); // movsx r23, r9w IID612 - __ cmpxchgq(r12, Address(r13, r10, (Address::ScaleFactor)1, -0x7c62c3a)); // cmpxchg qword ptr [r13+r10*2-0x7c62c3a], r12 IID613 - __ eidivq(rcx, false); // {EVEX}idiv rcx IID614 - __ eidivq(r15, true); // {NF}idiv r15 IID615 - __ edivq(r23, false); // {EVEX}div r23 IID616 - __ edivq(r24, true); // {NF}div r24 IID617 - __ eimulq(r27, false); // {EVEX}imul r27 IID618 - __ eimulq(r30, true); // {NF}imul r30 IID619 - __ emulq(r12, false); // {EVEX}mul r12 IID620 - __ emulq(rcx, true); // {NF}mul rcx IID621 - __ emulq(Address(r13, r9, (Address::ScaleFactor)3, -0x226aab94), false); // {EVEX}mul qword ptr [r13+r9*8-0x226aab94] IID622 - __ emulq(Address(r13, r24, (Address::ScaleFactor)3, -0x286c7605), true); // {NF}mul qword ptr [r13+r24*8-0x286c7605] IID623 - __ eimulq(r21, r30, false); // {EVEX}imul r21, r30 IID624 - __ eimulq(r17, r17, false); // imul r17 IID625 - __ eimulq(r29, r12, true); // {NF}imul r29, r12 IID626 - __ eimulq(r30, r30, true); // {NF}imul r30, r30 IID627 - __ elzcntq(r24, r15, false); // {EVEX}lzcnt r24, r15 IID628 - __ elzcntq(r25, r25, false); // {EVEX}lzcnt r25, r25 IID629 - __ elzcntq(r25, r21, true); // {NF}lzcnt r25, r21 IID630 - __ elzcntq(r22, r22, true); // {NF}lzcnt r22, r22 IID631 - __ enegq(r17, r30, false); // {EVEX}neg r17, r30 IID632 - __ enegq(r17, r17, false); // neg r17 IID633 - __ enegq(r31, r17, true); // {NF}neg r31, r17 IID634 - __ enegq(r29, r29, true); // {NF}neg r29, r29 IID635 - __ enotq(r10, r9); // {EVEX}not r10, r9 IID636 - __ enotq(r24, r24); // not r24 IID637 - __ epopcntq(r28, r15, false); // {EVEX}popcnt r28, r15 IID638 - __ epopcntq(r10, r10, false); // {EVEX}popcnt r10, r10 IID639 - __ epopcntq(r27, r30, true); // {NF}popcnt r27, r30 IID640 - __ epopcntq(r28, r28, true); // {NF}popcnt r28, r28 IID641 - __ erolq(r28, r14, false); // {EVEX}rol r28, r14, cl IID642 - __ erolq(r23, r23, false); // rol r23, cl IID643 - __ erolq(r23, r24, true); // {NF}rol r23, r24, cl IID644 - __ erolq(r21, r21, true); // {NF}rol r21, r21, cl IID645 - __ erorq(r31, r22, false); // {EVEX}ror r31, r22, cl IID646 - __ erorq(r28, r28, false); // ror r28, cl IID647 - __ erorq(r17, r10, true); // {NF}ror r17, r10, cl IID648 - __ erorq(r9, r9, true); // {NF}ror r9, r9, cl IID649 - __ esalq(r29, r30, false); // {EVEX}sal r29, r30, cl IID650 - __ esalq(r11, r11, false); // sal r11, cl IID651 - __ esalq(r26, r11, true); // {NF}sal r26, r11, cl IID652 - __ esalq(r16, r16, true); // {NF}sal r16, r16, cl IID653 - __ esarq(rbx, r15, false); // {EVEX}sar rbx, r15, cl IID654 - __ esarq(r14, r14, false); // sar r14, cl IID655 - __ esarq(r25, r16, true); // {NF}sar r25, r16, cl IID656 - __ esarq(r8, r8, true); // {NF}sar r8, r8, cl IID657 - __ edecq(r11, r13, false); // {EVEX}dec r11, r13 IID658 - __ edecq(rcx, rcx, false); // dec rcx IID659 - __ edecq(r21, r18, true); // {NF}dec r21, r18 IID660 - __ edecq(r28, r28, true); // {NF}dec r28, r28 IID661 - __ eincq(r16, r16, false); // inc r16 IID662 - __ eincq(r29, r29, false); // inc r29 IID663 - __ eincq(r18, r9, true); // {NF}inc r18, r9 IID664 - __ eincq(r19, r19, true); // {NF}inc r19, r19 IID665 - __ eshlq(r19, r18, false); // {EVEX}shl r19, r18, cl IID666 - __ eshlq(r8, r8, false); // shl r8, cl IID667 - __ eshlq(r12, r15, true); // {NF}shl r12, r15, cl IID668 - __ eshlq(r29, r29, true); // {NF}shl r29, r29, cl IID669 - __ eshrq(r28, r24, false); // {EVEX}shr r28, r24, cl IID670 - __ eshrq(r19, r19, false); // shr r19, cl IID671 - __ eshrq(r8, r28, true); // {NF}shr r8, r28, cl IID672 - __ eshrq(r17, r17, true); // {NF}shr r17, r17, cl IID673 - __ etzcntq(r28, r16, false); // {EVEX}tzcnt r28, r16 IID674 - __ etzcntq(r14, r14, false); // {EVEX}tzcnt r14, r14 IID675 - __ etzcntq(r12, r31, true); // {NF}tzcnt r12, r31 IID676 - __ etzcntq(r14, r14, true); // {NF}tzcnt r14, r14 IID677 - __ eimulq(r31, Address(r13, -0x69c4b352), false); // {EVEX}imul r31, qword ptr [r13-0x69c4b352] IID678 - __ eimulq(r17, Address(r18, -0x60ab1105), true); // {NF}imul r17, qword ptr [r18-0x60ab1105] IID679 - __ elzcntq(r27, Address(r14, r25, (Address::ScaleFactor)2, +0x2798bf83), false); // {EVEX}lzcnt r27, qword ptr [r14+r25*4+0x2798bf83] IID680 - __ elzcntq(r23, Address(r10, r11, (Address::ScaleFactor)0, -0x378e635d), true); // {NF}lzcnt r23, qword ptr [r10+r11*1-0x378e635d] IID681 - __ enegq(rcx, Address(r19, r9, (Address::ScaleFactor)3, -0x6847d440), false); // {EVEX}neg rcx, qword ptr [r19+r9*8-0x6847d440] IID682 - __ enegq(rcx, Address(rbx, rcx, (Address::ScaleFactor)0, +0x6f92d38d), true); // {NF}neg rcx, qword ptr [rbx+rcx*1+0x6f92d38d] IID683 - __ epopcntq(r20, Address(r12, -0x2a8b27d6), false); // {EVEX}popcnt r20, qword ptr [r12-0x2a8b27d6] IID684 - __ epopcntq(r31, Address(r30, +0x4603f6d0), true); // {NF}popcnt r31, qword ptr [r30+0x4603f6d0] IID685 - __ esalq(rbx, Address(r24, +0x567d06f9), false); // {EVEX}sal rbx, qword ptr [r24+0x567d06f9], cl IID686 - __ esalq(r12, Address(r24, r28, (Address::ScaleFactor)0, -0x1c4c584e), true); // {NF}sal r12, qword ptr [r24+r28*1-0x1c4c584e], cl IID687 - __ esarq(r12, Address(r23, r24, (Address::ScaleFactor)2, -0x3157bcba), false); // {EVEX}sar r12, qword ptr [r23+r24*4-0x3157bcba], cl IID688 - __ esarq(r8, Address(r14, r24, (Address::ScaleFactor)2, -0x714290a5), true); // {NF}sar r8, qword ptr [r14+r24*4-0x714290a5], cl IID689 - __ edecq(r23, Address(r8, r15, (Address::ScaleFactor)1, -0x5ae272dd), false); // {EVEX}dec r23, qword ptr [r8+r15*2-0x5ae272dd] IID690 - __ edecq(r13, Address(r29, r9, (Address::ScaleFactor)3, -0x5b5174a9), true); // {NF}dec r13, qword ptr [r29+r9*8-0x5b5174a9] IID691 - __ eincq(r11, Address(r21, r31, (Address::ScaleFactor)3, -0x2176b4dc), false); // {EVEX}inc r11, qword ptr [r21+r31*8-0x2176b4dc] IID692 - __ eincq(r13, Address(rcx, r16, (Address::ScaleFactor)0, -0x36b448c9), true); // {NF}inc r13, qword ptr [rcx+r16*1-0x36b448c9] IID693 - __ eshrq(r26, Address(r25, rcx, (Address::ScaleFactor)2, -0x5f894993), false); // {EVEX}shr r26, qword ptr [r25+rcx*4-0x5f894993], cl IID694 - __ eshrq(r25, Address(r9, +0x51798d21), true); // {NF}shr r25, qword ptr [r9+0x51798d21], cl IID695 - __ etzcntq(r28, Address(r13, r26, (Address::ScaleFactor)2, +0x207196f6), false); // {EVEX}tzcnt r28, qword ptr [r13+r26*4+0x207196f6] IID696 - __ etzcntq(rbx, Address(r19, r13, (Address::ScaleFactor)0, -0x24d937d5), true); // {NF}tzcnt rbx, qword ptr [r19+r13*1-0x24d937d5] IID697 - __ eaddq(r17, Address(r30, +0x3935ccff), r31, false); // {EVEX}add r17, qword ptr [r30+0x3935ccff], r31 IID698 - __ eaddq(r14, Address(r27, r10, (Address::ScaleFactor)2, -0x34ad9bab), r14, false); // {EVEX}add r14, qword ptr [r27+r10*4-0x34ad9bab], r14 IID699 - __ eaddq(r18, Address(r20, r23, (Address::ScaleFactor)0, +0x5ad3ed4b), r30, true); // {NF}add r18, qword ptr [r20+r23*1+0x5ad3ed4b], r30 IID700 - __ eaddq(r20, Address(rdx, -0x322a99e5), r20, true); // {NF}add r20, qword ptr [rdx-0x322a99e5], r20 IID701 - __ eandq(r31, Address(rbx, r27, (Address::ScaleFactor)3, +0x4ce247d2), r17, false); // {EVEX}and r31, qword ptr [rbx+r27*8+0x4ce247d2], r17 IID702 - __ eandq(r30, Address(r18, r19, (Address::ScaleFactor)1, -0x4ee3d14), r30, false); // {EVEX}and r30, qword ptr [r18+r19*2-0x4ee3d14], r30 IID703 - __ eandq(r28, Address(r11, rbx, (Address::ScaleFactor)3, -0x28994bbf), r24, true); // {NF}and r28, qword ptr [r11+rbx*8-0x28994bbf], r24 IID704 - __ eandq(r30, Address(r22, +0x7d21c24), r30, true); // {NF}and r30, qword ptr [r22+0x7d21c24], r30 IID705 - __ eorq(r26, Address(r15, r19, (Address::ScaleFactor)3, +0x58c21792), r20, false); // {EVEX}or r26, qword ptr [r15+r19*8+0x58c21792], r20 IID706 - __ eorq(r13, Address(r10, r27, (Address::ScaleFactor)2, -0x2c70d333), r13, false); // {EVEX}or r13, qword ptr [r10+r27*4-0x2c70d333], r13 IID707 - __ eorq(rbx, Address(r12, rbx, (Address::ScaleFactor)0, -0x1fb0f1bc), r26, true); // {NF}or rbx, qword ptr [r12+rbx*1-0x1fb0f1bc], r26 IID708 - __ eorq(r31, Address(r27, r31, (Address::ScaleFactor)1, +0x28d1756), r31, true); // {NF}or r31, qword ptr [r27+r31*2+0x28d1756], r31 IID709 - __ esubq(r24, Address(r28, r23, (Address::ScaleFactor)1, +0x6980f610), r27, false); // {EVEX}sub r24, qword ptr [r28+r23*2+0x6980f610], r27 IID710 - __ esubq(r15, Address(r11, r30, (Address::ScaleFactor)3, -0x49777e7), r15, false); // {EVEX}sub r15, qword ptr [r11+r30*8-0x49777e7], r15 IID711 - __ esubq(r17, Address(r25, r13, (Address::ScaleFactor)2, +0x31619e46), r31, true); // {NF}sub r17, qword ptr [r25+r13*4+0x31619e46], r31 IID712 - __ esubq(r18, Address(r11, r10, (Address::ScaleFactor)2, +0x1922861a), r18, true); // {NF}sub r18, qword ptr [r11+r10*4+0x1922861a], r18 IID713 - __ exorq(rbx, Address(r11, -0x4716d420), r21, false); // {EVEX}xor rbx, qword ptr [r11-0x4716d420], r21 IID714 - __ exorq(r8, Address(rdx, r9, (Address::ScaleFactor)2, -0x4cfe39c), r8, false); // {EVEX}xor r8, qword ptr [rdx+r9*4-0x4cfe39c], r8 IID715 - __ exorq(r16, Address(r14, r27, (Address::ScaleFactor)0, +0x7c6654d9), r25, true); // {NF}xor r16, qword ptr [r14+r27*1+0x7c6654d9], r25 IID716 - __ exorq(r29, Address(r15, -0x5efab479), r29, true); // {NF}xor r29, qword ptr [r15-0x5efab479], r29 IID717 - __ eaddq(r19, Address(r13, r22, (Address::ScaleFactor)2, +0x68b64559), 16777216, false); // {EVEX}add r19, qword ptr [r13+r22*4+0x68b64559], 16777216 IID718 - __ eaddq(r16, Address(r13, r31, (Address::ScaleFactor)3, -0x65143af5), 1, true); // {NF}add r16, qword ptr [r13+r31*8-0x65143af5], 1 IID719 - __ eandq(r31, Address(r24, r13, (Address::ScaleFactor)1, -0x25b16a0e), 1, false); // {EVEX}and r31, qword ptr [r24+r13*2-0x25b16a0e], 1 IID720 - __ eandq(r11, Address(r28, -0xf6d4b26), 65536, true); // {NF}and r11, qword ptr [r28-0xf6d4b26], 65536 IID721 - __ eimulq(rcx, Address(r18, r10, (Address::ScaleFactor)0, +0x46ec6da1), 16777216, false); // {EVEX}imul rcx, qword ptr [r18+r10*1+0x46ec6da1], 16777216 IID722 - __ eimulq(r15, Address(r9, r10, (Address::ScaleFactor)3, -0x7fc36af3), 16, true); // {NF}imul r15, qword ptr [r9+r10*8-0x7fc36af3], 16 IID723 - __ eorq(r17, Address(r27, r30, (Address::ScaleFactor)0, +0x1b4cda2c), 1, false); // {EVEX}or r17, qword ptr [r27+r30*1+0x1b4cda2c], 1 IID724 - __ eorq(rdx, Address(r25, r14, (Address::ScaleFactor)2, -0x59aa6b85), 4096, true); // {NF}or rdx, qword ptr [r25+r14*4-0x59aa6b85], 4096 IID725 - __ esalq(r17, Address(r26, r21, (Address::ScaleFactor)1, -0x6ab1f15f), 8, false); // {EVEX}sal r17, qword ptr [r26+r21*2-0x6ab1f15f], 8 IID726 - __ esalq(r12, Address(r22, r17, (Address::ScaleFactor)0, -0x43ac14ab), 2, true); // {NF}sal r12, qword ptr [r22+r17*1-0x43ac14ab], 2 IID727 - __ esarq(r29, Address(r18, r16, (Address::ScaleFactor)0, -0x59dc0c61), 4, false); // {EVEX}sar r29, qword ptr [r18+r16*1-0x59dc0c61], 4 IID728 - __ esarq(r16, Address(r11, -0x7bdd314), 4, true); // {NF}sar r16, qword ptr [r11-0x7bdd314], 4 IID729 - __ eshrq(r26, Address(r23, r27, (Address::ScaleFactor)3, -0x55b92314), 16, false); // {EVEX}shr r26, qword ptr [r23+r27*8-0x55b92314], 16 IID730 - __ eshrq(r23, Address(r16, r29, (Address::ScaleFactor)1, +0x71311a1d), 2, true); // {NF}shr r23, qword ptr [r16+r29*2+0x71311a1d], 2 IID731 - __ esubq(r25, Address(r9, -0x9532bac), 1048576, false); // {EVEX}sub r25, qword ptr [r9-0x9532bac], 1048576 IID732 - __ esubq(r17, Address(r8, r23, (Address::ScaleFactor)0, +0x55d06ca2), 1048576, true); // {NF}sub r17, qword ptr [r8+r23*1+0x55d06ca2], 1048576 IID733 - __ exorq(r29, Address(r9, r24, (Address::ScaleFactor)0, -0x2c141c1), 1048576, false); // {EVEX}xor r29, qword ptr [r9+r24*1-0x2c141c1], 1048576 IID734 - __ exorq(r28, Address(r22, r19, (Address::ScaleFactor)1, -0x2d9d9abd), 16, true); // {NF}xor r28, qword ptr [r22+r19*2-0x2d9d9abd], 16 IID735 - __ eaddq(r22, r14, 16, false); // {EVEX}add r22, r14, 16 IID736 - __ eaddq(rax, r12, 16, false); // {EVEX}add rax, r12, 16 IID737 - __ eaddq(r24, r24, 65536, false); // add r24, 65536 IID738 - __ eaddq(r21, rbx, 65536, true); // {NF}add r21, rbx, 65536 IID739 - __ eaddq(rax, rbx, 65536, true); // {NF}add rax, rbx, 65536 IID740 - __ eaddq(r24, r24, 65536, true); // {NF}add r24, r24, 65536 IID741 - __ eandq(r21, r27, 16777216, false); // {EVEX}and r21, r27, 16777216 IID742 - __ eandq(rax, r27, 16777216, false); // {EVEX}and rax, r27, 16777216 IID743 - __ eandq(r24, r24, 65536, false); // and r24, 65536 IID744 - __ eandq(r13, r31, 1048576, true); // {NF}and r13, r31, 1048576 IID745 - __ eandq(rax, r21, 1048576, true); // {NF}and rax, r21, 1048576 IID746 - __ eandq(r30, r30, 1048576, true); // {NF}and r30, r30, 1048576 IID747 - __ eimulq(r8, r13, 268435456, false); // {EVEX}imul r8, r13, 268435456 IID748 - __ eimulq(rax, r31, 268435456, false); // {EVEX}imul rax, r31, 268435456 IID749 - __ eimulq(r13, r13, 65536, false); // {EVEX}imul r13, r13, 65536 IID750 - __ eimulq(r14, r29, 1048576, true); // {NF}imul r14, r29, 1048576 IID751 - __ eimulq(rax, r22, 1048576, true); // {NF}imul rax, r22, 1048576 IID752 - __ eimulq(r8, r8, 268435456, true); // {NF}imul r8, r8, 268435456 IID753 - __ eorq(r30, r15, 4096, false); // {EVEX}or r30, r15, 4096 IID754 - __ eorq(rax, r28, 4096, false); // {EVEX}or rax, r28, 4096 IID755 - __ eorq(r26, r26, 1048576, false); // or r26, 1048576 IID756 - __ eorq(r16, r12, 268435456, true); // {NF}or r16, r12, 268435456 IID757 - __ eorq(rax, r9, 268435456, true); // {NF}or rax, r9, 268435456 IID758 - __ eorq(r23, r23, 256, true); // {NF}or r23, r23, 256 IID759 - __ erclq(r15, r9, 16); // {EVEX}rcl r15, r9, 16 IID760 - __ erclq(rax, r8, 16); // {EVEX}rcl rax, r8, 16 IID761 - __ erclq(r25, r25, 1); // rcl r25, 1 IID762 - __ erolq(r9, r17, 16, false); // {EVEX}rol r9, r17, 16 IID763 - __ erolq(rax, r20, 16, false); // {EVEX}rol rax, r20, 16 IID764 - __ erolq(r27, r27, 1, false); // rol r27, 1 IID765 - __ erolq(r20, r31, 1, true); // {NF}rol r20, r31, 1 IID766 - __ erolq(rax, r18, 1, true); // {NF}rol rax, r18, 1 IID767 - __ erolq(r28, r28, 16, true); // {NF}rol r28, r28, 16 IID768 - __ erorq(r26, r18, 16, false); // {EVEX}ror r26, r18, 16 IID769 - __ erorq(rax, r24, 16, false); // {EVEX}ror rax, r24, 16 IID770 - __ erorq(r22, r22, 16, false); // ror r22, 16 IID771 - __ erorq(r27, r29, 1, true); // {NF}ror r27, r29, 1 IID772 - __ erorq(rax, r18, 1, true); // {NF}ror rax, r18, 1 IID773 - __ erorq(r21, r21, 1, true); // {NF}ror r21, r21, 1 IID774 - __ esalq(r12, rcx, 2, false); // {EVEX}sal r12, rcx, 2 IID775 - __ esalq(rax, r24, 2, false); // {EVEX}sal rax, r24, 2 IID776 - __ esalq(r22, r22, 8, false); // sal r22, 8 IID777 - __ esalq(r17, r23, 8, true); // {NF}sal r17, r23, 8 IID778 - __ esalq(rax, r27, 8, true); // {NF}sal rax, r27, 8 IID779 - __ esalq(r23, r23, 1, true); // {NF}sal r23, r23, 1 IID780 - __ esarq(r8, r25, 16, false); // {EVEX}sar r8, r25, 16 IID781 - __ esarq(rax, r23, 16, false); // {EVEX}sar rax, r23, 16 IID782 - __ esarq(r9, r9, 4, false); // sar r9, 4 IID783 - __ esarq(r22, r13, 1, true); // {NF}sar r22, r13, 1 IID784 - __ esarq(rax, r11, 1, true); // {NF}sar rax, r11, 1 IID785 - __ esarq(r12, r12, 2, true); // {NF}sar r12, r12, 2 IID786 - __ eshlq(rcx, r30, 8, false); // {EVEX}shl rcx, r30, 8 IID787 - __ eshlq(rax, r19, 8, false); // {EVEX}shl rax, r19, 8 IID788 - __ eshlq(r13, r13, 2, false); // shl r13, 2 IID789 - __ eshlq(r18, r11, 8, true); // {NF}shl r18, r11, 8 IID790 - __ eshlq(rax, r9, 8, true); // {NF}shl rax, r9, 8 IID791 - __ eshlq(rcx, rcx, 16, true); // {NF}shl rcx, rcx, 16 IID792 - __ eshrq(r10, r22, 4, false); // {EVEX}shr r10, r22, 4 IID793 - __ eshrq(rax, r9, 4, false); // {EVEX}shr rax, r9, 4 IID794 - __ eshrq(r12, r12, 2, false); // shr r12, 2 IID795 - __ eshrq(r26, r31, 8, true); // {NF}shr r26, r31, 8 IID796 - __ eshrq(rax, r12, 8, true); // {NF}shr rax, r12, 8 IID797 - __ eshrq(r28, r28, 1, true); // {NF}shr r28, r28, 1 IID798 - __ esubq(r15, r30, 65536, false); // {EVEX}sub r15, r30, 65536 IID799 - __ esubq(rax, rcx, 65536, false); // {EVEX}sub rax, rcx, 65536 IID800 - __ esubq(r26, r26, 16, false); // sub r26, 16 IID801 - __ esubq(r12, r14, 1, true); // {NF}sub r12, r14, 1 IID802 - __ esubq(rax, r21, 1, true); // {NF}sub rax, r21, 1 IID803 - __ esubq(r20, r20, 1048576, true); // {NF}sub r20, r20, 1048576 IID804 - __ exorq(r11, rbx, 16777216, false); // {EVEX}xor r11, rbx, 16777216 IID805 - __ exorq(rax, r23, 16777216, false); // {EVEX}xor rax, r23, 16777216 IID806 - __ exorq(r31, r31, 268435456, false); // xor r31, 268435456 IID807 - __ exorq(r29, r28, 4096, true); // {NF}xor r29, r28, 4096 IID808 - __ exorq(rax, r19, 4096, true); // {NF}xor rax, r19, 4096 IID809 - __ exorq(rdx, rdx, 268435456, true); // {NF}xor rdx, rdx, 268435456 IID810 - __ eorq_imm32(rdx, rdx, 1048576, false); // or rdx, 1048576 IID811 - __ eorq_imm32(rax, r22, 1048576, false); // {EVEX}or rax, r22, 1048576 IID812 - __ eorq_imm32(r29, r29, 1048576, false); // or r29, 1048576 IID813 - __ eorq_imm32(r17, rcx, 4194304, false); // {EVEX}or r17, rcx, 4194304 IID814 - __ eorq_imm32(rax, r25, 4194304, false); // {EVEX}or rax, r25, 4194304 IID815 - __ eorq_imm32(r27, r27, 1073741824, false); // or r27, 1073741824 IID816 - __ esubq_imm32(r16, r19, 4194304, false); // {EVEX}sub r16, r19, 4194304 IID817 - __ esubq_imm32(rax, r31, 4194304, false); // {EVEX}sub rax, r31, 4194304 IID818 - __ esubq_imm32(r26, r26, 262144, false); // sub r26, 262144 IID819 - __ esubq_imm32(r17, r22, 1073741824, true); // {NF}sub r17, r22, 1073741824 IID820 - __ esubq_imm32(rax, r18, 1073741824, true); // {NF}sub rax, r18, 1073741824 IID821 - __ esubq_imm32(r23, r23, 268435456, true); // {NF}sub r23, r23, 268435456 IID822 - __ eaddq(r13, r30, Address(r24, r19, (Address::ScaleFactor)1, +0x56ea3a3b), false); // {EVEX}add r13, r30, qword ptr [r24+r19*2+0x56ea3a3b] IID823 - __ eaddq(r29, r15, Address(r26, r27, (Address::ScaleFactor)3, -0x4b113958), true); // {NF}add r29, r15, qword ptr [r26+r27*8-0x4b113958] IID824 - __ eandq(r12, r30, Address(r31, -0x46103c74), false); // {EVEX}and r12, r30, qword ptr [r31-0x46103c74] IID825 - __ eandq(r27, r10, Address(r22, r25, (Address::ScaleFactor)1, +0x6a1ebee5), true); // {NF}and r27, r10, qword ptr [r22+r25*2+0x6a1ebee5] IID826 - __ eorq(r30, r26, Address(r11, r18, (Address::ScaleFactor)2, -0x2b9fff29), false); // {EVEX}or r30, r26, qword ptr [r11+r18*4-0x2b9fff29] IID827 - __ eorq(r9, r12, Address(r18, r17, (Address::ScaleFactor)0, +0xb4859f6), true); // {NF}or r9, r12, qword ptr [r18+r17*1+0xb4859f6] IID828 - __ eimulq(rdx, r17, Address(r24, rdx, (Address::ScaleFactor)2, +0x3d284cd8), false); // {EVEX}imul rdx, r17, qword ptr [r24+rdx*4+0x3d284cd8] IID829 - __ eimulq(r29, r26, Address(r30, r12, (Address::ScaleFactor)1, +0x6e813124), true); // {NF}imul r29, r26, qword ptr [r30+r12*2+0x6e813124] IID830 - __ esubq(rbx, r13, Address(r22, -0x702a289e), false); // {EVEX}sub rbx, r13, qword ptr [r22-0x702a289e] IID831 - __ esubq(r23, r29, Address(r25, rdx, (Address::ScaleFactor)0, -0x6252a7ed), true); // {NF}sub r23, r29, qword ptr [r25+rdx*1-0x6252a7ed] IID832 - __ exorq(r8, r18, Address(r19, r14, (Address::ScaleFactor)2, -0xebfa697), false); // {EVEX}xor r8, r18, qword ptr [r19+r14*4-0xebfa697] IID833 - __ exorq(r10, r28, Address(r26, +0x168381ca), true); // {NF}xor r10, r28, qword ptr [r26+0x168381ca] IID834 - __ eaddq(rcx, r18, r8, false); // {load}{EVEX}add rcx, r18, r8 IID835 - __ eaddq(rcx, rcx, r14, false); // {load}add rcx, r14 IID836 - __ eaddq(r23, r10, r16, true); // {load}{NF}add r23, r10, r16 IID837 - __ eaddq(r11, r11, r24, true); // {load}{NF}add r11, r11, r24 IID838 - __ eadcxq(r9, r18, rdx); // {load}{EVEX}adcx r9, r18, rdx IID839 - __ eadcxq(r8, r8, r15); // {load}adcx r8, r15 IID840 - __ eadoxq(r15, r22, r26); // {load}{EVEX}adox r15, r22, r26 IID841 - __ eadoxq(r11, r11, rdx); // {load}adox r11, rdx IID842 - __ eandq(r19, rdx, r22, false); // {load}{EVEX}and r19, rdx, r22 IID843 - __ eandq(r29, r29, r17, false); // {load}and r29, r17 IID844 - __ eandq(r23, r27, r15, true); // {load}{NF}and r23, r27, r15 IID845 - __ eandq(r9, r9, r13, true); // {load}{NF}and r9, r9, r13 IID846 - __ eimulq(r18, r15, r16, false); // {load}{EVEX}imul r18, r15, r16 IID847 - __ eimulq(rcx, rcx, r17, false); // {load}imul rcx, r17 IID848 - __ eimulq(r23, r12, r20, true); // {load}{NF}imul r23, r12, r20 IID849 - __ eimulq(r10, r10, r9, true); // {load}{NF}imul r10, r10, r9 IID850 - __ eorq(rdx, r19, r14, false); // {load}{EVEX}or rdx, r19, r14 IID851 - __ eorq(rcx, rcx, r13, false); // {load}or rcx, r13 IID852 - __ eorq(r9, r25, r29, true); // {load}{NF}or r9, r25, r29 IID853 - __ eorq(rdx, rdx, r25, true); // {load}{NF}or rdx, rdx, r25 IID854 - __ esubq(r23, r8, r16, false); // {load}{EVEX}sub r23, r8, r16 IID855 - __ esubq(r13, r13, r13, false); // {load}sub r13, r13 IID856 - __ esubq(r19, r12, r15, true); // {load}{NF}sub r19, r12, r15 IID857 - __ esubq(r9, r9, rdx, true); // {load}{NF}sub r9, r9, rdx IID858 - __ exorq(r13, r16, r31, false); // {load}{EVEX}xor r13, r16, r31 IID859 - __ exorq(r17, r17, r30, false); // {load}xor r17, r30 IID860 - __ exorq(r19, r30, r20, true); // {load}{NF}xor r19, r30, r20 IID861 - __ exorq(r31, r31, r13, true); // {load}{NF}xor r31, r31, r13 IID862 - __ eshldq(r22, r10, r13, 4, false); // {EVEX}shld r22, r10, r13, 4 IID863 - __ eshldq(r24, r24, r21, 16, false); // shld r24, r21, 16 IID864 - __ eshldq(r20, r13, r27, 16, true); // {NF}shld r20, r13, r27, 16 IID865 - __ eshldq(r31, r31, r19, 2, true); // {NF}shld r31, r31, r19, 2 IID866 - __ eshrdq(r30, r20, r11, 8, false); // {EVEX}shrd r30, r20, r11, 8 IID867 - __ eshrdq(rdx, rdx, r15, 1, false); // shrd rdx, r15, 1 IID868 - __ eshrdq(r28, r30, r14, 2, true); // {NF}shrd r28, r30, r14, 2 IID869 - __ eshrdq(r20, r20, r16, 1, true); // {NF}shrd r20, r20, r16, 1 IID870 - __ ecmovq (Assembler::Condition::overflow, r21, r17, r28); // cmovo r21, r17, r28 IID871 - __ ecmovq (Assembler::Condition::overflow, r15, r15, r30); // cmovo r15, r30 IID872 - __ ecmovq (Assembler::Condition::noOverflow, rcx, r15, r15); // cmovno rcx, r15, r15 IID873 - __ ecmovq (Assembler::Condition::noOverflow, rcx, rcx, r13); // cmovno rcx, r13 IID874 - __ ecmovq (Assembler::Condition::below, rdx, r26, r26); // cmovb rdx, r26, r26 IID875 - __ ecmovq (Assembler::Condition::below, r28, r28, r15); // cmovb r28, r15 IID876 - __ ecmovq (Assembler::Condition::aboveEqual, r8, rdx, rcx); // cmovae r8, rdx, rcx IID877 - __ ecmovq (Assembler::Condition::aboveEqual, rcx, rcx, rcx); // cmovae rcx, rcx IID878 - __ ecmovq (Assembler::Condition::zero, r10, r13, r9); // cmovz r10, r13, r9 IID879 - __ ecmovq (Assembler::Condition::zero, r14, r14, r27); // cmovz r14, r27 IID880 - __ ecmovq (Assembler::Condition::notZero, r11, r23, r9); // cmovnz r11, r23, r9 IID881 - __ ecmovq (Assembler::Condition::notZero, r11, r11, rdx); // cmovnz r11, rdx IID882 - __ ecmovq (Assembler::Condition::belowEqual, r31, r14, r25); // cmovbe r31, r14, r25 IID883 - __ ecmovq (Assembler::Condition::belowEqual, r20, r20, r12); // cmovbe r20, r12 IID884 - __ ecmovq (Assembler::Condition::above, rdx, r10, r28); // cmova rdx, r10, r28 IID885 - __ ecmovq (Assembler::Condition::above, r8, r8, r17); // cmova r8, r17 IID886 - __ ecmovq (Assembler::Condition::negative, rcx, r30, r23); // cmovs rcx, r30, r23 IID887 - __ ecmovq (Assembler::Condition::negative, r26, r26, r18); // cmovs r26, r18 IID888 - __ ecmovq (Assembler::Condition::positive, rdx, rbx, r18); // cmovns rdx, rbx, r18 IID889 - __ ecmovq (Assembler::Condition::positive, r21, r21, r13); // cmovns r21, r13 IID890 - __ ecmovq (Assembler::Condition::parity, r27, r28, r27); // cmovp r27, r28, r27 IID891 - __ ecmovq (Assembler::Condition::parity, r11, r11, r30); // cmovp r11, r30 IID892 - __ ecmovq (Assembler::Condition::noParity, rcx, r21, r18); // cmovnp rcx, r21, r18 IID893 - __ ecmovq (Assembler::Condition::noParity, rcx, rcx, r29); // cmovnp rcx, r29 IID894 - __ ecmovq (Assembler::Condition::less, rdx, r21, r12); // cmovl rdx, r21, r12 IID895 - __ ecmovq (Assembler::Condition::less, rdx, rdx, r26); // cmovl rdx, r26 IID896 - __ ecmovq (Assembler::Condition::greaterEqual, r17, rbx, r22); // cmovge r17, rbx, r22 IID897 - __ ecmovq (Assembler::Condition::greaterEqual, rdx, rdx, r11); // cmovge rdx, r11 IID898 - __ ecmovq (Assembler::Condition::lessEqual, rdx, r14, r8); // cmovle rdx, r14, r8 IID899 - __ ecmovq (Assembler::Condition::lessEqual, r14, r14, r8); // cmovle r14, r8 IID900 - __ ecmovq (Assembler::Condition::greater, r25, r29, r21); // cmovg r25, r29, r21 IID901 - __ ecmovq (Assembler::Condition::greater, r26, r26, r30); // cmovg r26, r30 IID902 - __ ecmovq (Assembler::Condition::overflow, r24, r21, Address(r13, r11, (Address::ScaleFactor)1, +0x439c521e)); // cmovo r24, r21, qword ptr [r13+r11*2+0x439c521e] IID903 - __ ecmovq (Assembler::Condition::noOverflow, r11, r18, Address(r29, r16, (Address::ScaleFactor)0, +0x632127f)); // cmovno r11, r18, qword ptr [r29+r16*1+0x632127f] IID904 - __ ecmovq (Assembler::Condition::below, r16, r8, Address(r8, r26, (Address::ScaleFactor)1, +0x10633def)); // cmovb r16, r8, qword ptr [r8+r26*2+0x10633def] IID905 - __ ecmovq (Assembler::Condition::aboveEqual, r13, r14, Address(r18, -0x54f69e38)); // cmovae r13, r14, qword ptr [r18-0x54f69e38] IID906 - __ ecmovq (Assembler::Condition::zero, r12, r8, Address(r31, r26, (Address::ScaleFactor)1, -0x7a1e447a)); // cmovz r12, r8, qword ptr [r31+r26*2-0x7a1e447a] IID907 - __ ecmovq (Assembler::Condition::notZero, r29, r29, Address(r19, r11, (Address::ScaleFactor)2, -0x35d82dd2)); // cmovnz r29, qword ptr [r19+r11*4-0x35d82dd2] IID908 - __ ecmovq (Assembler::Condition::belowEqual, rcx, r18, Address(r25, r28, (Address::ScaleFactor)0, +0x30be64a0)); // cmovbe rcx, r18, qword ptr [r25+r28*1+0x30be64a0] IID909 - __ ecmovq (Assembler::Condition::above, r28, r12, Address(r10, r16, (Address::ScaleFactor)1, -0x22b8fefa)); // cmova r28, r12, qword ptr [r10+r16*2-0x22b8fefa] IID910 - __ ecmovq (Assembler::Condition::negative, r11, r8, Address(rbx, r11, (Address::ScaleFactor)3, +0x25cc9e96)); // cmovs r11, r8, qword ptr [rbx+r11*8+0x25cc9e96] IID911 - __ ecmovq (Assembler::Condition::positive, r12, r27, Address(r11, -0xc2d70fe)); // cmovns r12, r27, qword ptr [r11-0xc2d70fe] IID912 - __ ecmovq (Assembler::Condition::parity, r8, r26, Address(r19, rbx, (Address::ScaleFactor)1, -0x486db7ea)); // cmovp r8, r26, qword ptr [r19+rbx*2-0x486db7ea] IID913 - __ ecmovq (Assembler::Condition::noParity, r30, r10, Address(r14, r18, (Address::ScaleFactor)3, +0x14884884)); // cmovnp r30, r10, qword ptr [r14+r18*8+0x14884884] IID914 - __ ecmovq (Assembler::Condition::less, r27, r8, Address(r29, r14, (Address::ScaleFactor)2, +0x92b7a8)); // cmovl r27, r8, qword ptr [r29+r14*4+0x92b7a8] IID915 - __ ecmovq (Assembler::Condition::greaterEqual, r14, r28, Address(r19, rdx, (Address::ScaleFactor)0, +0x9c2d45)); // cmovge r14, r28, qword ptr [r19+rdx*1+0x9c2d45] IID916 - __ ecmovq (Assembler::Condition::lessEqual, r25, r8, Address(rcx, r18, (Address::ScaleFactor)2, +0x6655c86b)); // cmovle r25, r8, qword ptr [rcx+r18*4+0x6655c86b] IID917 - __ ecmovq (Assembler::Condition::greater, r19, r21, Address(r10, r25, (Address::ScaleFactor)0, -0x1005430b)); // cmovg r19, r21, qword ptr [r10+r25*1-0x1005430b] IID918 + __ eandl(r30, Address(rbx, rdx, (Address::ScaleFactor)3, -0x463540b4), r28, false); // {EVEX}and r30d, dword ptr [rbx+rdx*8-0x463540b4], r28d IID271 + __ eandl(r18, Address(r28, r10, (Address::ScaleFactor)3, +0x3523a73b), r18, false); // and r18d, dword ptr [r28+r10*8+0x3523a73b] IID272 + __ eandl(r9, Address(r15, r15, (Address::ScaleFactor)1, -0x2a0bdd56), r21, true); // {NF}and r9d, dword ptr [r15+r15*2-0x2a0bdd56], r21d IID273 + __ eandl(r16, Address(r23, -0x165064ff), r16, true); // {NF}and r16d, dword ptr [r23-0x165064ff], r16d IID274 + __ eorl(r28, Address(r30, r11, (Address::ScaleFactor)0, +0x17281e3a), r20, false); // {EVEX}or r28d, dword ptr [r30+r11*1+0x17281e3a], r20d IID275 + __ eorl(rdx, Address(rbx, r31, (Address::ScaleFactor)2, +0x2477b5bb), rdx, false); // or edx, dword ptr [rbx+r31*4+0x2477b5bb] IID276 + __ eorl(r16, Address(r11, rcx, (Address::ScaleFactor)1, -0x3175d1af), r24, true); // {NF}or r16d, dword ptr [r11+rcx*2-0x3175d1af], r24d IID277 + __ eorl(rbx, Address(r11, r20, (Address::ScaleFactor)3, -0x22d67bd3), rbx, true); // {NF}or ebx, dword ptr [r11+r20*8-0x22d67bd3], ebx IID278 + __ eorb(r26, Address(r27, r30, (Address::ScaleFactor)1, -0x3d9bce2e), rdx, false); // {EVEX}or r26b, byte ptr [r27+r30*2-0x3d9bce2e], dl IID279 + __ eorb(r31, Address(r22, r29, (Address::ScaleFactor)1, +0x14218519), r31, false); // or r31b, byte ptr [r22+r29*2+0x14218519] IID280 + __ eorb(r21, Address(r9, -0x1050127a), r13, true); // {NF}or r21b, byte ptr [r9-0x1050127a], r13b IID281 + __ eorb(r31, Address(r9, r8, (Address::ScaleFactor)0, -0xae18961), r31, true); // {NF}or r31b, byte ptr [r9+r8*1-0xae18961], r31b IID282 + __ esubl(r15, Address(r18, +0x5c2bbce5), r12, false); // {EVEX}sub r15d, dword ptr [r18+0x5c2bbce5], r12d IID283 + __ esubl(r27, Address(r25, r23, (Address::ScaleFactor)0, +0x5c6078b3), r27, false); // {EVEX}sub r27d, dword ptr [r25+r23*1+0x5c6078b3], r27d IID284 + __ esubl(r18, Address(r8, rdx, (Address::ScaleFactor)3, -0x9ed3881), r14, true); // {NF}sub r18d, dword ptr [r8+rdx*8-0x9ed3881], r14d IID285 + __ esubl(r9, Address(r15, +0x775acdad), r9, true); // {NF}sub r9d, dword ptr [r15+0x775acdad], r9d IID286 + __ exorl(r21, Address(r18, r26, (Address::ScaleFactor)1, +0x2fe31fd5), r23, false); // {EVEX}xor r21d, dword ptr [r18+r26*2+0x2fe31fd5], r23d IID287 + __ exorl(r10, Address(r27, +0xa3150de), r10, false); // xor r10d, dword ptr [r27+0xa3150de] IID288 + __ exorl(r18, Address(r22, r30, (Address::ScaleFactor)3, +0x1ad4e897), r24, true); // {NF}xor r18d, dword ptr [r22+r30*8+0x1ad4e897], r24d IID289 + __ exorl(r8, Address(r16, r20, (Address::ScaleFactor)0, +0x626eae82), r8, true); // {NF}xor r8d, dword ptr [r16+r20*1+0x626eae82], r8d IID290 + __ exorb(r16, Address(r21, r15, (Address::ScaleFactor)0, -0x1403b60d), r18, false); // {EVEX}xor r16b, byte ptr [r21+r15*1-0x1403b60d], r18b IID291 + __ exorb(r13, Address(r19, r23, (Address::ScaleFactor)2, +0x237ef1e1), r13, false); // xor r13b, byte ptr [r19+r23*4+0x237ef1e1] IID292 + __ exorb(r29, Address(r18, r14, (Address::ScaleFactor)2, +0x5cc0095b), r14, true); // {NF}xor r29b, byte ptr [r18+r14*4+0x5cc0095b], r14b IID293 + __ exorb(r27, Address(r25, r20, (Address::ScaleFactor)3, +0x1cf7b958), r27, true); // {NF}xor r27b, byte ptr [r25+r20*8+0x1cf7b958], r27b IID294 + __ eaddl(r16, r24, 16, false); // {EVEX}add r16d, r24d, 16 IID295 + __ eaddl(rax, r24, 16, false); // {EVEX}add eax, r24d, 16 IID296 + __ eaddl(r21, r21, 65536, false); // add r21d, 65536 IID297 + __ eaddl(r24, r8, 1048576, true); // {NF}add r24d, r8d, 1048576 IID298 + __ eaddl(rax, r13, 1048576, true); // {NF}add eax, r13d, 1048576 IID299 + __ eaddl(r29, r29, 16777216, true); // {NF}add r29d, r29d, 16777216 IID300 + __ eandl(r12, r12, 16, false); // and r12d, 16 IID301 + __ eandl(rax, r30, 16, false); // {EVEX}and eax, r30d, 16 IID302 + __ eandl(r24, r24, 16, false); // and r24d, 16 IID303 + __ eandl(r8, r12, 1, true); // {NF}and r8d, r12d, 1 IID304 + __ eandl(rax, r13, 1, true); // {NF}and eax, r13d, 1 IID305 + __ eandl(r25, r25, 16, true); // {NF}and r25d, r25d, 16 IID306 + __ eimull(r18, r23, 65536, false); // {EVEX}imul r18d, r23d, 65536 IID307 + __ eimull(rax, r9, 65536, false); // {EVEX}imul eax, r9d, 65536 IID308 + __ eimull(r26, r26, 268435456, false); // {EVEX}imul r26d, r26d, 268435456 IID309 + __ eimull(r25, r21, 1, true); // {NF}imul r25d, r21d, 1 IID310 + __ eimull(rax, r24, 1, true); // {NF}imul eax, r24d, 1 IID311 + __ eimull(r24, r24, 16777216, true); // {NF}imul r24d, r24d, 16777216 IID312 + __ eorl(r30, r26, 1, false); // {EVEX}or r30d, r26d, 1 IID313 + __ eorl(rax, r22, 1, false); // {EVEX}or eax, r22d, 1 IID314 + __ eorl(r17, r17, 1048576, false); // or r17d, 1048576 IID315 + __ eorl(r24, r8, 1, true); // {NF}or r24d, r8d, 1 IID316 + __ eorl(rax, r27, 1, true); // {NF}or eax, r27d, 1 IID317 +#endif // _LP64 + __ eorl(rdx, rdx, 268435456, true); // {NF}or edx, edx, 268435456 IID318 +#ifdef _LP64 + __ ercll(r22, r22, 8); // rcl r22d, 8 IID319 + __ ercll(rax, r23, 8); // {EVEX}rcl eax, r23d, 8 IID320 + __ ercll(r19, r19, 4); // rcl r19d, 4 IID321 + __ eroll(r30, r24, 2, false); // {EVEX}rol r30d, r24d, 2 IID322 + __ eroll(rax, r29, 2, false); // {EVEX}rol eax, r29d, 2 IID323 + __ eroll(r8, r8, 2, false); // rol r8d, 2 IID324 + __ eroll(r18, r24, 16, true); // {NF}rol r18d, r24d, 16 IID325 + __ eroll(rax, r13, 16, true); // {NF}rol eax, r13d, 16 IID326 + __ eroll(r24, r24, 1, true); // {NF}rol r24d, r24d, 1 IID327 + __ erorl(r28, r17, 16, false); // {EVEX}ror r28d, r17d, 16 IID328 + __ erorl(rax, r24, 16, false); // {EVEX}ror eax, r24d, 16 IID329 + __ erorl(r17, r17, 4, false); // ror r17d, 4 IID330 + __ erorl(r24, rcx, 4, true); // {NF}ror r24d, ecx, 4 IID331 + __ erorl(rax, r16, 4, true); // {NF}ror eax, r16d, 4 IID332 + __ erorl(r15, r15, 2, true); // {NF}ror r15d, r15d, 2 IID333 + __ esall(r14, r27, 4, false); // {EVEX}sal r14d, r27d, 4 IID334 + __ esall(rax, r23, 4, false); // {EVEX}sal eax, r23d, 4 IID335 + __ esall(r30, r30, 4, false); // sal r30d, 4 IID336 + __ esall(r27, rdx, 2, true); // {NF}sal r27d, edx, 2 IID337 + __ esall(rax, r19, 2, true); // {NF}sal eax, r19d, 2 IID338 + __ esall(r20, r20, 2, true); // {NF}sal r20d, r20d, 2 IID339 + __ esarl(r21, r23, 1, false); // {EVEX}sar r21d, r23d, 1 IID340 + __ esarl(rax, r30, 1, false); // {EVEX}sar eax, r30d, 1 IID341 + __ esarl(r25, r25, 2, false); // sar r25d, 2 IID342 + __ esarl(r24, r19, 4, true); // {NF}sar r24d, r19d, 4 IID343 + __ esarl(rax, r14, 4, true); // {NF}sar eax, r14d, 4 IID344 + __ esarl(r26, r26, 16, true); // {NF}sar r26d, r26d, 16 IID345 + __ eshll(r22, r13, 8, false); // {EVEX}shl r22d, r13d, 8 IID346 + __ eshll(rax, r24, 8, false); // {EVEX}shl eax, r24d, 8 IID347 + __ eshll(r14, r14, 16, false); // shl r14d, 16 IID348 + __ eshll(r28, r25, 8, true); // {NF}shl r28d, r25d, 8 IID349 + __ eshll(rax, r10, 8, true); // {NF}shl eax, r10d, 8 IID350 + __ eshll(r20, r20, 1, true); // {NF}shl r20d, r20d, 1 IID351 + __ eshrl(r12, rbx, 4, false); // {EVEX}shr r12d, ebx, 4 IID352 + __ eshrl(rax, r23, 4, false); // {EVEX}shr eax, r23d, 4 IID353 + __ eshrl(r28, r28, 16, false); // shr r28d, 16 IID354 + __ eshrl(r24, r30, 4, true); // {NF}shr r24d, r30d, 4 IID355 + __ eshrl(rax, r31, 4, true); // {NF}shr eax, r31d, 4 IID356 + __ eshrl(r31, r31, 2, true); // {NF}shr r31d, r31d, 2 IID357 + __ esubl(r20, r10, 256, false); // {EVEX}sub r20d, r10d, 256 IID358 + __ esubl(rax, r13, 256, false); // {EVEX}sub eax, r13d, 256 IID359 + __ esubl(r25, r25, 256, false); // sub r25d, 256 IID360 + __ esubl(r23, r12, 268435456, true); // {NF}sub r23d, r12d, 268435456 IID361 + __ esubl(rax, r16, 268435456, true); // {NF}sub eax, r16d, 268435456 IID362 + __ esubl(r31, r31, 1, true); // {NF}sub r31d, r31d, 1 IID363 + __ exorl(r9, r15, 16777216, false); // {EVEX}xor r9d, r15d, 16777216 IID364 + __ exorl(rax, r13, 16777216, false); // {EVEX}xor eax, r13d, 16777216 IID365 + __ exorl(r28, r28, 16, false); // xor r28d, 16 IID366 + __ exorl(r29, r22, 16, true); // {NF}xor r29d, r22d, 16 IID367 +#endif // _LP64 + __ exorl(rax, rbx, 16, true); // {NF}xor eax, ebx, 16 IID368 +#ifdef _LP64 + __ exorl(r8, r8, 16, true); // {NF}xor r8d, r8d, 16 IID369 + __ esubl_imm32(r16, r13, 4194304, false); // {EVEX}sub r16d, r13d, 4194304 IID370 + __ esubl_imm32(rax, r12, 4194304, false); // {EVEX}sub eax, r12d, 4194304 IID371 + __ esubl_imm32(r17, r17, 67108864, false); // sub r17d, 67108864 IID372 + __ esubl_imm32(r22, r26, 1073741824, true); // {NF}sub r22d, r26d, 1073741824 IID373 + __ esubl_imm32(rax, r10, 1073741824, true); // {NF}sub eax, r10d, 1073741824 IID374 + __ esubl_imm32(r11, r11, 1073741824, true); // {NF}sub r11d, r11d, 1073741824 IID375 + __ eaddl(r19, r12, Address(r30, r8, (Address::ScaleFactor)0, +0x6a1a0a73), false); // {EVEX}add r19d, r12d, dword ptr [r30+r8*1+0x6a1a0a73] IID376 + __ eaddl(r30, r30, Address(r18, r19, (Address::ScaleFactor)2, +0x25f990cf), false); // add r30d, dword ptr [r18+r19*4+0x25f990cf] IID377 + __ eaddl(rcx, r25, Address(r19, r16, (Address::ScaleFactor)0, +0x482d5dbc), true); // {NF}add ecx, r25d, dword ptr [r19+r16*1+0x482d5dbc] IID378 + __ eaddl(r9, r9, Address(r11, +0x43d5ee01), true); // {NF}add r9d, r9d, dword ptr [r11+0x43d5ee01] IID379 + __ eandl(rcx, r23, Address(r21, r15, (Address::ScaleFactor)2, +0x2825c2bc), false); // {EVEX}and ecx, r23d, dword ptr [r21+r15*4+0x2825c2bc] IID380 + __ eandl(r27, r27, Address(r13, r15, (Address::ScaleFactor)3, -0x1268b895), false); // and r27d, dword ptr [r13+r15*8-0x1268b895] IID381 + __ eandl(r9, r23, Address(r22, r30, (Address::ScaleFactor)0, -0x715acbb), true); // {NF}and r9d, r23d, dword ptr [r22+r30*1-0x715acbb] IID382 + __ eandl(rbx, rbx, Address(r28, r16, (Address::ScaleFactor)2, +0xb0223ee), true); // {NF}and ebx, ebx, dword ptr [r28+r16*4+0xb0223ee] IID383 + __ eimull(r15, r29, Address(r15, r28, (Address::ScaleFactor)1, -0x1f297a69), false); // {EVEX}imul r15d, r29d, dword ptr [r15+r28*2-0x1f297a69] IID384 + __ eimull(r17, r17, Address(r23, rbx, (Address::ScaleFactor)1, +0xadc7545), false); // imul r17d, dword ptr [r23+rbx*2+0xadc7545] IID385 + __ eimull(r27, r9, Address(rdx, r22, (Address::ScaleFactor)2, -0x43d90f61), true); // {NF}imul r27d, r9d, dword ptr [rdx+r22*4-0x43d90f61] IID386 + __ eimull(rbx, rbx, Address(r28, r22, (Address::ScaleFactor)3, -0x519d9a27), true); // {NF}imul ebx, ebx, dword ptr [r28+r22*8-0x519d9a27] IID387 + __ eorl(r17, rcx, Address(r14, +0x10642223), false); // {EVEX}or r17d, ecx, dword ptr [r14+0x10642223] IID388 + __ eorl(r26, r26, Address(r31, -0x7a9a83ba), false); // or r26d, dword ptr [r31-0x7a9a83ba] IID389 + __ eorl(r15, r22, Address(r12, r12, (Address::ScaleFactor)2, +0x743b6997), true); // {NF}or r15d, r22d, dword ptr [r12+r12*4+0x743b6997] IID390 + __ eorl(r8, r8, Address(rdx, r22, (Address::ScaleFactor)3, -0x588414dc), true); // {NF}or r8d, r8d, dword ptr [rdx+r22*8-0x588414dc] IID391 + __ esubl(rcx, r28, Address(r30, r13, (Address::ScaleFactor)2, +0xe9310e5), false); // {EVEX}sub ecx, r28d, dword ptr [r30+r13*4+0xe9310e5] IID392 + __ esubl(rcx, rcx, Address(r30, r10, (Address::ScaleFactor)1, -0x1b076ed1), false); // sub ecx, dword ptr [r30+r10*2-0x1b076ed1] IID393 + __ esubl(r9, r21, Address(r30, +0x2f79ffd3), true); // {NF}sub r9d, r21d, dword ptr [r30+0x2f79ffd3] IID394 + __ esubl(r16, r16, Address(rdx, r14, (Address::ScaleFactor)2, +0x675d71c1), true); // {NF}sub r16d, r16d, dword ptr [rdx+r14*4+0x675d71c1] IID395 + __ exorl(r27, r28, Address(rbx, r26, (Address::ScaleFactor)2, -0x78c20b81), false); // {EVEX}xor r27d, r28d, dword ptr [rbx+r26*4-0x78c20b81] IID396 + __ exorl(r14, r14, Address(r31, r19, (Address::ScaleFactor)1, -0x4ff251cc), false); // xor r14d, dword ptr [r31+r19*2-0x4ff251cc] IID397 + __ exorl(r20, r18, Address(r13, r16, (Address::ScaleFactor)2, -0x19efc6e2), true); // {NF}xor r20d, r18d, dword ptr [r13+r16*4-0x19efc6e2] IID398 + __ exorl(r19, r19, Address(r13, r23, (Address::ScaleFactor)1, -0x2d1bd8aa), true); // {NF}xor r19d, r19d, dword ptr [r13+r23*2-0x2d1bd8aa] IID399 + __ exorb(r29, r17, Address(rdx, r29, (Address::ScaleFactor)2, +0x66573e84), false); // {EVEX}xor r29b, r17b, byte ptr [rdx+r29*4+0x66573e84] IID400 + __ exorb(r22, r22, Address(r24, r25, (Address::ScaleFactor)3, +0x3a94a93f), false); // xor r22b, byte ptr [r24+r25*8+0x3a94a93f] IID401 + __ exorb(r13, r29, Address(r15, r23, (Address::ScaleFactor)1, +0x76d43532), true); // {NF}xor r13b, r29b, byte ptr [r15+r23*2+0x76d43532] IID402 + __ exorb(r15, r15, Address(r13, r9, (Address::ScaleFactor)0, -0x474e6d1a), true); // {NF}xor r15b, r15b, byte ptr [r13+r9*1-0x474e6d1a] IID403 + __ exorw(r17, r16, Address(r23, rdx, (Address::ScaleFactor)0, +0x562a291), false); // {EVEX}xor r17w, r16w, word ptr [r23+rdx*1+0x562a291] IID404 + __ exorw(r29, r29, Address(r18, r28, (Address::ScaleFactor)3, -0x541967f2), false); // xor r29w, word ptr [r18+r28*8-0x541967f2] IID405 + __ exorw(r27, r11, Address(r10, +0xa911c5a), true); // {NF}xor r27w, r11w, word ptr [r10+0xa911c5a] IID406 + __ exorw(r31, r31, Address(r30, r19, (Address::ScaleFactor)2, -0xf6a3da), true); // {NF}xor r31w, r31w, word ptr [r30+r19*4-0xf6a3da] IID407 + __ eaddl(r12, r13, r23, false); // {load}{EVEX}add r12d, r13d, r23d IID408 + __ eaddl(r28, r28, r20, false); // {load}add r28d, r20d IID409 + __ eaddl(r20, r24, r20, false); // {load}add r20d, r24d IID410 + __ eaddl(r11, r10, r15, true); // {load}{NF}add r11d, r10d, r15d IID411 + __ eaddl(r19, r19, r20, true); // {load}{NF}add r19d, r19d, r20d IID412 + __ eaddl(r23, r15, r23, true); // {load}{NF}add r23d, r15d, r23d IID413 + __ eandl(r26, r19, r24, false); // {load}{EVEX}and r26d, r19d, r24d IID414 + __ eandl(r23, r23, r28, false); // {load}and r23d, r28d IID415 + __ eandl(r11, r13, r11, false); // {load}and r11d, r13d IID416 + __ eandl(r13, rdx, r31, true); // {load}{NF}and r13d, edx, r31d IID417 + __ eandl(r23, r23, r23, true); // {load}{NF}and r23d, r23d, r23d IID418 + __ eandl(r9, r27, r9, true); // {load}{NF}and r9d, r27d, r9d IID419 + __ eimull(r21, r20, r24, false); // {load}{EVEX}imul r21d, r20d, r24d IID420 + __ eimull(r21, r21, r29, false); // {load}imul r21d, r29d IID421 + __ eimull(rbx, r11, rbx, false); // {load}imul ebx, r11d IID422 + __ eimull(r21, rbx, rcx, true); // {load}{NF}imul r21d, ebx, ecx IID423 + __ eimull(r31, r31, r21, true); // {load}{NF}imul r31d, r31d, r21d IID424 + __ eimull(r15, r25, r15, true); // {load}{NF}imul r15d, r25d, r15d IID425 + __ eorw(r30, r23, r25, false); // {load}{EVEX}or r30w, r23w, r25w IID426 + __ eorw(r18, r18, rcx, false); // {load}or r18w, cx IID427 + __ eorw(r10, rcx, r10, false); // {load}or r10w, cx IID428 + __ eorw(r31, r21, r26, true); // {load}{NF}or r31w, r21w, r26w IID429 + __ eorw(r21, r21, r19, true); // {load}{NF}or r21w, r21w, r19w IID430 +#endif // _LP64 + __ eorw(rdx, rbx, rdx, true); // {load}{NF}or dx, bx, dx IID431 +#ifdef _LP64 + __ eorl(rcx, r24, r22, false); // {load}{EVEX}or ecx, r24d, r22d IID432 + __ eorl(rcx, rcx, r19, false); // {load}or ecx, r19d IID433 + __ eorl(r27, r27, r27, false); // {load}or r27d, r27d IID434 + __ eorl(r31, r9, r13, true); // {load}{NF}or r31d, r9d, r13d IID435 + __ eorl(r31, r31, r23, true); // {load}{NF}or r31d, r31d, r23d IID436 + __ eorl(r19, r17, r19, true); // {load}{NF}or r19d, r17d, r19d IID437 + __ eshldl(r20, r16, r24, false); // {load}{EVEX}shld r20d, r16d, r24d, cl IID438 + __ eshldl(rdx, rdx, r12, false); // {load}shld edx, r12d IID439 + __ eshldl(r29, r9, r31, true); // {load}{NF}shld r29d, r9d, r31d, cl IID440 + __ eshldl(r17, r17, r20, true); // {load}{NF}shld r17d, r17d, r20d, cl IID441 + __ eshrdl(r20, r15, r18, false); // {load}{EVEX}shrd r20d, r15d, r18d, cl IID442 + __ eshrdl(rcx, rcx, r12, false); // {load}shrd ecx, r12d IID443 + __ eshrdl(r14, r9, r23, true); // {load}{NF}shrd r14d, r9d, r23d, cl IID444 + __ eshrdl(r19, r19, r13, true); // {load}{NF}shrd r19d, r19d, r13d, cl IID445 + __ esubl(r30, r27, r27, false); // {load}{EVEX}sub r30d, r27d, r27d IID446 + __ esubl(rdx, rdx, r11, false); // {load}sub edx, r11d IID447 + __ esubl(r15, r11, r24, true); // {load}{NF}sub r15d, r11d, r24d IID448 + __ esubl(r14, r14, r25, true); // {load}{NF}sub r14d, r14d, r25d IID449 + __ exorl(r31, r16, r12, false); // {load}{EVEX}xor r31d, r16d, r12d IID450 + __ exorl(r20, r20, r14, false); // {load}xor r20d, r14d IID451 + __ exorl(r30, r13, r30, false); // {load}xor r30d, r13d IID452 + __ exorl(r24, r17, r17, true); // {load}{NF}xor r24d, r17d, r17d IID453 + __ exorl(r26, r26, r21, true); // {load}{NF}xor r26d, r26d, r21d IID454 + __ exorl(r11, r13, r11, true); // {load}{NF}xor r11d, r13d, r11d IID455 + __ eshldl(r27, r25, r21, 4, false); // {EVEX}shld r27d, r25d, r21d, 4 IID456 + __ eshldl(r22, r22, r10, 4, false); // shld r22d, r10d, 4 IID457 + __ eshldl(r21, r15, r24, 16, true); // {NF}shld r21d, r15d, r24d, 16 IID458 + __ eshldl(rdx, rdx, r19, 1, true); // {NF}shld edx, edx, r19d, 1 IID459 + __ eshrdl(r23, r13, r8, 16, false); // {EVEX}shrd r23d, r13d, r8d, 16 IID460 + __ eshrdl(r26, r26, r22, 1, false); // shrd r26d, r22d, 1 IID461 + __ eshrdl(r24, r9, r30, 16, true); // {NF}shrd r24d, r9d, r30d, 16 IID462 + __ eshrdl(r19, r19, r8, 4, true); // {NF}shrd r19d, r19d, r8d, 4 IID463 + __ ecmovl (Assembler::Condition::overflow, r30, r26, r17); // cmovo r30d, r26d, r17d IID464 + __ ecmovl (Assembler::Condition::overflow, r14, r14, r26); // cmovo r14d, r26d IID465 + __ ecmovl (Assembler::Condition::noOverflow, r24, r19, r29); // cmovno r24d, r19d, r29d IID466 + __ ecmovl (Assembler::Condition::noOverflow, r25, r25, r20); // cmovno r25d, r20d IID467 + __ ecmovl (Assembler::Condition::below, r11, r10, r14); // cmovb r11d, r10d, r14d IID468 + __ ecmovl (Assembler::Condition::below, r30, r30, r25); // cmovb r30d, r25d IID469 + __ ecmovl (Assembler::Condition::aboveEqual, r13, r22, r27); // cmovae r13d, r22d, r27d IID470 + __ ecmovl (Assembler::Condition::aboveEqual, r16, r16, r24); // cmovae r16d, r24d IID471 + __ ecmovl (Assembler::Condition::zero, r28, r13, r30); // cmovz r28d, r13d, r30d IID472 + __ ecmovl (Assembler::Condition::zero, r30, r30, r24); // cmovz r30d, r24d IID473 + __ ecmovl (Assembler::Condition::notZero, r21, r20, r31); // cmovnz r21d, r20d, r31d IID474 + __ ecmovl (Assembler::Condition::notZero, r8, r8, r16); // cmovnz r8d, r16d IID475 + __ ecmovl (Assembler::Condition::belowEqual, r15, r26, r22); // cmovbe r15d, r26d, r22d IID476 + __ ecmovl (Assembler::Condition::belowEqual, r31, r31, rdx); // cmovbe r31d, edx IID477 + __ ecmovl (Assembler::Condition::above, r27, r8, r10); // cmova r27d, r8d, r10d IID478 + __ ecmovl (Assembler::Condition::above, r18, r18, r11); // cmova r18d, r11d IID479 + __ ecmovl (Assembler::Condition::negative, r27, rbx, r21); // cmovs r27d, ebx, r21d IID480 + __ ecmovl (Assembler::Condition::negative, r12, r12, r31); // cmovs r12d, r31d IID481 + __ ecmovl (Assembler::Condition::positive, r12, rdx, r18); // cmovns r12d, edx, r18d IID482 + __ ecmovl (Assembler::Condition::positive, r18, r18, r19); // cmovns r18d, r19d IID483 + __ ecmovl (Assembler::Condition::parity, r16, r20, r23); // cmovp r16d, r20d, r23d IID484 + __ ecmovl (Assembler::Condition::parity, r18, r18, r16); // cmovp r18d, r16d IID485 + __ ecmovl (Assembler::Condition::noParity, rbx, r31, r30); // cmovnp ebx, r31d, r30d IID486 + __ ecmovl (Assembler::Condition::noParity, r31, r31, r29); // cmovnp r31d, r29d IID487 + __ ecmovl (Assembler::Condition::less, r28, r25, r10); // cmovl r28d, r25d, r10d IID488 + __ ecmovl (Assembler::Condition::less, r24, r24, r20); // cmovl r24d, r20d IID489 + __ ecmovl (Assembler::Condition::greaterEqual, r16, rdx, r26); // cmovge r16d, edx, r26d IID490 + __ ecmovl (Assembler::Condition::greaterEqual, r28, r28, r28); // cmovge r28d, r28d IID491 + __ ecmovl (Assembler::Condition::lessEqual, r9, r20, r24); // cmovle r9d, r20d, r24d IID492 + __ ecmovl (Assembler::Condition::lessEqual, r24, r24, r29); // cmovle r24d, r29d IID493 + __ ecmovl (Assembler::Condition::greater, r23, r27, r15); // cmovg r23d, r27d, r15d IID494 + __ ecmovl (Assembler::Condition::greater, r12, r12, r18); // cmovg r12d, r18d IID495 + __ ecmovl (Assembler::Condition::overflow, r19, r9, Address(r31, rcx, (Address::ScaleFactor)1, -0x2be98bd)); // cmovo r19d, r9d, dword ptr [r31+rcx*2-0x2be98bd] IID496 + __ ecmovl (Assembler::Condition::overflow, r8, r8, Address(r21, r24, (Address::ScaleFactor)1, +0x41e6a0cb)); // cmovo r8d, dword ptr [r21+r24*2+0x41e6a0cb] IID497 + __ ecmovl (Assembler::Condition::noOverflow, r23, r15, Address(r19, r30, (Address::ScaleFactor)3, -0x55adfe2d)); // cmovno r23d, r15d, dword ptr [r19+r30*8-0x55adfe2d] IID498 + __ ecmovl (Assembler::Condition::noOverflow, rdx, rdx, Address(r27, rdx, (Address::ScaleFactor)0, -0x1aa12735)); // cmovno edx, dword ptr [r27+rdx*1-0x1aa12735] IID499 + __ ecmovl (Assembler::Condition::below, rbx, r29, Address(r31, r12, (Address::ScaleFactor)0, +0xbd42246)); // cmovb ebx, r29d, dword ptr [r31+r12*1+0xbd42246] IID500 + __ ecmovl (Assembler::Condition::below, r21, r21, Address(r19, r21, (Address::ScaleFactor)1, -0x41518818)); // cmovb r21d, dword ptr [r19+r21*2-0x41518818] IID501 + __ ecmovl (Assembler::Condition::aboveEqual, r23, r29, Address(r22, r9, (Address::ScaleFactor)2, -0x35addbd8)); // cmovae r23d, r29d, dword ptr [r22+r9*4-0x35addbd8] IID502 + __ ecmovl (Assembler::Condition::aboveEqual, r18, r18, Address(r25, +0x632184c3)); // cmovae r18d, dword ptr [r25+0x632184c3] IID503 + __ ecmovl (Assembler::Condition::zero, r29, r13, Address(r18, r13, (Address::ScaleFactor)0, -0x3972eac6)); // cmovz r29d, r13d, dword ptr [r18+r13*1-0x3972eac6] IID504 + __ ecmovl (Assembler::Condition::zero, r29, r29, Address(r12, r9, (Address::ScaleFactor)3, -0x668cdfd2)); // cmovz r29d, dword ptr [r12+r9*8-0x668cdfd2] IID505 + __ ecmovl (Assembler::Condition::notZero, r25, r18, Address(r9, r22, (Address::ScaleFactor)2, +0x7f6ac91f)); // cmovnz r25d, r18d, dword ptr [r9+r22*4+0x7f6ac91f] IID506 + __ ecmovl (Assembler::Condition::notZero, r28, r28, Address(r30, +0x562e6594)); // cmovnz r28d, dword ptr [r30+0x562e6594] IID507 + __ ecmovl (Assembler::Condition::belowEqual, r27, r24, Address(r15, r20, (Address::ScaleFactor)2, -0x466538b7)); // cmovbe r27d, r24d, dword ptr [r15+r20*4-0x466538b7] IID508 + __ ecmovl (Assembler::Condition::belowEqual, r25, r25, Address(r26, r11, (Address::ScaleFactor)3, -0x593812a9)); // cmovbe r25d, dword ptr [r26+r11*8-0x593812a9] IID509 + __ ecmovl (Assembler::Condition::above, rcx, r20, Address(r16, -0x1389a3eb)); // cmova ecx, r20d, dword ptr [r16-0x1389a3eb] IID510 + __ ecmovl (Assembler::Condition::above, rbx, rbx, Address(r29, r8, (Address::ScaleFactor)0, +0x1d022615)); // cmova ebx, dword ptr [r29+r8*1+0x1d022615] IID511 + __ ecmovl (Assembler::Condition::negative, rdx, r14, Address(r12, r28, (Address::ScaleFactor)1, -0x51725a91)); // cmovs edx, r14d, dword ptr [r12+r28*2-0x51725a91] IID512 + __ ecmovl (Assembler::Condition::negative, r24, r24, Address(r17, r18, (Address::ScaleFactor)1, -0x1725c4e4)); // cmovs r24d, dword ptr [r17+r18*2-0x1725c4e4] IID513 + __ ecmovl (Assembler::Condition::positive, rcx, rcx, Address(r15, r23, (Address::ScaleFactor)2, -0x6bd22ccf)); // cmovns ecx, dword ptr [r15+r23*4-0x6bd22ccf] IID514 + __ ecmovl (Assembler::Condition::positive, r24, r24, Address(r15, r10, (Address::ScaleFactor)1, -0x7ffb3d09)); // cmovns r24d, dword ptr [r15+r10*2-0x7ffb3d09] IID515 + __ ecmovl (Assembler::Condition::parity, r23, rcx, Address(r11, r23, (Address::ScaleFactor)0, +0x3738c585)); // cmovp r23d, ecx, dword ptr [r11+r23*1+0x3738c585] IID516 + __ ecmovl (Assembler::Condition::parity, r24, r24, Address(r30, r10, (Address::ScaleFactor)0, +0xfcc15a8)); // cmovp r24d, dword ptr [r30+r10*1+0xfcc15a8] IID517 + __ ecmovl (Assembler::Condition::noParity, r14, r26, Address(r14, r21, (Address::ScaleFactor)1, -0x4430ce9f)); // cmovnp r14d, r26d, dword ptr [r14+r21*2-0x4430ce9f] IID518 + __ ecmovl (Assembler::Condition::noParity, r10, r10, Address(r28, +0x3d7c59f)); // cmovnp r10d, dword ptr [r28+0x3d7c59f] IID519 + __ ecmovl (Assembler::Condition::less, r10, r21, Address(r8, r8, (Address::ScaleFactor)3, +0x4a6584b4)); // cmovl r10d, r21d, dword ptr [r8+r8*8+0x4a6584b4] IID520 + __ ecmovl (Assembler::Condition::less, r26, r26, Address(r19, r20, (Address::ScaleFactor)3, +0x47c660ef)); // cmovl r26d, dword ptr [r19+r20*8+0x47c660ef] IID521 + __ ecmovl (Assembler::Condition::greaterEqual, r26, r10, Address(rcx, +0x61977a97)); // cmovge r26d, r10d, dword ptr [rcx+0x61977a97] IID522 + __ ecmovl (Assembler::Condition::greaterEqual, r30, r30, Address(r15, r19, (Address::ScaleFactor)3, +0x53c601cb)); // cmovge r30d, dword ptr [r15+r19*8+0x53c601cb] IID523 + __ ecmovl (Assembler::Condition::lessEqual, r14, r9, Address(r17, -0x566ceee2)); // cmovle r14d, r9d, dword ptr [r17-0x566ceee2] IID524 + __ ecmovl (Assembler::Condition::lessEqual, r15, r15, Address(r27, r20, (Address::ScaleFactor)0, +0x76164792)); // cmovle r15d, dword ptr [r27+r20*1+0x76164792] IID525 + __ ecmovl (Assembler::Condition::greater, r27, r14, Address(r9, r13, (Address::ScaleFactor)2, +0xf5752d7)); // cmovg r27d, r14d, dword ptr [r9+r13*4+0xf5752d7] IID526 + __ ecmovl (Assembler::Condition::greater, r12, r12, Address(rbx, rcx, (Address::ScaleFactor)3, -0x5501b4c6)); // cmovg r12d, dword ptr [rbx+rcx*8-0x5501b4c6] IID527 +#endif // _LP64 +#ifdef _LP64 + __ adcq(r30, r31); // {load}adc r30, r31 IID528 + __ cmpq(r12, rdx); // {load}cmp r12, rdx IID529 + __ imulq(r21, r24); // {load}imul r21, r24 IID530 + __ popcntq(r9, r25); // {load}popcnt r9, r25 IID531 + __ sbbq(r8, r12); // {load}sbb r8, r12 IID532 + __ subq(r31, r24); // {load}sub r31, r24 IID533 + __ tzcntq(r10, r16); // {load}tzcnt r10, r16 IID534 + __ lzcntq(r20, r21); // {load}lzcnt r20, r21 IID535 + __ addq(rdx, r17); // {load}add rdx, r17 IID536 + __ andq(r14, r13); // {load}and r14, r13 IID537 + __ orq(r20, r24); // {load}or r20, r24 IID538 + __ xorq(r21, r22); // {load}xor r21, r22 IID539 + __ movq(r12, r27); // {load}mov r12, r27 IID540 + __ bsfq(r23, rdx); // {load}bsf r23, rdx IID541 + __ bsrq(r31, r28); // {load}bsr r31, r28 IID542 + __ btq(r8, r25); // {load}bt r8, r25 IID543 + __ xchgq(r21, rbx); // {load}xchg r21, rbx IID544 + __ testq(r23, r23); // {load}test r23, r23 IID545 + __ addq(Address(r19, -0x180d3ea1), r10); // add qword ptr [r19-0x180d3ea1], r10 IID546 + __ andq(Address(r11, r17, (Address::ScaleFactor)1, -0x78976be8), r25); // and qword ptr [r11+r17*2-0x78976be8], r25 IID547 + __ cmpq(Address(rbx, r28, (Address::ScaleFactor)3, +0x35f72102), r13); // cmp qword ptr [rbx+r28*8+0x35f72102], r13 IID548 + __ orq(Address(r8, -0x34465011), r21); // or qword ptr [r8-0x34465011], r21 IID549 + __ xorq(Address(r19, -0x404b22dd), r18); // xor qword ptr [r19-0x404b22dd], r18 IID550 + __ subq(Address(r23, r27, (Address::ScaleFactor)3, -0x428d2646), r14); // sub qword ptr [r23+r27*8-0x428d2646], r14 IID551 + __ movq(Address(r9, rcx, (Address::ScaleFactor)2, -0x72611661), r28); // mov qword ptr [r9+rcx*4-0x72611661], r28 IID552 + __ xaddq(Address(r24, r21, (Address::ScaleFactor)2, +0x3a6be990), rbx); // xadd qword ptr [r24+r21*4+0x3a6be990], rbx IID553 + __ andq(Address(r22, r10, (Address::ScaleFactor)0, +0x7ef8bdd), 1048576); // and qword ptr [r22+r10*1+0x7ef8bdd], 1048576 IID554 + __ addq(Address(r13, r28, (Address::ScaleFactor)0, -0x754789b1), 65536); // add qword ptr [r13+r28*1-0x754789b1], 65536 IID555 + __ cmpq(Address(r10, -0xbd2a8da), 268435456); // cmp qword ptr [r10-0xbd2a8da], 268435456 IID556 + __ sarq(Address(r23, r14, (Address::ScaleFactor)1, +0x6a16d9f5), 4); // sar qword ptr [r23+r14*2+0x6a16d9f5], 4 IID557 + __ salq(Address(rcx, r21, (Address::ScaleFactor)1, +0x5f66ac1e), 8); // sal qword ptr [rcx+r21*2+0x5f66ac1e], 8 IID558 + __ sbbq(Address(rcx, r22, (Address::ScaleFactor)3, -0x48c954c), 268435456); // sbb qword ptr [rcx+r22*8-0x48c954c], 268435456 IID559 + __ shrq(Address(r21, r30, (Address::ScaleFactor)0, +0xe405b0b), 8); // shr qword ptr [r21+r30*1+0xe405b0b], 8 IID560 + __ subq(Address(r19, r29, (Address::ScaleFactor)3, -0x7762044b), 4096); // sub qword ptr [r19+r29*8-0x7762044b], 4096 IID561 + __ xorq(Address(r30, r10, (Address::ScaleFactor)1, -0x19798323), 16); // xor qword ptr [r30+r10*2-0x19798323], 16 IID562 + __ orq(Address(rdx, r24, (Address::ScaleFactor)3, +0x18d9b316), 4096); // or qword ptr [rdx+r24*8+0x18d9b316], 4096 IID563 + __ movq(Address(rbx, -0x3058074d), 256); // mov qword ptr [rbx-0x3058074d], 256 IID564 + __ testq(Address(r28, r21, (Address::ScaleFactor)3, +0x65a0fdc4), -268435456); // test qword ptr [r28+r21*8+0x65a0fdc4], -268435456 IID565 + __ addq(r23, Address(r11, r18, (Address::ScaleFactor)0, -0x1d1af10c)); // add r23, qword ptr [r11+r18*1-0x1d1af10c] IID566 + __ andq(r22, Address(r18, r12, (Address::ScaleFactor)1, +0x1a5f1c38)); // and r22, qword ptr [r18+r12*2+0x1a5f1c38] IID567 + __ cmpq(r23, Address(r30, r19, (Address::ScaleFactor)0, -0x3e912f7f)); // cmp r23, qword ptr [r30+r19*1-0x3e912f7f] IID568 + __ lzcntq(r29, Address(rcx, +0x12e3fbe4)); // lzcnt r29, qword ptr [rcx+0x12e3fbe4] IID569 + __ orq(r14, Address(r21, r21, (Address::ScaleFactor)2, +0xd73042)); // or r14, qword ptr [r21+r21*4+0xd73042] IID570 + __ adcq(r31, Address(r17, r31, (Address::ScaleFactor)2, +0xabde912)); // adc r31, qword ptr [r17+r31*4+0xabde912] IID571 + __ imulq(r20, Address(r13, r27, (Address::ScaleFactor)0, -0x58dbfc1f)); // imul r20, qword ptr [r13+r27*1-0x58dbfc1f] IID572 + __ popcntq(rbx, Address(r22, -0x72c66c23)); // popcnt rbx, qword ptr [r22-0x72c66c23] IID573 + __ sbbq(r26, Address(r9, +0x334aba09)); // sbb r26, qword ptr [r9+0x334aba09] IID574 + __ subq(r9, Address(r9, r30, (Address::ScaleFactor)3, -0x219a6102)); // sub r9, qword ptr [r9+r30*8-0x219a6102] IID575 + __ tzcntq(r25, Address(r20, -0x2131bab1)); // tzcnt r25, qword ptr [r20-0x2131bab1] IID576 + __ xorq(r16, Address(r28, r16, (Address::ScaleFactor)1, +0x48c483b9)); // xor r16, qword ptr [r28+r16*2+0x48c483b9] IID577 + __ movq(r30, Address(r9, r16, (Address::ScaleFactor)0, -0x88ce84f)); // mov r30, qword ptr [r9+r16*1-0x88ce84f] IID578 + __ leaq(r11, Address(r30, r29, (Address::ScaleFactor)2, +0x3eeb8fd0)); // lea r11, qword ptr [r30+r29*4+0x3eeb8fd0] IID579 + __ cvttsd2siq(r26, Address(r29, r10, (Address::ScaleFactor)3, +0x3ef4822e)); // cvttsd2si r26, qword ptr [r29+r10*8+0x3ef4822e] IID580 + __ xchgq(r29, Address(r19, r20, (Address::ScaleFactor)2, -0x3f0f3db9)); // xchg r29, qword ptr [r19+r20*4-0x3f0f3db9] IID581 + __ testq(r8, Address(r30, r20, (Address::ScaleFactor)0, +0x15b56a17)); // test r8, qword ptr [r30+r20*1+0x15b56a17] IID582 + __ addq(r26, 4096); // add r26, 4096 IID583 + __ andq(r20, 16); // and r20, 16 IID584 + __ adcq(r23, 1048576); // adc r23, 1048576 IID585 + __ cmpq(r12, 4096); // cmp r12, 4096 IID586 + __ rclq(rcx, 4); // rcl rcx, 4 IID587 + __ rcrq(r14, 1); // rcr r14, 1 IID588 + __ rolq(r23, 2); // rol r23, 2 IID589 + __ rorq(r12, 4); // ror r12, 4 IID590 + __ sarq(r10, 4); // sar r10, 4 IID591 + __ salq(r20, 4); // sal r20, 4 IID592 + __ sbbq(rcx, 1048576); // sbb rcx, 1048576 IID593 + __ shlq(r23, 16); // shl r23, 16 IID594 + __ shrq(r27, 2); // shr r27, 2 IID595 + __ subq(rcx, 65536); // sub rcx, 65536 IID596 + __ xorq(r9, 1048576); // xor r9, 1048576 IID597 + __ movq(r16, 65536); // mov r16, 65536 IID598 + __ mov64(r24, 4503599627370496); // mov r24, 4503599627370496 IID599 + __ btq(r18, 64); // bt r18, 64 IID600 + __ testq(r29, -4096); // test r29, -4096 IID601 + __ orq_imm32(r30, 67108864); // or r30, 67108864 IID602 + __ subq_imm32(r25, 268435456); // sub r25, 268435456 IID603 + __ cmovq(Assembler::Condition::overflow, r30, Address(r17, r31, (Address::ScaleFactor)2, +0x47ff92f0)); // cmovo r30, qword ptr [r17+r31*4+0x47ff92f0] IID604 + __ cmovq(Assembler::Condition::noOverflow, r9, Address(r24, r28, (Address::ScaleFactor)1, +0x384904c0)); // cmovno r9, qword ptr [r24+r28*2+0x384904c0] IID605 + __ cmovq(Assembler::Condition::below, r23, Address(r23, r24, (Address::ScaleFactor)3, -0x197f1266)); // cmovb r23, qword ptr [r23+r24*8-0x197f1266] IID606 + __ cmovq(Assembler::Condition::aboveEqual, r9, Address(r29, r30, (Address::ScaleFactor)0, +0x2b5d49c8)); // cmovae r9, qword ptr [r29+r30*1+0x2b5d49c8] IID607 + __ cmovq(Assembler::Condition::zero, r16, Address(rbx, r15, (Address::ScaleFactor)1, +0x22379381)); // cmovz r16, qword ptr [rbx+r15*2+0x22379381] IID608 + __ cmovq(Assembler::Condition::notZero, r8, Address(r11, +0x49d67a0)); // cmovnz r8, qword ptr [r11+0x49d67a0] IID609 + __ cmovq(Assembler::Condition::belowEqual, r28, Address(r16, r16, (Address::ScaleFactor)2, -0x5e941da9)); // cmovbe r28, qword ptr [r16+r16*4-0x5e941da9] IID610 + __ cmovq(Assembler::Condition::above, r19, Address(r18, r8, (Address::ScaleFactor)0, -0xa5e55ec)); // cmova r19, qword ptr [r18+r8*1-0xa5e55ec] IID611 + __ cmovq(Assembler::Condition::negative, r28, Address(r17, r28, (Address::ScaleFactor)1, -0x3264220c)); // cmovs r28, qword ptr [r17+r28*2-0x3264220c] IID612 + __ cmovq(Assembler::Condition::positive, r31, Address(r14, r31, (Address::ScaleFactor)1, +0x5001bc5a)); // cmovns r31, qword ptr [r14+r31*2+0x5001bc5a] IID613 + __ cmovq(Assembler::Condition::parity, rbx, Address(r18, r17, (Address::ScaleFactor)2, -0x286f2379)); // cmovp rbx, qword ptr [r18+r17*4-0x286f2379] IID614 + __ cmovq(Assembler::Condition::noParity, r17, Address(r20, -0x5549f838)); // cmovnp r17, qword ptr [r20-0x5549f838] IID615 + __ cmovq(Assembler::Condition::less, r30, Address(r9, r28, (Address::ScaleFactor)1, -0x25b00cf3)); // cmovl r30, qword ptr [r9+r28*2-0x25b00cf3] IID616 + __ cmovq(Assembler::Condition::greaterEqual, r19, Address(r9, -0x2aabf22c)); // cmovge r19, qword ptr [r9-0x2aabf22c] IID617 + __ cmovq(Assembler::Condition::lessEqual, rbx, Address(rcx, r12, (Address::ScaleFactor)1, -0x432d68cc)); // cmovle rbx, qword ptr [rcx+r12*2-0x432d68cc] IID618 + __ cmovq(Assembler::Condition::greater, rbx, Address(r15, r17, (Address::ScaleFactor)3, -0x2b97565e)); // cmovg rbx, qword ptr [r15+r17*8-0x2b97565e] IID619 + __ call(r24); // call r24 IID620 + __ divq(r9); // div r9 IID621 + __ idivq(r28); // idiv r28 IID622 + __ imulq(rdx); // imul rdx IID623 + __ mulq(r31); // mul r31 IID624 + __ negq(r12); // neg r12 IID625 + __ notq(r12); // not r12 IID626 + __ rolq(r24); // rol r24, cl IID627 + __ rorq(r28); // ror r28, cl IID628 + __ sarq(r11); // sar r11, cl IID629 + __ salq(r27); // sal r27, cl IID630 + __ shlq(r23); // shl r23, cl IID631 + __ shrq(r17); // shr r17, cl IID632 + __ incrementq(r16); // inc r16 IID633 + __ decrementq(r12); // dec r12 IID634 + __ pushp(r23); // pushp r23 IID635 + __ popp(r24); // popp r24 IID636 + __ call(Address(r18, r14, (Address::ScaleFactor)0, -0x66639d32)); // call qword ptr [r18+r14*1-0x66639d32] IID637 + __ mulq(Address(r24, -0x660a2421)); // mul qword ptr [r24-0x660a2421] IID638 + __ negq(Address(r14, r18, (Address::ScaleFactor)0, +0x40f3936e)); // neg qword ptr [r14+r18*1+0x40f3936e] IID639 + __ sarq(Address(r10, r13, (Address::ScaleFactor)0, +0x7d04cb72)); // sar qword ptr [r10+r13*1+0x7d04cb72], cl IID640 + __ salq(Address(r18, r11, (Address::ScaleFactor)3, -0x2176b4dc)); // sal qword ptr [r18+r11*8-0x2176b4dc], cl IID641 + __ shrq(Address(r13, rcx, (Address::ScaleFactor)1, +0x7996aa80)); // shr qword ptr [r13+rcx*2+0x7996aa80], cl IID642 + __ incrementq(Address(r14, +0x67c2d02a)); // inc qword ptr [r14+0x67c2d02a] IID643 + __ decrementq(Address(r22, r26, (Address::ScaleFactor)0, +0x224f62c0)); // dec qword ptr [r22+r26*1+0x224f62c0] IID644 + __ imulq(rdx, Address(r31, rbx, (Address::ScaleFactor)1, +0x2b00bb10), 16777216); // imul rdx, qword ptr [r31+rbx*2+0x2b00bb10], 16777216 IID645 + __ imulq(r21, r31, 4096); // imul r21, r31, 4096 IID646 + __ shldq(rbx, r19, 1); // shld rbx, r19, 1 IID647 + __ shrdq(r11, r23, 4); // shrd r11, r23, 4 IID648 + __ pop2(r16, r30); // {load}pop2 r30, r16 IID649 + __ pop2p(r17, rbx); // {load}pop2p rbx, r17 IID650 + __ push2(r20, r30); // {load}push2 r30, r20 IID651 + __ push2p(r8, r31); // {load}push2p r31, r8 IID652 + __ movzbq(r28, Address(r8, r14, (Address::ScaleFactor)0, +0x469ae67a)); // movzx r28, byte ptr [r8+r14*1+0x469ae67a] IID653 + __ movzwq(r14, Address(r8, r18, (Address::ScaleFactor)2, -0x48699e02)); // movzx r14, word ptr [r8+r18*4-0x48699e02] IID654 + __ movsbq(r21, Address(rbx, -0x64dae06b)); // movsx r21, byte ptr [rbx-0x64dae06b] IID655 + __ movswq(r19, Address(r31, rbx, (Address::ScaleFactor)2, +0x60318819)); // movsx r19, word ptr [r31+rbx*4+0x60318819] IID656 + __ movzbq(r30, r13); // movzx r30, r13b IID657 + __ movzwq(r30, r18); // movzx r30, r18w IID658 + __ movsbq(r19, r15); // movsx r19, r15b IID659 + __ movswq(r20, r16); // movsx r20, r16w IID660 + __ cmpxchgq(r28, Address(r11, rbx, (Address::ScaleFactor)3, +0xfc3479d)); // cmpxchg qword ptr [r11+rbx*8+0xfc3479d], r28 IID661 + __ eidivq(r20, false); // {EVEX}idiv r20 IID662 + __ eidivq(r30, true); // {NF}idiv r30 IID663 + __ edivq(r22, false); // {EVEX}div r22 IID664 + __ edivq(r11, true); // {NF}div r11 IID665 + __ eimulq(rcx, false); // {EVEX}imul rcx IID666 + __ eimulq(r28, true); // {NF}imul r28 IID667 + __ emulq(r21, false); // {EVEX}mul r21 IID668 + __ emulq(r13, true); // {NF}mul r13 IID669 + __ emulq(Address(r26, r15, (Address::ScaleFactor)2, +0x70a1ce6e), false); // {EVEX}mul qword ptr [r26+r15*4+0x70a1ce6e] IID670 + __ emulq(Address(r24, r19, (Address::ScaleFactor)1, -0x1670855c), true); // {NF}mul qword ptr [r24+r19*2-0x1670855c] IID671 + __ eimulq(r10, r27, false); // {EVEX}imul r10, r27 IID672 + __ eimulq(r17, r17, false); // imul r17 IID673 + __ eimulq(rdx, r22, true); // {NF}imul rdx, r22 IID674 + __ eimulq(rbx, rbx, true); // {NF}imul rbx, rbx IID675 + __ elzcntq(r28, r15, false); // {EVEX}lzcnt r28, r15 IID676 + __ elzcntq(r15, r15, false); // {EVEX}lzcnt r15, r15 IID677 + __ elzcntq(rbx, r12, true); // {NF}lzcnt rbx, r12 IID678 + __ elzcntq(rbx, rbx, true); // {NF}lzcnt rbx, rbx IID679 + __ enegq(r26, r11, false); // {EVEX}neg r26, r11 IID680 + __ enegq(r17, r17, false); // neg r17 IID681 + __ enegq(rdx, r31, true); // {NF}neg rdx, r31 IID682 + __ enegq(r27, r27, true); // {NF}neg r27, r27 IID683 + __ enotq(r31, r15); // {EVEX}not r31, r15 IID684 + __ enotq(r21, r21); // not r21 IID685 + __ epopcntq(rbx, r24, false); // {EVEX}popcnt rbx, r24 IID686 + __ epopcntq(r28, r28, false); // {EVEX}popcnt r28, r28 IID687 + __ epopcntq(r23, r27, true); // {NF}popcnt r23, r27 IID688 + __ epopcntq(r13, r13, true); // {NF}popcnt r13, r13 IID689 + __ erolq(r25, r28, false); // {EVEX}rol r25, r28, cl IID690 + __ erolq(r31, r31, false); // rol r31, cl IID691 + __ erolq(r25, r23, true); // {NF}rol r25, r23, cl IID692 + __ erolq(rcx, rcx, true); // {NF}rol rcx, rcx, cl IID693 + __ erorq(r22, r14, false); // {EVEX}ror r22, r14, cl IID694 + __ erorq(r15, r15, false); // ror r15, cl IID695 + __ erorq(r11, r30, true); // {NF}ror r11, r30, cl IID696 + __ erorq(r24, r24, true); // {NF}ror r24, r24, cl IID697 + __ esalq(r10, r20, false); // {EVEX}sal r10, r20, cl IID698 + __ esalq(r19, r19, false); // sal r19, cl IID699 + __ esalq(r17, r25, true); // {NF}sal r17, r25, cl IID700 + __ esalq(r13, r13, true); // {NF}sal r13, r13, cl IID701 + __ esarq(r31, r30, false); // {EVEX}sar r31, r30, cl IID702 + __ esarq(r18, r18, false); // sar r18, cl IID703 + __ esarq(r25, r25, true); // {NF}sar r25, r25, cl IID704 + __ esarq(r28, r28, true); // {NF}sar r28, r28, cl IID705 + __ edecq(r22, r27, false); // {EVEX}dec r22, r27 IID706 + __ edecq(r12, r12, false); // dec r12 IID707 + __ edecq(r18, r11, true); // {NF}dec r18, r11 IID708 + __ edecq(r10, r10, true); // {NF}dec r10, r10 IID709 + __ eincq(r20, r24, false); // {EVEX}inc r20, r24 IID710 + __ eincq(r18, r18, false); // inc r18 IID711 + __ eincq(rbx, r11, true); // {NF}inc rbx, r11 IID712 + __ eincq(r26, r26, true); // {NF}inc r26, r26 IID713 + __ eshlq(r21, r8, false); // {EVEX}shl r21, r8, cl IID714 + __ eshlq(rbx, rbx, false); // shl rbx, cl IID715 + __ eshlq(r22, r21, true); // {NF}shl r22, r21, cl IID716 + __ eshlq(r27, r27, true); // {NF}shl r27, r27, cl IID717 + __ eshrq(r12, r16, false); // {EVEX}shr r12, r16, cl IID718 + __ eshrq(r8, r8, false); // shr r8, cl IID719 + __ eshrq(rdx, r9, true); // {NF}shr rdx, r9, cl IID720 + __ eshrq(r20, r20, true); // {NF}shr r20, r20, cl IID721 + __ etzcntq(r31, r21, false); // {EVEX}tzcnt r31, r21 IID722 + __ etzcntq(r20, r20, false); // {EVEX}tzcnt r20, r20 IID723 + __ etzcntq(rcx, r16, true); // {NF}tzcnt rcx, r16 IID724 + __ etzcntq(r14, r14, true); // {NF}tzcnt r14, r14 IID725 + __ eimulq(r27, Address(r25, r9, (Address::ScaleFactor)1, +0x445a2393), false); // {EVEX}imul r27, qword ptr [r25+r9*2+0x445a2393] IID726 + __ eimulq(r23, Address(rcx, r9, (Address::ScaleFactor)1, -0x1480ef0c), true); // {NF}imul r23, qword ptr [rcx+r9*2-0x1480ef0c] IID727 + __ elzcntq(r13, Address(r22, r17, (Address::ScaleFactor)1, -0x750c1996), false); // {EVEX}lzcnt r13, qword ptr [r22+r17*2-0x750c1996] IID728 + __ elzcntq(r13, Address(r31, -0x342b6259), true); // {NF}lzcnt r13, qword ptr [r31-0x342b6259] IID729 + __ enegq(r31, Address(r24, r13, (Address::ScaleFactor)1, -0x25b16a0e), false); // {EVEX}neg r31, qword ptr [r24+r13*2-0x25b16a0e] IID730 + __ enegq(r13, Address(r11, r28, (Address::ScaleFactor)3, +0x5c0013ab), true); // {NF}neg r13, qword ptr [r11+r28*8+0x5c0013ab] IID731 + __ epopcntq(rdx, Address(r18, rcx, (Address::ScaleFactor)2, -0x6113eaaf), false); // {EVEX}popcnt rdx, qword ptr [r18+rcx*4-0x6113eaaf] IID732 + __ epopcntq(r9, Address(r10, -0x5ca7d588), true); // {NF}popcnt r9, qword ptr [r10-0x5ca7d588] IID733 + __ esalq(r17, Address(r27, r30, (Address::ScaleFactor)0, +0x1b4cda2c), false); // {EVEX}sal r17, qword ptr [r27+r30*1+0x1b4cda2c], cl IID734 + __ esalq(r25, Address(r12, rdx, (Address::ScaleFactor)1, +0x62823bce), true); // {NF}sal r25, qword ptr [r12+rdx*2+0x62823bce], cl IID735 + __ esarq(r9, Address(r10, r18, (Address::ScaleFactor)2, -0x264a7a48), false); // {EVEX}sar r9, qword ptr [r10+r18*4-0x264a7a48], cl IID736 + __ esarq(rbx, Address(r14, r27, (Address::ScaleFactor)0, +0x20291e00), true); // {NF}sar rbx, qword ptr [r14+r27*1+0x20291e00], cl IID737 + __ edecq(r12, Address(r15, r14, (Address::ScaleFactor)2, -0x20f7dabb), false); // {EVEX}dec r12, qword ptr [r15+r14*4-0x20f7dabb] IID738 + __ edecq(r9, Address(r10, r25, (Address::ScaleFactor)1, +0x21411d84), true); // {NF}dec r9, qword ptr [r10+r25*2+0x21411d84] IID739 + __ eincq(r20, Address(rbx, r25, (Address::ScaleFactor)3, +0x2f0329e), false); // {EVEX}inc r20, qword ptr [rbx+r25*8+0x2f0329e] IID740 + __ eincq(r10, Address(r12, r31, (Address::ScaleFactor)0, -0x37505c8c), true); // {NF}inc r10, qword ptr [r12+r31*1-0x37505c8c] IID741 + __ eshrq(r24, Address(r23, r14, (Address::ScaleFactor)3, -0x71e75ab0), false); // {EVEX}shr r24, qword ptr [r23+r14*8-0x71e75ab0], cl IID742 + __ eshrq(r25, Address(r19, r10, (Address::ScaleFactor)1, +0x507b0a88), true); // {NF}shr r25, qword ptr [r19+r10*2+0x507b0a88], cl IID743 + __ etzcntq(r31, Address(rbx, r16, (Address::ScaleFactor)0, +0x19d5192a), false); // {EVEX}tzcnt r31, qword ptr [rbx+r16*1+0x19d5192a] IID744 + __ etzcntq(r9, Address(r22, r28, (Address::ScaleFactor)2, +0x211007cd), true); // {NF}tzcnt r9, qword ptr [r22+r28*4+0x211007cd] IID745 + __ eaddq(r16, Address(r21, rbx, (Address::ScaleFactor)3, -0x823fa1e), r28, false); // {EVEX}add r16, qword ptr [r21+rbx*8-0x823fa1e], r28 IID746 + __ eaddq(r15, Address(rdx, r8, (Address::ScaleFactor)3, -0x34b9a058), r15, false); // add r15, qword ptr [rdx+r8*8-0x34b9a058] IID747 + __ eaddq(r24, Address(r14, r24, (Address::ScaleFactor)3, +0x6cdc59d2), r13, true); // {NF}add r24, qword ptr [r14+r24*8+0x6cdc59d2], r13 IID748 + __ eaddq(rbx, Address(r27, r14, (Address::ScaleFactor)3, +0x36c5e8de), rbx, true); // {NF}add rbx, qword ptr [r27+r14*8+0x36c5e8de], rbx IID749 + __ eandq(r21, Address(r27, r27, (Address::ScaleFactor)1, -0x2c023b13), r27, false); // {EVEX}and r21, qword ptr [r27+r27*2-0x2c023b13], r27 IID750 + __ eandq(r31, Address(r21, r15, (Address::ScaleFactor)2, +0x6ef2c74a), r31, false); // and r31, qword ptr [r21+r15*4+0x6ef2c74a] IID751 + __ eandq(r13, Address(r31, r25, (Address::ScaleFactor)1, +0x734fe9ab), r27, true); // {NF}and r13, qword ptr [r31+r25*2+0x734fe9ab], r27 IID752 + __ eandq(r15, Address(r14, r29, (Address::ScaleFactor)3, -0x6e68556), r15, true); // {NF}and r15, qword ptr [r14+r29*8-0x6e68556], r15 IID753 + __ eorq(r12, Address(r30, r15, (Address::ScaleFactor)3, +0x3ba33f9e), r28, false); // {EVEX}or r12, qword ptr [r30+r15*8+0x3ba33f9e], r28 IID754 + __ eorq(r16, Address(r12, r9, (Address::ScaleFactor)0, -0x28e03b33), r16, false); // or r16, qword ptr [r12+r9*1-0x28e03b33] IID755 + __ eorq(r8, Address(r8, r25, (Address::ScaleFactor)3, -0x1e42bd95), r27, true); // {NF}or r8, qword ptr [r8+r25*8-0x1e42bd95], r27 IID756 + __ eorq(rcx, Address(r27, rbx, (Address::ScaleFactor)2, +0x7be4bcad), rcx, true); // {NF}or rcx, qword ptr [r27+rbx*4+0x7be4bcad], rcx IID757 + __ esubq(r24, Address(r23, r22, (Address::ScaleFactor)2, +0x6f8827d7), rdx, false); // {EVEX}sub r24, qword ptr [r23+r22*4+0x6f8827d7], rdx IID758 + __ esubq(r21, Address(r10, -0x635b8c8), r21, false); // {EVEX}sub r21, qword ptr [r10-0x635b8c8], r21 IID759 + __ esubq(r23, Address(r27, r26, (Address::ScaleFactor)3, +0x922bcc0), rbx, true); // {NF}sub r23, qword ptr [r27+r26*8+0x922bcc0], rbx IID760 + __ esubq(r25, Address(r23, r15, (Address::ScaleFactor)0, -0x38f494ac), r25, true); // {NF}sub r25, qword ptr [r23+r15*1-0x38f494ac], r25 IID761 + __ exorq(r11, Address(r12, r19, (Address::ScaleFactor)2, -0x5b71ec17), rcx, false); // {EVEX}xor r11, qword ptr [r12+r19*4-0x5b71ec17], rcx IID762 + __ exorq(r28, Address(r19, r18, (Address::ScaleFactor)0, +0x716b9b7e), r28, false); // xor r28, qword ptr [r19+r18*1+0x716b9b7e] IID763 + __ exorq(r21, Address(rcx, r29, (Address::ScaleFactor)0, -0x5af0441e), r16, true); // {NF}xor r21, qword ptr [rcx+r29*1-0x5af0441e], r16 IID764 + __ exorq(r12, Address(r20, r26, (Address::ScaleFactor)0, +0xe0b7fb1), r12, true); // {NF}xor r12, qword ptr [r20+r26*1+0xe0b7fb1], r12 IID765 + __ eaddq(r30, Address(rcx, +0x2d3b7b4f), 1048576, false); // {EVEX}add r30, qword ptr [rcx+0x2d3b7b4f], 1048576 IID766 + __ eaddq(r14, Address(r21, r15, (Address::ScaleFactor)2, -0x1222aee8), 4096, true); // {NF}add r14, qword ptr [r21+r15*4-0x1222aee8], 4096 IID767 + __ eandq(r23, Address(r20, r31, (Address::ScaleFactor)0, -0x96e4d6a), 16, false); // {EVEX}and r23, qword ptr [r20+r31*1-0x96e4d6a], 16 IID768 + __ eandq(r10, Address(rdx, rdx, (Address::ScaleFactor)3, +0x3875f17c), 1, true); // {NF}and r10, qword ptr [rdx+rdx*8+0x3875f17c], 1 IID769 + __ eimulq(r17, Address(rcx, r25, (Address::ScaleFactor)2, +0x32c71076), 4096, false); // {EVEX}imul r17, qword ptr [rcx+r25*4+0x32c71076], 4096 IID770 + __ eimulq(r19, Address(r31, rbx, (Address::ScaleFactor)2, +0x7bada60d), 1048576, true); // {NF}imul r19, qword ptr [r31+rbx*4+0x7bada60d], 1048576 IID771 + __ eorq(r25, Address(r18, r23, (Address::ScaleFactor)1, +0x48147444), 16777216, false); // {EVEX}or r25, qword ptr [r18+r23*2+0x48147444], 16777216 IID772 + __ eorq(r29, Address(r26, r27, (Address::ScaleFactor)1, -0x4b113958), 1048576, true); // {NF}or r29, qword ptr [r26+r27*2-0x4b113958], 1048576 IID773 + __ esalq(r31, Address(r18, -0x46103c74), 2, false); // {EVEX}sal r31, qword ptr [r18-0x46103c74], 2 IID774 + __ esalq(r25, Address(r10, r15, (Address::ScaleFactor)0, +0x48925da4), 16, true); // {NF}sal r25, qword ptr [r10+r15*1+0x48925da4], 16 IID775 + __ esarq(r26, Address(r18, -0x5ea1c542), 8, false); // {EVEX}sar r26, qword ptr [r18-0x5ea1c542], 8 IID776 + __ esarq(r12, Address(r10, r22, (Address::ScaleFactor)2, +0x5d958264), 8, true); // {NF}sar r12, qword ptr [r10+r22*4+0x5d958264], 8 IID777 + __ eshrq(rdx, Address(r17, r20, (Address::ScaleFactor)2, +0x295add23), 16, false); // {EVEX}shr rdx, qword ptr [r17+r20*4+0x295add23], 16 IID778 + __ eshrq(rbx, Address(r22, r28, (Address::ScaleFactor)1, +0x782929cb), 2, true); // {NF}shr rbx, qword ptr [r22+r28*2+0x782929cb], 2 IID779 + __ esubq(r19, Address(r23, -0x49811d72), 1, false); // {EVEX}sub r19, qword ptr [r23-0x49811d72], 1 IID780 + __ esubq(r8, Address(r19, r14, (Address::ScaleFactor)2, -0x1b2bae9a), 1048576, true); // {NF}sub r8, qword ptr [r19+r14*4-0x1b2bae9a], 1048576 IID781 + __ exorq(r19, Address(rcx, r10, (Address::ScaleFactor)0, +0x45a66ee9), 1048576, false); // {EVEX}xor r19, qword ptr [rcx+r10*1+0x45a66ee9], 1048576 IID782 + __ exorq(r28, Address(r9, r29, (Address::ScaleFactor)0, -0x28a19314), 16, true); // {NF}xor r28, qword ptr [r9+r29*1-0x28a19314], 16 IID783 + __ eaddq(r8, rcx, 16777216, false); // {EVEX}add r8, rcx, 16777216 IID784 + __ eaddq(rax, r14, 16777216, false); // {EVEX}add rax, r14, 16777216 IID785 + __ eaddq(r16, r16, 256, false); // add r16, 256 IID786 + __ eaddq(r24, r9, 4096, true); // {NF}add r24, r9, 4096 IID787 + __ eaddq(rax, r18, 4096, true); // {NF}add rax, r18, 4096 IID788 + __ eaddq(r8, r8, 1, true); // {NF}add r8, r8, 1 IID789 + __ eandq(r15, r22, 1048576, false); // {EVEX}and r15, r22, 1048576 IID790 + __ eandq(rax, r26, 1048576, false); // {EVEX}and rax, r26, 1048576 IID791 + __ eandq(rdx, rdx, 4096, false); // and rdx, 4096 IID792 + __ eandq(rdx, r22, 268435456, true); // {NF}and rdx, r22, 268435456 IID793 + __ eandq(rax, r29, 268435456, true); // {NF}and rax, r29, 268435456 IID794 + __ eandq(r23, r23, 16777216, true); // {NF}and r23, r23, 16777216 IID795 + __ eimulq(r9, r13, 1048576, false); // {EVEX}imul r9, r13, 1048576 IID796 + __ eimulq(rax, r18, 1048576, false); // {EVEX}imul rax, r18, 1048576 IID797 + __ eimulq(r16, r16, 1048576, false); // {EVEX}imul r16, r16, 1048576 IID798 + __ eimulq(r17, r23, 1, true); // {NF}imul r17, r23, 1 IID799 + __ eimulq(rax, r12, 1, true); // {NF}imul rax, r12, 1 IID800 + __ eimulq(r10, r10, 268435456, true); // {NF}imul r10, r10, 268435456 IID801 + __ eorq(rdx, r19, 256, false); // {EVEX}or rdx, r19, 256 IID802 + __ eorq(rax, r14, 256, false); // {EVEX}or rax, r14, 256 IID803 + __ eorq(r13, r13, 1, false); // or r13, 1 IID804 + __ eorq(r25, r29, 256, true); // {NF}or r25, r29, 256 IID805 + __ eorq(rax, rdx, 256, true); // {NF}or rax, rdx, 256 IID806 + __ eorq(r16, r16, 16, true); // {NF}or r16, r16, 16 IID807 + __ erclq(r13, r19, 4); // {EVEX}rcl r13, r19, 4 IID808 + __ erclq(rax, r12, 4); // {EVEX}rcl rax, r12, 4 IID809 + __ erclq(r9, r9, 4); // rcl r9, 4 IID810 + __ erolq(r13, r16, 1, false); // {EVEX}rol r13, r16, 1 IID811 + __ erolq(rax, r31, 1, false); // {EVEX}rol rax, r31, 1 IID812 + __ erolq(r30, r30, 8, false); // rol r30, 8 IID813 + __ erolq(r30, r20, 8, true); // {NF}rol r30, r20, 8 IID814 + __ erolq(rax, r31, 8, true); // {NF}rol rax, r31, 8 IID815 + __ erolq(r31, r31, 4, true); // {NF}rol r31, r31, 4 IID816 + __ erorq(r22, r10, 4, false); // {EVEX}ror r22, r10, 4 IID817 + __ erorq(rax, r13, 4, false); // {EVEX}ror rax, r13, 4 IID818 + __ erorq(r24, r24, 16, false); // ror r24, 16 IID819 + __ erorq(r29, r22, 16, true); // {NF}ror r29, r22, 16 IID820 + __ erorq(rax, r20, 16, true); // {NF}ror rax, r20, 16 IID821 + __ erorq(r27, r27, 4, true); // {NF}ror r27, r27, 4 IID822 + __ esalq(r31, r19, 2, false); // {EVEX}sal r31, r19, 2 IID823 + __ esalq(rax, r20, 2, false); // {EVEX}sal rax, r20, 2 IID824 + __ esalq(r11, r11, 8, false); // sal r11, 8 IID825 + __ esalq(rdx, r15, 1, true); // {NF}sal rdx, r15, 1 IID826 + __ esalq(rax, r10, 1, true); // {NF}sal rax, r10, 1 IID827 + __ esalq(r29, r29, 4, true); // {NF}sal r29, r29, 4 IID828 + __ esarq(r20, r16, 1, false); // {EVEX}sar r20, r16, 1 IID829 + __ esarq(rax, r21, 1, false); // {EVEX}sar rax, r21, 1 IID830 + __ esarq(r28, r28, 8, false); // sar r28, 8 IID831 + __ esarq(r30, rcx, 4, true); // {NF}sar r30, rcx, 4 IID832 + __ esarq(rax, r15, 4, true); // {NF}sar rax, r15, 4 IID833 + __ esarq(rcx, rcx, 4, true); // {NF}sar rcx, rcx, 4 IID834 + __ eshlq(rdx, r26, 4, false); // {EVEX}shl rdx, r26, 4 IID835 + __ eshlq(rax, r26, 4, false); // {EVEX}shl rax, r26, 4 IID836 + __ eshlq(r8, r8, 4, false); // shl r8, 4 IID837 + __ eshlq(rcx, rcx, 1, true); // {NF}shl rcx, rcx, 1 IID838 + __ eshlq(rax, rcx, 1, true); // {NF}shl rax, rcx, 1 IID839 + __ eshlq(r13, r13, 2, true); // {NF}shl r13, r13, 2 IID840 + __ eshrq(r14, r27, 2, false); // {EVEX}shr r14, r27, 2 IID841 + __ eshrq(rax, r11, 2, false); // {EVEX}shr rax, r11, 2 IID842 + __ eshrq(r9, r9, 16, false); // shr r9, 16 IID843 + __ eshrq(rdx, r31, 2, true); // {NF}shr rdx, r31, 2 IID844 + __ eshrq(rax, r14, 2, true); // {NF}shr rax, r14, 2 IID845 + __ eshrq(r12, r12, 8, true); // {NF}shr r12, r12, 8 IID846 + __ esubq(r10, r28, 1, false); // {EVEX}sub r10, r28, 1 IID847 + __ esubq(rax, r8, 1, false); // {EVEX}sub rax, r8, 1 IID848 + __ esubq(rcx, rcx, 16777216, false); // sub rcx, 16777216 IID849 + __ esubq(rdx, rbx, 16777216, true); // {NF}sub rdx, rbx, 16777216 IID850 + __ esubq(rax, r18, 16777216, true); // {NF}sub rax, r18, 16777216 IID851 + __ esubq(r27, r27, 65536, true); // {NF}sub r27, r27, 65536 IID852 + __ exorq(r30, rcx, 4096, false); // {EVEX}xor r30, rcx, 4096 IID853 + __ exorq(rax, r21, 4096, false); // {EVEX}xor rax, r21, 4096 IID854 + __ exorq(rcx, rcx, 16777216, false); // xor rcx, 16777216 IID855 + __ exorq(r21, r12, 1, true); // {NF}xor r21, r12, 1 IID856 + __ exorq(rax, rdx, 1, true); // {NF}xor rax, rdx, 1 IID857 + __ exorq(rbx, rbx, 16777216, true); // {NF}xor rbx, rbx, 16777216 IID858 + __ eorq_imm32(r11, rdx, 65536, false); // {EVEX}or r11, rdx, 65536 IID859 + __ eorq_imm32(rax, r14, 65536, false); // {EVEX}or rax, r14, 65536 IID860 + __ eorq_imm32(r14, r14, 262144, false); // or r14, 262144 IID861 + __ eorq_imm32(r25, r29, 262144, false); // {EVEX}or r25, r29, 262144 IID862 + __ eorq_imm32(rax, r21, 262144, false); // {EVEX}or rax, r21, 262144 IID863 + __ eorq_imm32(r11, r11, 16777216, false); // or r11, 16777216 IID864 + __ esubq_imm32(r29, r19, 67108864, false); // {EVEX}sub r29, r19, 67108864 IID865 + __ esubq_imm32(rax, r11, 67108864, false); // {EVEX}sub rax, r11, 67108864 IID866 + __ esubq_imm32(r18, r18, 67108864, false); // sub r18, 67108864 IID867 + __ esubq_imm32(r28, r23, 4194304, true); // {NF}sub r28, r23, 4194304 IID868 + __ esubq_imm32(rax, r21, 4194304, true); // {NF}sub rax, r21, 4194304 IID869 + __ esubq_imm32(r16, r16, 16777216, true); // {NF}sub r16, r16, 16777216 IID870 + __ eaddq(r8, r25, Address(r26, r8, (Address::ScaleFactor)1, +0x10633def), false); // {EVEX}add r8, r25, qword ptr [r26+r8*2+0x10633def] IID871 + __ eaddq(r13, r13, Address(r18, r16, (Address::ScaleFactor)1, -0x74204508), false); // add r13, qword ptr [r18+r16*2-0x74204508] IID872 + __ eaddq(r17, r26, Address(r12, +0x23a80abf), true); // {NF}add r17, r26, qword ptr [r12+0x23a80abf] IID873 + __ eaddq(r9, r9, Address(r29, r19, (Address::ScaleFactor)0, -0x29e9e52), true); // {NF}add r9, r9, qword ptr [r29+r19*1-0x29e9e52] IID874 + __ eandq(r9, r28, Address(rcx, r25, (Address::ScaleFactor)2, +0x4261ffaa), false); // {EVEX}and r9, r28, qword ptr [rcx+r25*4+0x4261ffaa] IID875 + __ eandq(r27, r27, Address(rdx, r28, (Address::ScaleFactor)0, -0x26bdc9c1), false); // and r27, qword ptr [rdx+r28*1-0x26bdc9c1] IID876 + __ eandq(r14, r11, Address(r16, +0x63ba0ddf), true); // {NF}and r14, r11, qword ptr [r16+0x63ba0ddf] IID877 + __ eandq(r8, r8, Address(r22, r25, (Address::ScaleFactor)1, -0x43b6ab44), true); // {NF}and r8, r8, qword ptr [r22+r25*2-0x43b6ab44] IID878 + __ eorq(r19, rcx, Address(r27, rcx, (Address::ScaleFactor)2, -0x7f687fc6), false); // {EVEX}or r19, rcx, qword ptr [r27+rcx*4-0x7f687fc6] IID879 + __ eorq(r19, r19, Address(rbx, r26, (Address::ScaleFactor)1, -0x486db7ea), false); // or r19, qword ptr [rbx+r26*2-0x486db7ea] IID880 + __ eorq(r30, r10, Address(r14, r18, (Address::ScaleFactor)3, +0x14884884), true); // {NF}or r30, r10, qword ptr [r14+r18*8+0x14884884] IID881 + __ eorq(r27, r27, Address(r29, +0x20337180), true); // {NF}or r27, r27, qword ptr [r29+0x20337180] IID882 + __ eimulq(rcx, r21, Address(r21, rbx, (Address::ScaleFactor)0, -0x3303888e), false); // {EVEX}imul rcx, r21, qword ptr [r21+rbx*1-0x3303888e] IID883 + __ eimulq(rdx, rdx, Address(r28, r9, (Address::ScaleFactor)3, -0x7ad8f741), false); // imul rdx, qword ptr [r28+r9*8-0x7ad8f741] IID884 + __ eimulq(r8, r29, Address(r17, r12, (Address::ScaleFactor)0, +0x6e85396a), true); // {NF}imul r8, r29, qword ptr [r17+r12*1+0x6e85396a] IID885 + __ eimulq(r16, r16, Address(r19, r10, (Address::ScaleFactor)3, -0x49599300), true); // {NF}imul r16, r16, qword ptr [r19+r10*8-0x49599300] IID886 + __ esubq(r20, r17, Address(r13, r22, (Address::ScaleFactor)0, +0x1d219a4f), false); // {EVEX}sub r20, r17, qword ptr [r13+r22*1+0x1d219a4f] IID887 + __ esubq(r25, r25, Address(r21, r21, (Address::ScaleFactor)3, -0x6868a8c7), false); // sub r25, qword ptr [r21+r21*8-0x6868a8c7] IID888 + __ esubq(r20, r24, Address(rbx, r20, (Address::ScaleFactor)2, +0x32c59da6), true); // {NF}sub r20, r24, qword ptr [rbx+r20*4+0x32c59da6] IID889 + __ esubq(r8, r8, Address(r12, r17, (Address::ScaleFactor)0, -0x26be2dcf), true); // {NF}sub r8, r8, qword ptr [r12+r17*1-0x26be2dcf] IID890 + __ exorq(rdx, r19, Address(r9, +0x7d903b91), false); // {EVEX}xor rdx, r19, qword ptr [r9+0x7d903b91] IID891 + __ exorq(r28, r28, Address(r29, r27, (Address::ScaleFactor)2, +0x53091f6f), false); // xor r28, qword ptr [r29+r27*4+0x53091f6f] IID892 + __ exorq(r17, r16, Address(r27, +0x7c6e9207), true); // {NF}xor r17, r16, qword ptr [r27+0x7c6e9207] IID893 + __ exorq(r15, r15, Address(r13, r24, (Address::ScaleFactor)3, -0x75c87960), true); // {NF}xor r15, r15, qword ptr [r13+r24*8-0x75c87960] IID894 + __ eaddq(r16, rbx, r18, false); // {load}{EVEX}add r16, rbx, r18 IID895 + __ eaddq(r24, r24, r18, false); // {load}add r24, r18 IID896 + __ eaddq(r9, r15, r9, false); // {load}add r9, r15 IID897 + __ eaddq(r19, r26, r13, true); // {load}{NF}add r19, r26, r13 IID898 + __ eaddq(r28, r28, r22, true); // {load}{NF}add r28, r28, r22 IID899 + __ eaddq(r22, r11, r22, true); // {load}{NF}add r22, r11, r22 IID900 + __ eadcxq(rcx, r12, r13); // {load}{EVEX}adcx rcx, r12, r13 IID901 + __ eadcxq(r30, r30, r12); // {load}adcx r30, r12 IID902 + __ eadoxq(r28, r14, r18); // {load}{EVEX}adox r28, r14, r18 IID903 + __ eadoxq(r30, r30, r19); // {load}adox r30, r19 IID904 + __ eandq(r20, r14, r14, false); // {load}{EVEX}and r20, r14, r14 IID905 + __ eandq(r17, r17, r23, false); // {load}and r17, r23 IID906 + __ eandq(r17, r14, r17, false); // {load}and r17, r14 IID907 + __ eandq(r19, r20, r15, true); // {load}{NF}and r19, r20, r15 IID908 + __ eandq(rbx, rbx, r13, true); // {load}{NF}and rbx, rbx, r13 IID909 + __ eandq(r22, r30, r22, true); // {load}{NF}and r22, r30, r22 IID910 + __ eimulq(r17, r24, rcx, false); // {load}{EVEX}imul r17, r24, rcx IID911 + __ eimulq(r21, r21, r8, false); // {load}imul r21, r8 IID912 + __ eimulq(r29, r21, r29, false); // {load}imul r29, r21 IID913 + __ eimulq(r27, r13, r23, true); // {load}{NF}imul r27, r13, r23 IID914 + __ eimulq(r26, r26, r8, true); // {load}{NF}imul r26, r26, r8 IID915 + __ eimulq(r22, r13, r22, true); // {load}{NF}imul r22, r13, r22 IID916 + __ eorq(r11, rdx, r29, false); // {load}{EVEX}or r11, rdx, r29 IID917 + __ eorq(rdx, rdx, r31, false); // {load}or rdx, r31 IID918 + __ eorq(r10, r29, r10, false); // {load}or r10, r29 IID919 + __ eorq(r27, r28, rcx, true); // {load}{NF}or r27, r28, rcx IID920 + __ eorq(r25, r25, r9, true); // {load}{NF}or r25, r25, r9 IID921 + __ eorq(rcx, r8, rcx, true); // {load}{NF}or rcx, r8, rcx IID922 + __ esubq(rcx, r10, r16, false); // {load}{EVEX}sub rcx, r10, r16 IID923 + __ esubq(r17, r17, rcx, false); // {load}sub r17, rcx IID924 + __ esubq(r13, r21, r24, true); // {load}{NF}sub r13, r21, r24 IID925 + __ esubq(r31, r31, r28, true); // {load}{NF}sub r31, r31, r28 IID926 + __ exorq(r23, r28, r23, false); // {load}xor r23, r28 IID927 + __ exorq(r10, r10, r11, false); // {load}xor r10, r11 IID928 + __ exorq(r19, r18, r19, false); // {load}xor r19, r18 IID929 + __ exorq(r31, r9, rdx, true); // {load}{NF}xor r31, r9, rdx IID930 + __ exorq(r13, r13, r9, true); // {load}{NF}xor r13, r13, r9 IID931 + __ exorq(rcx, r10, rcx, true); // {load}{NF}xor rcx, r10, rcx IID932 + __ eshldq(r12, r24, r22, 8, false); // {EVEX}shld r12, r24, r22, 8 IID933 + __ eshldq(r25, r25, r25, 8, false); // shld r25, r25, 8 IID934 + __ eshldq(r21, r20, r15, 8, true); // {NF}shld r21, r20, r15, 8 IID935 + __ eshldq(r21, r21, r10, 8, true); // {NF}shld r21, r21, r10, 8 IID936 + __ eshrdq(r18, r18, r8, 2, false); // shrd r18, r8, 2 IID937 + __ eshrdq(r26, r26, r29, 8, false); // shrd r26, r29, 8 IID938 + __ eshrdq(r29, r26, r19, 2, true); // {NF}shrd r29, r26, r19, 2 IID939 + __ eshrdq(r12, r12, rcx, 4, true); // {NF}shrd r12, r12, rcx, 4 IID940 + __ ecmovq (Assembler::Condition::overflow, r21, r22, r23); // cmovo r21, r22, r23 IID941 + __ ecmovq (Assembler::Condition::overflow, r9, r9, r13); // cmovo r9, r13 IID942 + __ ecmovq (Assembler::Condition::noOverflow, rcx, r23, r24); // cmovno rcx, r23, r24 IID943 + __ ecmovq (Assembler::Condition::noOverflow, r28, r28, rdx); // cmovno r28, rdx IID944 + __ ecmovq (Assembler::Condition::below, r14, r31, r23); // cmovb r14, r31, r23 IID945 + __ ecmovq (Assembler::Condition::below, r30, r30, r23); // cmovb r30, r23 IID946 + __ ecmovq (Assembler::Condition::aboveEqual, r10, r29, r22); // cmovae r10, r29, r22 IID947 + __ ecmovq (Assembler::Condition::aboveEqual, rbx, rbx, r26); // cmovae rbx, r26 IID948 + __ ecmovq (Assembler::Condition::zero, r23, r21, r13); // cmovz r23, r21, r13 IID949 + __ ecmovq (Assembler::Condition::zero, r10, r10, r20); // cmovz r10, r20 IID950 + __ ecmovq (Assembler::Condition::notZero, rbx, r9, r29); // cmovnz rbx, r9, r29 IID951 + __ ecmovq (Assembler::Condition::notZero, r16, r16, r30); // cmovnz r16, r30 IID952 + __ ecmovq (Assembler::Condition::belowEqual, r13, rcx, r29); // cmovbe r13, rcx, r29 IID953 + __ ecmovq (Assembler::Condition::belowEqual, r31, r31, r13); // cmovbe r31, r13 IID954 + __ ecmovq (Assembler::Condition::above, r27, r9, r30); // cmova r27, r9, r30 IID955 + __ ecmovq (Assembler::Condition::above, r26, r26, r20); // cmova r26, r20 IID956 + __ ecmovq (Assembler::Condition::negative, r8, r12, r22); // cmovs r8, r12, r22 IID957 + __ ecmovq (Assembler::Condition::negative, r31, r31, r17); // cmovs r31, r17 IID958 + __ ecmovq (Assembler::Condition::positive, r29, rcx, r25); // cmovns r29, rcx, r25 IID959 + __ ecmovq (Assembler::Condition::positive, r22, r22, r14); // cmovns r22, r14 IID960 + __ ecmovq (Assembler::Condition::parity, rcx, r27, r9); // cmovp rcx, r27, r9 IID961 + __ ecmovq (Assembler::Condition::parity, r22, r22, r11); // cmovp r22, r11 IID962 + __ ecmovq (Assembler::Condition::noParity, r14, r19, r24); // cmovnp r14, r19, r24 IID963 + __ ecmovq (Assembler::Condition::noParity, r24, r24, r17); // cmovnp r24, r17 IID964 + __ ecmovq (Assembler::Condition::less, r17, r19, r30); // cmovl r17, r19, r30 IID965 + __ ecmovq (Assembler::Condition::less, r19, r19, r14); // cmovl r19, r14 IID966 + __ ecmovq (Assembler::Condition::greaterEqual, r25, r11, r29); // cmovge r25, r11, r29 IID967 + __ ecmovq (Assembler::Condition::greaterEqual, r12, r12, r26); // cmovge r12, r26 IID968 + __ ecmovq (Assembler::Condition::lessEqual, r11, rbx, r10); // cmovle r11, rbx, r10 IID969 + __ ecmovq (Assembler::Condition::lessEqual, rdx, rdx, r22); // cmovle rdx, r22 IID970 + __ ecmovq (Assembler::Condition::greater, r14, r15, r23); // cmovg r14, r15, r23 IID971 + __ ecmovq (Assembler::Condition::greater, r8, r8, r24); // cmovg r8, r24 IID972 + __ ecmovq (Assembler::Condition::overflow, rbx, r31, Address(r10, r8, (Address::ScaleFactor)3, -0x313f60e0)); // cmovo rbx, r31, qword ptr [r10+r8*8-0x313f60e0] IID973 + __ ecmovq (Assembler::Condition::overflow, r23, r23, Address(rcx, r24, (Address::ScaleFactor)2, +0x17f41d9c)); // cmovo r23, qword ptr [rcx+r24*4+0x17f41d9c] IID974 + __ ecmovq (Assembler::Condition::noOverflow, r31, r11, Address(r16, +0x2c018942)); // cmovno r31, r11, qword ptr [r16+0x2c018942] IID975 + __ ecmovq (Assembler::Condition::noOverflow, r11, r11, Address(r16, r20, (Address::ScaleFactor)3, +0x674b6a55)); // cmovno r11, qword ptr [r16+r20*8+0x674b6a55] IID976 + __ ecmovq (Assembler::Condition::below, r9, r13, Address(r9, rcx, (Address::ScaleFactor)0, +0x394a11df)); // cmovb r9, r13, qword ptr [r9+rcx*1+0x394a11df] IID977 + __ ecmovq (Assembler::Condition::below, r30, r30, Address(rdx, r22, (Address::ScaleFactor)1, -0x6c362b88)); // cmovb r30, qword ptr [rdx+r22*2-0x6c362b88] IID978 + __ ecmovq (Assembler::Condition::aboveEqual, r13, rcx, Address(r24, rcx, (Address::ScaleFactor)3, +0x46500b66)); // cmovae r13, rcx, qword ptr [r24+rcx*8+0x46500b66] IID979 + __ ecmovq (Assembler::Condition::aboveEqual, r24, r24, Address(r18, r25, (Address::ScaleFactor)1, +0x53283b7c)); // cmovae r24, qword ptr [r18+r25*2+0x53283b7c] IID980 + __ ecmovq (Assembler::Condition::zero, r23, r25, Address(r15, r9, (Address::ScaleFactor)0, -0x5f03031e)); // cmovz r23, r25, qword ptr [r15+r9*1-0x5f03031e] IID981 + __ ecmovq (Assembler::Condition::zero, r25, r25, Address(r28, r16, (Address::ScaleFactor)1, -0x53cef514)); // cmovz r25, qword ptr [r28+r16*2-0x53cef514] IID982 + __ ecmovq (Assembler::Condition::notZero, rbx, r25, Address(r24, r25, (Address::ScaleFactor)2, -0x66caac87)); // cmovnz rbx, r25, qword ptr [r24+r25*4-0x66caac87] IID983 + __ ecmovq (Assembler::Condition::notZero, r16, r16, Address(r27, r30, (Address::ScaleFactor)3, +0x797f455d)); // cmovnz r16, qword ptr [r27+r30*8+0x797f455d] IID984 + __ ecmovq (Assembler::Condition::belowEqual, r25, r30, Address(r18, r18, (Address::ScaleFactor)1, +0x1c9daacd)); // cmovbe r25, r30, qword ptr [r18+r18*2+0x1c9daacd] IID985 + __ ecmovq (Assembler::Condition::belowEqual, r22, r22, Address(rcx, r25, (Address::ScaleFactor)1, -0x3dcbfaa9)); // cmovbe r22, qword ptr [rcx+r25*2-0x3dcbfaa9] IID986 + __ ecmovq (Assembler::Condition::above, r24, r26, Address(r25, +0x747060b5)); // cmova r24, r26, qword ptr [r25+0x747060b5] IID987 + __ ecmovq (Assembler::Condition::above, r8, r8, Address(r24, r20, (Address::ScaleFactor)3, +0x47d285f6)); // cmova r8, qword ptr [r24+r20*8+0x47d285f6] IID988 + __ ecmovq (Assembler::Condition::negative, r12, r16, Address(r13, r10, (Address::ScaleFactor)2, +0x34e5b214)); // cmovs r12, r16, qword ptr [r13+r10*4+0x34e5b214] IID989 + __ ecmovq (Assembler::Condition::negative, rdx, rdx, Address(r15, r19, (Address::ScaleFactor)0, -0x405138b1)); // cmovs rdx, qword ptr [r15+r19*1-0x405138b1] IID990 + __ ecmovq (Assembler::Condition::positive, r18, r21, Address(rbx, r13, (Address::ScaleFactor)2, +0x51b19197)); // cmovns r18, r21, qword ptr [rbx+r13*4+0x51b19197] IID991 + __ ecmovq (Assembler::Condition::positive, r24, r24, Address(r11, r31, (Address::ScaleFactor)3, +0x3e01520a)); // cmovns r24, qword ptr [r11+r31*8+0x3e01520a] IID992 + __ ecmovq (Assembler::Condition::parity, r29, r26, Address(r10, r25, (Address::ScaleFactor)3, -0x5f7c3872)); // cmovp r29, r26, qword ptr [r10+r25*8-0x5f7c3872] IID993 + __ ecmovq (Assembler::Condition::parity, r11, r11, Address(r22, r10, (Address::ScaleFactor)3, -0x68731453)); // cmovp r11, qword ptr [r22+r10*8-0x68731453] IID994 + __ ecmovq (Assembler::Condition::noParity, r20, r15, Address(r9, r25, (Address::ScaleFactor)0, +0x4a37edaa)); // cmovnp r20, r15, qword ptr [r9+r25*1+0x4a37edaa] IID995 + __ ecmovq (Assembler::Condition::noParity, r31, r31, Address(r9, r20, (Address::ScaleFactor)0, +0x4f999f86)); // cmovnp r31, qword ptr [r9+r20*1+0x4f999f86] IID996 + __ ecmovq (Assembler::Condition::less, r18, r23, Address(r9, r27, (Address::ScaleFactor)0, -0x3410441d)); // cmovl r18, r23, qword ptr [r9+r27*1-0x3410441d] IID997 + __ ecmovq (Assembler::Condition::less, r16, r16, Address(r24, r10, (Address::ScaleFactor)3, +0x52ed66ee)); // cmovl r16, qword ptr [r24+r10*8+0x52ed66ee] IID998 + __ ecmovq (Assembler::Condition::greaterEqual, r11, r18, Address(rcx, +0x1de09163)); // cmovge r11, r18, qword ptr [rcx+0x1de09163] IID999 + __ ecmovq (Assembler::Condition::greaterEqual, r14, r14, Address(r24, r23, (Address::ScaleFactor)1, +0x5df3b4da)); // cmovge r14, qword ptr [r24+r23*2+0x5df3b4da] IID1000 + __ ecmovq (Assembler::Condition::lessEqual, r15, r14, Address(r30, r20, (Address::ScaleFactor)1, +0x5c9ab976)); // cmovle r15, r14, qword ptr [r30+r20*2+0x5c9ab976] IID1001 + __ ecmovq (Assembler::Condition::lessEqual, r26, r26, Address(r18, r27, (Address::ScaleFactor)2, -0xd8c329)); // cmovle r26, qword ptr [r18+r27*4-0xd8c329] IID1002 + __ ecmovq (Assembler::Condition::greater, r29, r9, Address(r30, r20, (Address::ScaleFactor)3, -0x37a9cf8d)); // cmovg r29, r9, qword ptr [r30+r20*8-0x37a9cf8d] IID1003 + __ ecmovq (Assembler::Condition::greater, r20, r20, Address(r8, rbx, (Address::ScaleFactor)1, +0x1bdc7def)); // cmovg r20, qword ptr [r8+rbx*2+0x1bdc7def] IID1004 #endif // _LP64 static const uint8_t insns[] = @@ -1243,665 +1327,749 @@ 0x62, 0xd4, 0x68, 0x18, 0x81, 0xb4, 0x82, 0xb9, 0xe2, 0xe1, 0xe9, 0x00, 0x00, 0x00, 0x01, // IID265 0x62, 0xdc, 0x68, 0x1c, 0x81, 0xb4, 0x7d, 0xf8, 0xe2, 0x34, 0x1b, 0x00, 0x00, 0x00, 0x01, // IID266 0x62, 0x0c, 0x60, 0x10, 0x01, 0xac, 0x3b, 0xd8, 0xe7, 0x3c, 0x1f, // IID267 - 0x62, 0x4c, 0x1c, 0x10, 0x01, 0xa4, 0xc8, 0x3e, 0x12, 0xac, 0x9f, // IID268 + 0xd5, 0x55, 0x03, 0xa4, 0xc8, 0x3e, 0x12, 0xac, 0x9f, // IID268 0x62, 0x2c, 0x70, 0x14, 0x01, 0xac, 0xc2, 0x88, 0xe0, 0x08, 0xe4, // IID269 0x62, 0x94, 0x70, 0x1c, 0x01, 0x8c, 0x67, 0x16, 0x82, 0x5b, 0x01, // IID270 - 0x62, 0x64, 0x0c, 0x10, 0x09, 0xa4, 0xd3, 0x4c, 0xbf, 0xca, 0xb9, // IID271 - 0x62, 0x8c, 0x6c, 0x10, 0x09, 0x94, 0xd4, 0x3b, 0xa7, 0x23, 0x35, // IID272 - 0x62, 0x84, 0x34, 0x1c, 0x09, 0xac, 0x7f, 0xaa, 0x22, 0xf4, 0xd5, // IID273 - 0x62, 0xec, 0x7c, 0x14, 0x09, 0x87, 0x01, 0x9b, 0xaf, 0xe9, // IID274 - 0x62, 0x8c, 0x1c, 0x10, 0x08, 0xa4, 0x1e, 0x3a, 0x1e, 0x28, 0x17, // IID275 - 0x62, 0xb4, 0x68, 0x18, 0x08, 0x94, 0xbb, 0xbb, 0xb5, 0x77, 0x24, // IID276 - 0x62, 0x44, 0x7c, 0x14, 0x08, 0x84, 0x4b, 0x51, 0x2e, 0x8a, 0xce, // IID277 - 0x62, 0xd4, 0x60, 0x1c, 0x08, 0x9c, 0xe3, 0x2d, 0x84, 0x29, 0xdd, // IID278 - 0x62, 0x9c, 0x28, 0x10, 0x29, 0x94, 0x73, 0xd2, 0x31, 0x64, 0xc2, // IID279 - 0x62, 0x2c, 0x00, 0x10, 0x29, 0xbc, 0x6e, 0x19, 0x85, 0x21, 0x14, // IID280 - 0x62, 0x54, 0x54, 0x14, 0x29, 0xa9, 0x86, 0xed, 0xaf, 0xef, // IID281 - 0x62, 0x04, 0x04, 0x14, 0x29, 0xbc, 0x01, 0x9f, 0x76, 0x1e, 0xf5, // IID282 - 0x62, 0x7c, 0x04, 0x18, 0x31, 0xa2, 0xe5, 0xbc, 0x2b, 0x5c, // IID283 - 0x62, 0x4c, 0x20, 0x10, 0x31, 0x9c, 0x39, 0xb3, 0x78, 0x60, 0x5c, // IID284 - 0x62, 0x54, 0x6c, 0x14, 0x31, 0xb4, 0xd0, 0x7f, 0xc7, 0x12, 0xf6, // IID285 - 0x62, 0x54, 0x34, 0x1c, 0x31, 0x8f, 0xad, 0xcd, 0x5a, 0x77, // IID286 - 0x62, 0xac, 0x50, 0x10, 0x30, 0xbc, 0x52, 0xd5, 0x1f, 0xe3, 0x2f, // IID287 - 0x62, 0x5c, 0x2c, 0x18, 0x30, 0x93, 0xde, 0x50, 0x31, 0x0a, // IID288 - 0x62, 0x2c, 0x68, 0x14, 0x30, 0x84, 0xf6, 0x97, 0xe8, 0xd4, 0x1a, // IID289 - 0x62, 0x7c, 0x38, 0x1c, 0x30, 0x84, 0x20, 0x82, 0xae, 0x6e, 0x62, // IID290 - 0x62, 0xd4, 0x54, 0x10, 0x81, 0xc7, 0x00, 0x00, 0x10, 0x00, // IID291 - 0x62, 0xfc, 0x7c, 0x18, 0x81, 0xc2, 0x00, 0x00, 0x10, 0x00, // IID292 - 0xd5, 0x10, 0x81, 0xc2, 0x00, 0x01, 0x00, 0x00, // IID293 - 0x62, 0xfc, 0x14, 0x1c, 0x83, 0xc3, 0x10, // IID294 - 0x62, 0xfc, 0x7c, 0x1c, 0x83, 0xc7, 0x10, // IID295 - 0x62, 0xdc, 0x34, 0x14, 0x81, 0xc1, 0x00, 0x00, 0x00, 0x01, // IID296 - 0x62, 0xfc, 0x14, 0x10, 0x81, 0xe2, 0x00, 0x00, 0x10, 0x00, // IID297 - 0x62, 0xd4, 0x7c, 0x18, 0x81, 0xe6, 0x00, 0x00, 0x10, 0x00, // IID298 - 0xd5, 0x10, 0x81, 0xe3, 0x00, 0x00, 0x01, 0x00, // IID299 - 0x62, 0xdc, 0x24, 0x14, 0x81, 0xe1, 0x00, 0x00, 0x10, 0x00, // IID300 - 0x62, 0xfc, 0x7c, 0x1c, 0x81, 0xe4, 0x00, 0x00, 0x10, 0x00, // IID301 - 0x62, 0xdc, 0x1c, 0x14, 0x83, 0xe4, 0x10, // IID302 - 0x62, 0x6c, 0x7c, 0x08, 0x69, 0xfe, 0x00, 0x10, 0x00, 0x00, // IID303 -#endif // _LP64 - 0x62, 0xf4, 0x7c, 0x08, 0x69, 0xc3, 0x00, 0x10, 0x00, 0x00, // IID304 -#ifdef _LP64 - 0x62, 0x4c, 0x7c, 0x08, 0x69, 0xc0, 0x00, 0x00, 0x10, 0x00, // IID305 - 0x62, 0xec, 0x7c, 0x0c, 0x69, 0xe8, 0x00, 0x00, 0x01, 0x00, // IID306 - 0x62, 0xdc, 0x7c, 0x0c, 0x69, 0xc0, 0x00, 0x00, 0x01, 0x00, // IID307 - 0x62, 0x54, 0x7c, 0x0c, 0x6b, 0xed, 0x10, // IID308 - 0x62, 0xd4, 0x14, 0x10, 0x81, 0xc8, 0x00, 0x00, 0x00, 0x01, // IID309 - 0x62, 0xd4, 0x7c, 0x18, 0x81, 0xcc, 0x00, 0x00, 0x00, 0x01, // IID310 - 0xd5, 0x11, 0x81, 0xce, 0x00, 0x10, 0x00, 0x00, // IID311 - 0x62, 0xf4, 0x3c, 0x14, 0x83, 0xca, 0x10, // IID312 - 0x62, 0xd4, 0x7c, 0x1c, 0x83, 0xc8, 0x10, // IID313 - 0x62, 0xd4, 0x14, 0x1c, 0x81, 0xcd, 0x00, 0x10, 0x00, 0x00, // IID314 - 0x62, 0xd4, 0x34, 0x10, 0xd1, 0xd5, // IID315 - 0x62, 0xfc, 0x7c, 0x18, 0xd1, 0xd2, // IID316 - 0x41, 0xc1, 0xd1, 0x10, // IID317 - 0x62, 0xdc, 0x2c, 0x10, 0xc1, 0xc1, 0x08, // IID318 -#endif // _LP64 - 0x62, 0xf4, 0x7c, 0x18, 0xc1, 0xc2, 0x08, // IID319 -#ifdef _LP64 - 0xd5, 0x11, 0xc1, 0xc0, 0x10, // IID320 - 0x62, 0xf4, 0x3c, 0x14, 0xc1, 0xc1, 0x08, // IID321 - 0x62, 0xdc, 0x7c, 0x1c, 0xc1, 0xc6, 0x08, // IID322 - 0x62, 0xdc, 0x1c, 0x14, 0xc1, 0xc4, 0x10, // IID323 - 0x62, 0xdc, 0x74, 0x10, 0xc1, 0xcc, 0x04, // IID324 -#endif // _LP64 - 0x62, 0xf4, 0x7c, 0x18, 0xc1, 0xca, 0x04, // IID325 -#ifdef _LP64 - 0x41, 0xc1, 0xc8, 0x10, // IID326 - 0x62, 0xf4, 0x64, 0x14, 0xc1, 0xca, 0x10, // IID327 - 0x62, 0xdc, 0x7c, 0x1c, 0xc1, 0xcf, 0x10, // IID328 - 0x62, 0xfc, 0x4c, 0x14, 0xc1, 0xce, 0x08, // IID329 - 0x62, 0xdc, 0x44, 0x10, 0xc1, 0xe1, 0x10, // IID330 - 0x62, 0xd4, 0x7c, 0x18, 0xc1, 0xe6, 0x10, // IID331 - 0xd5, 0x11, 0xc1, 0xe7, 0x08, // IID332 - 0x62, 0xdc, 0x0c, 0x14, 0xc1, 0xe0, 0x02, // IID333 - 0x62, 0xdc, 0x7c, 0x1c, 0xc1, 0xe5, 0x02, // IID334 - 0x62, 0xd4, 0x3c, 0x1c, 0xc1, 0xe0, 0x02, // IID335 - 0x62, 0xdc, 0x6c, 0x10, 0xc1, 0xf8, 0x10, // IID336 - 0x62, 0xd4, 0x7c, 0x18, 0xc1, 0xfd, 0x10, // IID337 - 0xd5, 0x11, 0xd1, 0xf8, // IID338 - 0x62, 0xfc, 0x1c, 0x14, 0xc1, 0xf9, 0x10, // IID339 - 0x62, 0xdc, 0x7c, 0x1c, 0xc1, 0xf8, 0x10, // IID340 - 0x62, 0xfc, 0x74, 0x14, 0xc1, 0xf9, 0x04, // IID341 - 0x62, 0xf4, 0x3c, 0x10, 0xc1, 0xe1, 0x04, // IID342 - 0x62, 0xfc, 0x7c, 0x18, 0xc1, 0xe0, 0x04, // IID343 - 0x41, 0xc1, 0xe7, 0x02, // IID344 - 0x62, 0xdc, 0x0c, 0x1c, 0xc1, 0xe3, 0x04, // IID345 - 0x62, 0xfc, 0x7c, 0x1c, 0xc1, 0xe7, 0x04, // IID346 - 0x62, 0xdc, 0x0c, 0x14, 0xc1, 0xe6, 0x04, // IID347 - 0x62, 0xf4, 0x24, 0x10, 0xc1, 0xea, 0x02, // IID348 - 0x62, 0xfc, 0x7c, 0x18, 0xc1, 0xeb, 0x02, // IID349 - 0xd5, 0x10, 0xc1, 0xec, 0x02, // IID350 - 0x62, 0xfc, 0x54, 0x14, 0xd1, 0xef, // IID351 - 0x62, 0xdc, 0x7c, 0x1c, 0xd1, 0xee, // IID352 - 0x62, 0xdc, 0x34, 0x14, 0xc1, 0xe9, 0x02, // IID353 - 0x62, 0xfc, 0x3c, 0x10, 0x81, 0xeb, 0x00, 0x00, 0x10, 0x00, // IID354 - 0x62, 0xd4, 0x7c, 0x18, 0x81, 0xee, 0x00, 0x00, 0x10, 0x00, // IID355 - 0xd5, 0x10, 0x81, 0xee, 0x00, 0x00, 0x00, 0x10, // IID356 - 0x62, 0xdc, 0x3c, 0x14, 0x81, 0xe8, 0x00, 0x00, 0x01, 0x00, // IID357 - 0x62, 0xd4, 0x7c, 0x1c, 0x81, 0xee, 0x00, 0x00, 0x01, 0x00, // IID358 - 0x62, 0xdc, 0x1c, 0x14, 0x81, 0xec, 0x00, 0x00, 0x00, 0x10, // IID359 - 0x62, 0xfc, 0x64, 0x18, 0x81, 0xf4, 0x00, 0x01, 0x00, 0x00, // IID360 - 0x62, 0xd4, 0x7c, 0x18, 0x81, 0xf7, 0x00, 0x01, 0x00, 0x00, // IID361 -#endif // _LP64 - 0x81, 0xf3, 0x00, 0x10, 0x00, 0x00, // IID362 -#ifdef _LP64 - 0x62, 0xdc, 0x3c, 0x14, 0x81, 0xf6, 0x00, 0x00, 0x01, 0x00, // IID363 - 0x62, 0xdc, 0x7c, 0x1c, 0x81, 0xf7, 0x00, 0x00, 0x01, 0x00, // IID364 - 0x62, 0xdc, 0x04, 0x14, 0x81, 0xf7, 0x00, 0x10, 0x00, 0x00, // IID365 - 0x62, 0xd4, 0x5c, 0x10, 0x81, 0xea, 0x00, 0x00, 0x10, 0x00, // IID366 - 0x62, 0xd4, 0x7c, 0x18, 0x81, 0xed, 0x00, 0x00, 0x10, 0x00, // IID367 - 0xd5, 0x11, 0x81, 0xe9, 0x00, 0x00, 0x10, 0x00, // IID368 - 0x62, 0xd4, 0x44, 0x14, 0x81, 0xec, 0x00, 0x00, 0x00, 0x40, // IID369 - 0x62, 0xfc, 0x7c, 0x1c, 0x81, 0xe8, 0x00, 0x00, 0x00, 0x40, // IID370 - 0x62, 0xdc, 0x04, 0x14, 0x81, 0xef, 0x00, 0x00, 0x01, 0x00, // IID371 - 0x62, 0x54, 0x74, 0x10, 0x03, 0xa9, 0x98, 0x2f, 0xef, 0x7f, // IID372 - 0x62, 0x7c, 0x14, 0x14, 0x03, 0x86, 0x54, 0xf5, 0x08, 0xb2, // IID373 - 0x62, 0x84, 0x14, 0x18, 0x23, 0x8c, 0xfc, 0x02, 0xa9, 0xa8, 0x50, // IID374 - 0x62, 0x0c, 0x4c, 0x14, 0x23, 0x8c, 0x92, 0x54, 0x27, 0xea, 0x70, // IID375 - 0x62, 0x1c, 0x64, 0x10, 0xaf, 0xa4, 0x06, 0x73, 0x0a, 0x1a, 0x6a, // IID376 - 0x62, 0xec, 0x08, 0x14, 0xaf, 0x94, 0x9a, 0x39, 0xd7, 0x32, 0x80, // IID377 - 0x62, 0x0c, 0x7c, 0x10, 0x0b, 0xbc, 0xd9, 0xbc, 0x5d, 0x2d, 0x48, // IID378 - 0x62, 0x44, 0x34, 0x1c, 0x0b, 0x9b, 0x01, 0xee, 0xd5, 0x43, // IID379 - 0x62, 0xac, 0x74, 0x18, 0x2b, 0xbc, 0xbd, 0xbc, 0xc2, 0x25, 0x28, // IID380 - 0x62, 0x84, 0x24, 0x14, 0x2b, 0xb4, 0x7d, 0xa7, 0x0d, 0x1f, 0x77, // IID381 - 0x62, 0x44, 0x30, 0x18, 0x33, 0xb4, 0xf1, 0x72, 0x37, 0x29, 0xb5, // IID382 - 0x62, 0xa4, 0x20, 0x1c, 0x33, 0x84, 0xa3, 0xee, 0x23, 0x02, 0x0b, // IID383 - 0x62, 0x04, 0x00, 0x18, 0x32, 0xac, 0x67, 0x97, 0x85, 0xd6, 0xe0, // IID384 - 0x62, 0x6c, 0x74, 0x14, 0x32, 0xb4, 0x5f, 0x45, 0x75, 0xdc, 0x0a, // IID385 - 0x62, 0x74, 0x21, 0x10, 0x33, 0x8c, 0xb2, 0x9f, 0xf0, 0x26, 0xbc, // IID386 - 0x62, 0xcc, 0x61, 0x1c, 0x33, 0xb4, 0x34, 0x4f, 0x5f, 0xcf, 0x82, // IID387 - 0x62, 0x64, 0x0c, 0x18, 0x03, 0xc1, // IID388 - 0xd5, 0x14, 0x03, 0xc1, // IID389 - 0x62, 0x44, 0x2c, 0x14, 0x03, 0xc4, // IID390 - 0x62, 0x6c, 0x3c, 0x14, 0x03, 0xc7, // IID391 - 0x62, 0x4c, 0x14, 0x18, 0x23, 0xd7, // IID392 - 0x45, 0x23, 0xd8, // IID393 - 0x62, 0xc4, 0x74, 0x1c, 0x23, 0xdf, // IID394 - 0x62, 0x54, 0x1c, 0x1c, 0x23, 0xe4, // IID395 - 0x62, 0xec, 0x4c, 0x10, 0xaf, 0xe3, // IID396 - 0x44, 0x0f, 0xaf, 0xc2, // IID397 - 0x62, 0x6c, 0x4c, 0x14, 0xaf, 0xdf, // IID398 - 0x62, 0x7c, 0x34, 0x1c, 0xaf, 0xca, // IID399 - 0x62, 0x44, 0x75, 0x18, 0x0b, 0xf5, // IID400 - 0x66, 0xd5, 0x54, 0x0b, 0xe3, // IID401 - 0x62, 0x4c, 0x1d, 0x1c, 0x0b, 0xf3, // IID402 - 0x62, 0x7c, 0x3d, 0x1c, 0x0b, 0xc6, // IID403 - 0x62, 0xdc, 0x7c, 0x10, 0x0b, 0xce, // IID404 - 0xd5, 0x15, 0x0b, 0xd1, // IID405 - 0x62, 0xec, 0x04, 0x1c, 0x0b, 0xc9, // IID406 - 0x62, 0x5c, 0x34, 0x1c, 0x0b, 0xce, // IID407 - 0x62, 0x7c, 0x5c, 0x10, 0xa5, 0xc5, // IID408 - 0xd5, 0x95, 0xa5, 0xf2, // IID409 - 0x62, 0x74, 0x7c, 0x14, 0xa5, 0xf2, // IID410 - 0x62, 0x7c, 0x64, 0x14, 0xa5, 0xc3, // IID411 - 0x62, 0x64, 0x24, 0x10, 0xad, 0xd3, // IID412 - 0xd5, 0xd1, 0xad, 0xdc, // IID413 - 0x62, 0x54, 0x74, 0x1c, 0xad, 0xf3, // IID414 - 0x62, 0xcc, 0x04, 0x14, 0xad, 0xdf, // IID415 - 0x62, 0x5c, 0x2c, 0x10, 0x2b, 0xe9, // IID416 - 0xd5, 0x45, 0x2b, 0xc3, // IID417 - 0x62, 0xc4, 0x6c, 0x14, 0x2b, 0xe5, // IID418 - 0x62, 0xec, 0x7c, 0x14, 0x2b, 0xc2, // IID419 - 0x62, 0xc4, 0x64, 0x10, 0x33, 0xc8, // IID420 - 0xd5, 0x41, 0x33, 0xdd, // IID421 - 0x62, 0x54, 0x44, 0x14, 0x33, 0xef, // IID422 - 0x62, 0x5c, 0x24, 0x1c, 0x33, 0xdd, // IID423 - 0x62, 0xec, 0x14, 0x10, 0x24, 0xc9, 0x01, // IID424 - 0xd5, 0xd4, 0xa4, 0xc6, 0x04, // IID425 - 0x62, 0x5c, 0x3c, 0x1c, 0x24, 0xdc, 0x10, // IID426 - 0x62, 0xc4, 0x04, 0x1c, 0x24, 0xff, 0x04, // IID427 - 0x62, 0xec, 0x14, 0x10, 0x2c, 0xc6, 0x04, // IID428 - 0x45, 0x0f, 0xac, 0xcd, 0x04, // IID429 - 0x62, 0x7c, 0x04, 0x1c, 0x2c, 0xe5, 0x02, // IID430 - 0x62, 0xec, 0x74, 0x14, 0x2c, 0xf9, 0x02, // IID431 - 0x62, 0xcc, 0x6c, 0x18, 0x40, 0xc5, // IID432 - 0xd5, 0x94, 0x40, 0xd5, // IID433 - 0x62, 0x6c, 0x74, 0x10, 0x41, 0xea, // IID434 - 0xd5, 0xd5, 0x41, 0xe0, // IID435 - 0x62, 0xcc, 0x2c, 0x18, 0x42, 0xe3, // IID436 - 0x45, 0x0f, 0x42, 0xd6, // IID437 - 0x62, 0x64, 0x24, 0x18, 0x43, 0xd9, // IID438 - 0xd5, 0xc1, 0x43, 0xf7, // IID439 - 0x62, 0x6c, 0x04, 0x10, 0x44, 0xf3, // IID440 - 0xd5, 0xd1, 0x44, 0xda, // IID441 - 0x62, 0x5c, 0x54, 0x10, 0x45, 0xf2, // IID442 - 0xd5, 0xc1, 0x45, 0xe7, // IID443 - 0x62, 0x7c, 0x1c, 0x18, 0x46, 0xef, // IID444 - 0xd5, 0xd4, 0x46, 0xe4, // IID445 - 0x62, 0x44, 0x5c, 0x10, 0x47, 0xc3, // IID446 - 0x45, 0x0f, 0x47, 0xd7, // IID447 - 0x62, 0xec, 0x64, 0x10, 0x48, 0xe7, // IID448 - 0xd5, 0x95, 0x48, 0xfa, // IID449 - 0x62, 0x6c, 0x64, 0x10, 0x49, 0xc7, // IID450 - 0xd5, 0xc5, 0x49, 0xe3, // IID451 - 0x44, 0x0f, 0x4a, 0xea, // IID452 - 0xd5, 0xd4, 0x4a, 0xff, // IID453 - 0x62, 0x5c, 0x44, 0x10, 0x4b, 0xcb, // IID454 - 0xd5, 0xd0, 0x4b, 0xec, // IID455 - 0x62, 0xcc, 0x3c, 0x10, 0x4c, 0xed, // IID456 - 0x41, 0x0f, 0x4c, 0xdb, // IID457 - 0x62, 0xf4, 0x54, 0x10, 0x4d, 0xd9, // IID458 - 0xd5, 0xd4, 0x4d, 0xfd, // IID459 - 0x62, 0x4c, 0x04, 0x18, 0x4e, 0xce, // IID460 - 0xd5, 0xd1, 0x4e, 0xf9, // IID461 - 0x62, 0xd4, 0x6c, 0x10, 0x4f, 0xca, // IID462 - 0xd5, 0x91, 0x4f, 0xcf, // IID463 - 0x62, 0xcc, 0x54, 0x10, 0x40, 0x9a, 0x8d, 0xf7, 0xd6, 0x91, // IID464 - 0x62, 0xec, 0x3c, 0x10, 0x41, 0x9c, 0x0e, 0x9a, 0x5f, 0xf8, 0x11, // IID465 - 0x62, 0x6c, 0x74, 0x10, 0x42, 0x84, 0x24, 0x5e, 0x77, 0x4d, 0x53, // IID466 - 0x62, 0xec, 0x5c, 0x10, 0x43, 0x94, 0x24, 0x33, 0xb1, 0x36, 0xb8, // IID467 - 0x62, 0x7c, 0x34, 0x18, 0x44, 0xaf, 0x9d, 0x3a, 0x7c, 0xb4, // IID468 - 0x62, 0x0c, 0x24, 0x18, 0x45, 0x8c, 0x70, 0x51, 0xf8, 0x9a, 0xbb, // IID469 - 0x62, 0x0c, 0x0c, 0x18, 0x46, 0x84, 0xae, 0x1d, 0x66, 0xd0, 0x00, // IID470 - 0x62, 0x04, 0x10, 0x18, 0x47, 0x8c, 0xde, 0x03, 0x14, 0x7e, 0x04, // IID471 - 0x62, 0xe4, 0x3c, 0x10, 0x48, 0x9c, 0xd1, 0xe8, 0xac, 0xb5, 0x9b, // IID472 - 0x62, 0x6c, 0x28, 0x10, 0x49, 0x84, 0x36, 0x46, 0x24, 0x35, 0x70, // IID473 - 0x62, 0x04, 0x60, 0x10, 0x4a, 0x94, 0xb0, 0x5c, 0x2f, 0xa1, 0x78, // IID474 - 0x62, 0x5c, 0x10, 0x10, 0x4b, 0x9c, 0x21, 0x3a, 0x30, 0xa8, 0x27, // IID475 - 0x62, 0x4c, 0x48, 0x10, 0x4c, 0x84, 0x43, 0x10, 0x1a, 0x54, 0x02, // IID476 - 0x62, 0x54, 0x00, 0x10, 0x4d, 0xbc, 0xc0, 0x51, 0x32, 0x8e, 0x55, // IID477 - 0x62, 0x84, 0x24, 0x10, 0x4e, 0x94, 0x10, 0x49, 0x78, 0xe6, 0xb8, // IID478 - 0x62, 0xec, 0x68, 0x10, 0x4f, 0x84, 0x9a, 0xe2, 0x17, 0xf5, 0xed, // IID479 - 0xd5, 0x19, 0x13, 0xdf, // IID480 - 0xd5, 0x5d, 0x3b, 0xf7, // IID481 - 0xd5, 0xdd, 0xaf, 0xec, // IID482 - 0xf3, 0xd5, 0xcd, 0xb8, 0xca, // IID483 - 0xd5, 0x5c, 0x1b, 0xc4, // IID484 - 0xd5, 0x48, 0x2b, 0xc2, // IID485 - 0xf3, 0xd5, 0xdd, 0xbc, 0xd4, // IID486 - 0xf3, 0xd5, 0xcd, 0xbd, 0xe1, // IID487 - 0xd5, 0x59, 0x03, 0xe0, // IID488 - 0xd5, 0x5d, 0x23, 0xc5, // IID489 - 0xd5, 0x59, 0x0b, 0xfb, // IID490 - 0x4d, 0x33, 0xfc, // IID491 - 0xd5, 0x58, 0x8b, 0xd3, // IID492 - 0xd5, 0xcc, 0xbc, 0xf9, // IID493 - 0x4d, 0x0f, 0xbd, 0xcd, // IID494 - 0xd5, 0x98, 0xa3, 0xcc, // IID495 - 0xd5, 0x1c, 0x87, 0xc5, // IID496 - 0xd5, 0x4d, 0x85, 0xc6, // IID497 - 0xd5, 0x6c, 0x01, 0xac, 0xb9, 0x4d, 0x6c, 0xf0, 0x4f, // IID498 - 0xd5, 0x5f, 0x21, 0x94, 0x50, 0x77, 0x5e, 0x26, 0x8a, // IID499 - 0xd5, 0x48, 0x39, 0x8c, 0x1b, 0x9c, 0xd5, 0x33, 0x40, // IID500 - 0xd5, 0x5a, 0x09, 0x94, 0xe6, 0x83, 0xcb, 0x6c, 0xc7, // IID501 - 0xd5, 0x3c, 0x31, 0xa4, 0xfc, 0x60, 0x15, 0x31, 0x4b, // IID502 - 0xd5, 0x6f, 0x29, 0xac, 0xa2, 0x57, 0x26, 0x3a, 0x5c, // IID503 - 0xd5, 0x6b, 0x89, 0xb4, 0xcd, 0x3f, 0x6f, 0x3d, 0x1a, // IID504 - 0xd5, 0xfe, 0xc1, 0x8c, 0xc1, 0x28, 0x24, 0x52, 0xca, // IID505 - 0xd5, 0x19, 0x81, 0xa1, 0xc3, 0x84, 0x21, 0x63, 0x00, 0x00, 0x00, 0x01, // IID506 - 0x4b, 0x81, 0x84, 0x2d, 0x3a, 0x15, 0x8d, 0xc6, 0x00, 0x00, 0x00, 0x01, // IID507 - 0x49, 0x81, 0xb9, 0xfa, 0x37, 0x4b, 0xec, 0x00, 0x10, 0x00, 0x00, // IID508 - 0xd5, 0x19, 0xd1, 0xbf, 0x51, 0xf5, 0xa7, 0x4f, // IID509 - 0xd5, 0x3a, 0xd1, 0xa4, 0xbd, 0x32, 0x82, 0xaa, 0x31, // IID510 - 0xd5, 0x3b, 0x81, 0x9c, 0xb8, 0x49, 0xc7, 0x9a, 0xb9, 0x00, 0x00, 0x00, 0x10, // IID511 - 0xd5, 0x39, 0xc1, 0xac, 0x34, 0x4f, 0x7a, 0x01, 0xc1, 0x02, // IID512 - 0xd5, 0x18, 0x81, 0xa8, 0x15, 0x5c, 0x76, 0xec, 0x00, 0x00, 0x10, 0x00, // IID513 - 0xd5, 0x1b, 0x83, 0xb4, 0x05, 0x15, 0x26, 0x02, 0x1d, 0x10, // IID514 - 0xd5, 0x2b, 0x83, 0x8c, 0x64, 0x1e, 0x67, 0x37, 0xcb, 0x01, // IID515 - 0xd5, 0x2a, 0xc7, 0x84, 0x81, 0xf8, 0x14, 0xbb, 0xe9, 0x00, 0x01, 0x00, 0x00, // IID516 - 0xd5, 0x19, 0xf7, 0x85, 0xf5, 0x76, 0xdc, 0x82, 0x00, 0x00, 0xff, 0xff, // IID517 - 0xd5, 0x68, 0x03, 0xbc, 0x99, 0x54, 0xc6, 0xea, 0x70, // IID518 - 0xd5, 0x1b, 0x23, 0x94, 0x38, 0x57, 0x25, 0xb2, 0xdf, // IID519 - 0xd5, 0x1a, 0x3b, 0x94, 0xdf, 0xbd, 0x30, 0xc9, 0x32, // IID520 - 0xf3, 0xd5, 0xcc, 0xbd, 0xa2, 0x71, 0x3d, 0xcc, 0xab, // IID521 - 0xd5, 0x5a, 0x0b, 0xb4, 0x73, 0xc8, 0x82, 0x39, 0xd3, // IID522 - 0x4d, 0x13, 0x92, 0x9f, 0xc5, 0xd7, 0x03, // IID523 - 0x4f, 0x0f, 0xaf, 0x94, 0xc0, 0xd3, 0x79, 0x9e, 0xf1, // IID524 - 0xf3, 0xd5, 0xd9, 0xb8, 0xbd, 0x93, 0x26, 0x81, 0x88, // IID525 - 0xd5, 0x28, 0x1b, 0x8c, 0x5b, 0xcb, 0x01, 0xc6, 0x53, // IID526 - 0xd5, 0x1c, 0x2b, 0xb4, 0x19, 0x8d, 0x0f, 0x74, 0x89, // IID527 - 0xf3, 0xd5, 0xed, 0xbc, 0xac, 0x5a, 0x3c, 0x8d, 0xc9, 0x30, // IID528 - 0xd5, 0x3e, 0x33, 0x94, 0x18, 0xfe, 0x29, 0xf7, 0xc2, // IID529 - 0xd5, 0x7b, 0x8b, 0x94, 0xe4, 0x6f, 0x53, 0x04, 0x9d, // IID530 - 0x48, 0x8d, 0x99, 0xa5, 0x02, 0x06, 0x45, // IID531 - 0xf2, 0xd5, 0xbf, 0x2c, 0xa4, 0x3e, 0xd0, 0x59, 0x67, 0x98, // IID532 - 0xd5, 0x5f, 0x87, 0xbc, 0x50, 0x13, 0xed, 0x98, 0x8f, // IID533 - 0xd5, 0x2d, 0x85, 0xb4, 0xe5, 0xf2, 0x81, 0x10, 0x17, // IID534 - 0xd5, 0x19, 0x83, 0xc7, 0x10, // IID535 - 0xd5, 0x19, 0x83, 0xe1, 0x10, // IID536 - 0xd5, 0x18, 0x81, 0xd7, 0x00, 0x01, 0x00, 0x00, // IID537 - 0xd5, 0x18, 0x81, 0xfb, 0x00, 0x00, 0x00, 0x10, // IID538 - 0xd5, 0x19, 0xd1, 0xd7, // IID539 - 0xd5, 0x18, 0xd1, 0xd9, // IID540 - 0xd5, 0x19, 0xc1, 0xc1, 0x02, // IID541 - 0xd5, 0x18, 0xc1, 0xc9, 0x04, // IID542 - 0xd5, 0x19, 0xd1, 0xfc, // IID543 - 0x49, 0xc1, 0xe7, 0x04, // IID544 - 0x48, 0x81, 0xdb, 0x00, 0x00, 0x01, 0x00, // IID545 - 0xd5, 0x18, 0xd1, 0xe5, // IID546 - 0x49, 0xd1, 0xea, // IID547 - 0x49, 0x83, 0xee, 0x10, // IID548 - 0xd5, 0x18, 0x81, 0xf2, 0x00, 0x00, 0x00, 0x10, // IID549 - 0xd5, 0x18, 0xc7, 0xc7, 0x10, 0x00, 0x00, 0x00, // IID550 - 0x49, 0xbc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, // IID551 - 0x49, 0x0f, 0xba, 0xe6, 0x04, // IID552 - 0xd5, 0x19, 0xf7, 0xc0, 0x00, 0xf0, 0xff, 0xff, // IID553 - 0xd5, 0x18, 0x81, 0xcb, 0x00, 0x00, 0x10, 0x00, // IID554 - 0x48, 0x81, 0xe9, 0x00, 0x00, 0x00, 0x10, // IID555 - 0xd5, 0x98, 0x40, 0x94, 0xdb, 0xc4, 0xc8, 0x11, 0x02, // IID556 - 0xd5, 0x98, 0x41, 0x9d, 0x43, 0x77, 0x26, 0x49, // IID557 - 0xd5, 0xeb, 0x42, 0xac, 0x60, 0xba, 0xd6, 0x73, 0xb3, // IID558 - 0xd5, 0xbd, 0x43, 0xa4, 0x22, 0x64, 0x07, 0xb2, 0xd9, // IID559 - 0xd5, 0xdb, 0x44, 0x8c, 0x8c, 0x6b, 0x19, 0x97, 0x34, // IID560 - 0xd5, 0xad, 0x45, 0xac, 0x7f, 0x67, 0xf6, 0x5c, 0xd8, // IID561 - 0xd5, 0xd8, 0x46, 0xb6, 0x05, 0xab, 0x39, 0x0f, // IID562 - 0xd5, 0xba, 0x47, 0x8c, 0xd6, 0xb4, 0x6a, 0x73, 0xfb, // IID563 - 0xd5, 0xfc, 0x48, 0x8c, 0x2b, 0x0b, 0x5b, 0x40, 0x0e, // IID564 - 0xd5, 0xbe, 0x49, 0xa4, 0xeb, 0xb5, 0xfb, 0x9d, 0x88, // IID565 - 0xd5, 0x9b, 0x4a, 0x9c, 0x56, 0xdd, 0x7c, 0x86, 0xe6, // IID566 - 0xd5, 0xfb, 0x4b, 0xac, 0x38, 0xd5, 0x9a, 0xce, 0xa8, // IID567 - 0xd5, 0xcb, 0x4c, 0x94, 0x50, 0x77, 0x41, 0xec, 0xa9, // IID568 - 0xd5, 0xfc, 0x4d, 0xa4, 0xed, 0xc4, 0xfd, 0xa0, 0x65, // IID569 - 0xd5, 0xe9, 0x4e, 0xbc, 0x13, 0xf4, 0x0e, 0xe5, 0xe2, // IID570 - 0xd5, 0xda, 0x4f, 0xb4, 0x62, 0x38, 0x1c, 0x5f, 0x1a, // IID571 - 0xd5, 0x10, 0xff, 0xd7, // IID572 - 0xd5, 0x19, 0xf7, 0xf6, // IID573 - 0xd5, 0x18, 0xf7, 0xfb, // IID574 - 0x49, 0xf7, 0xe9, // IID575 - 0x49, 0xf7, 0xe5, // IID576 - 0xd5, 0x18, 0xf7, 0xd8, // IID577 - 0xd5, 0x19, 0xf7, 0xd5, // IID578 - 0x48, 0xd3, 0xc1, // IID579 - 0xd5, 0x19, 0xd3, 0xc9, // IID580 - 0x49, 0xd3, 0xf8, // IID581 - 0xd5, 0x19, 0xd3, 0xe3, // IID582 - 0xd5, 0x19, 0xd3, 0xe6, // IID583 - 0xd5, 0x18, 0xd3, 0xef, // IID584 - 0x48, 0xff, 0xc3, // IID585 - 0x49, 0xff, 0xce, // IID586 - 0xd5, 0x18, 0x55, // IID587 - 0xd5, 0x18, 0x5d, // IID588 - 0xd5, 0x30, 0xff, 0x94, 0x6c, 0x2f, 0xaf, 0xc6, 0x56, // IID589 - 0xd5, 0x39, 0xf7, 0xa4, 0xdf, 0xdd, 0x14, 0x4b, 0xfe, // IID590 - 0xd5, 0x3b, 0xf7, 0x9c, 0x1b, 0xe1, 0x03, 0x24, 0xa7, // IID591 - 0xd5, 0x28, 0xd3, 0xbc, 0xb3, 0x2f, 0xb6, 0x9c, 0x9f, // IID592 - 0xd5, 0x39, 0xd3, 0xa4, 0xfa, 0x79, 0xa0, 0x95, 0x0b, // IID593 - 0xd5, 0x2b, 0xd3, 0xac, 0x16, 0x09, 0x4e, 0x54, 0x03, // IID594 - 0xd5, 0x19, 0xff, 0x84, 0x13, 0x50, 0x32, 0x0b, 0x12, // IID595 - 0xd5, 0x2b, 0xff, 0x8c, 0x89, 0x35, 0x13, 0x55, 0xcb, // IID596 - 0xd5, 0x7a, 0x69, 0xa4, 0x60, 0x5b, 0xfa, 0x21, 0xa6, 0x00, 0x00, 0x10, 0x00, // IID597 - 0xd5, 0x58, 0x69, 0xcf, 0x00, 0x01, 0x00, 0x00, // IID598 - 0xd5, 0x9c, 0xa4, 0xdb, 0x08, // IID599 - 0xd5, 0x9d, 0xac, 0xd4, 0x08, // IID600 - 0x62, 0xdc, 0x2c, 0x10, 0x8f, 0xc5, // IID601 - 0x62, 0xfc, 0xac, 0x18, 0x8f, 0xc6, // IID602 - 0x62, 0xdc, 0x0c, 0x10, 0xff, 0xf1, // IID603 - 0x62, 0xdc, 0x84, 0x18, 0xff, 0xf4, // IID604 - 0xd5, 0xbd, 0xb6, 0x9c, 0x9d, 0xcc, 0x72, 0xc9, 0xed, // IID605 - 0xd5, 0xaf, 0xb7, 0xb4, 0xb0, 0x22, 0x6d, 0x6c, 0xb5, // IID606 - 0xd5, 0xde, 0xbe, 0xa4, 0x3f, 0x54, 0xcb, 0x89, 0x61, // IID607 - 0xd5, 0xec, 0xbf, 0xa4, 0xfb, 0x9f, 0x9a, 0x17, 0xd2, // IID608 - 0x4c, 0x0f, 0xb6, 0xd9, // IID609 - 0xd5, 0xcd, 0xb7, 0xf7, // IID610 - 0x4c, 0x0f, 0xbe, 0xf1, // IID611 - 0xd5, 0xc9, 0xbf, 0xf9, // IID612 - 0x4f, 0x0f, 0xb1, 0xa4, 0x55, 0xc6, 0xd3, 0x39, 0xf8, // IID613 - 0x62, 0xf4, 0xfc, 0x08, 0xf7, 0xf9, // IID614 - 0x62, 0xd4, 0xfc, 0x0c, 0xf7, 0xff, // IID615 - 0x62, 0xfc, 0xfc, 0x08, 0xf7, 0xf7, // IID616 - 0x62, 0xdc, 0xfc, 0x0c, 0xf7, 0xf0, // IID617 - 0x62, 0xdc, 0xfc, 0x08, 0xf7, 0xeb, // IID618 - 0x62, 0xdc, 0xfc, 0x0c, 0xf7, 0xee, // IID619 - 0x62, 0xd4, 0xfc, 0x08, 0xf7, 0xe4, // IID620 - 0x62, 0xf4, 0xfc, 0x0c, 0xf7, 0xe1, // IID621 - 0x62, 0x94, 0xfc, 0x08, 0xf7, 0xa4, 0xcd, 0x6c, 0x54, 0x95, 0xdd, // IID622 - 0x62, 0x94, 0xf8, 0x0c, 0xf7, 0xa4, 0xc5, 0xfb, 0x89, 0x93, 0xd7, // IID623 - 0x62, 0xcc, 0xfc, 0x08, 0xaf, 0xee, // IID624 - 0xd5, 0x18, 0xf7, 0xe9, // IID625 - 0x62, 0x44, 0xfc, 0x0c, 0xaf, 0xec, // IID626 - 0x62, 0x4c, 0xfc, 0x0c, 0xaf, 0xf6, // IID627 - 0x62, 0x44, 0xfc, 0x08, 0xf5, 0xc7, // IID628 - 0x62, 0x4c, 0xfc, 0x08, 0xf5, 0xc9, // IID629 - 0x62, 0x6c, 0xfc, 0x0c, 0xf5, 0xcd, // IID630 - 0x62, 0xec, 0xfc, 0x0c, 0xf5, 0xf6, // IID631 - 0x62, 0xdc, 0xf4, 0x10, 0xf7, 0xde, // IID632 - 0xd5, 0x18, 0xf7, 0xd9, // IID633 - 0x62, 0xfc, 0x84, 0x14, 0xf7, 0xd9, // IID634 - 0x62, 0xdc, 0x94, 0x14, 0xf7, 0xdd, // IID635 - 0x62, 0xd4, 0xac, 0x18, 0xf7, 0xd1, // IID636 - 0xd5, 0x19, 0xf7, 0xd0, // IID637 - 0x62, 0x44, 0xfc, 0x08, 0x88, 0xe7, // IID638 - 0x62, 0x54, 0xfc, 0x08, 0x88, 0xd2, // IID639 - 0x62, 0x4c, 0xfc, 0x0c, 0x88, 0xde, // IID640 - 0x62, 0x4c, 0xfc, 0x0c, 0x88, 0xe4, // IID641 - 0x62, 0xd4, 0x9c, 0x10, 0xd3, 0xc6, // IID642 - 0xd5, 0x18, 0xd3, 0xc7, // IID643 - 0x62, 0xdc, 0xc4, 0x14, 0xd3, 0xc0, // IID644 - 0x62, 0xfc, 0xd4, 0x14, 0xd3, 0xc5, // IID645 - 0x62, 0xfc, 0x84, 0x10, 0xd3, 0xce, // IID646 - 0xd5, 0x19, 0xd3, 0xcc, // IID647 - 0x62, 0xd4, 0xf4, 0x14, 0xd3, 0xca, // IID648 - 0x62, 0xd4, 0xb4, 0x1c, 0xd3, 0xc9, // IID649 - 0x62, 0xdc, 0x94, 0x10, 0xd3, 0xe6, // IID650 - 0x49, 0xd3, 0xe3, // IID651 - 0x62, 0xd4, 0xac, 0x14, 0xd3, 0xe3, // IID652 - 0x62, 0xfc, 0xfc, 0x14, 0xd3, 0xe0, // IID653 - 0x62, 0xd4, 0xe4, 0x18, 0xd3, 0xff, // IID654 - 0x49, 0xd3, 0xfe, // IID655 - 0x62, 0xfc, 0xb4, 0x14, 0xd3, 0xf8, // IID656 - 0x62, 0xd4, 0xbc, 0x1c, 0xd3, 0xf8, // IID657 - 0x62, 0xd4, 0xa4, 0x18, 0xff, 0xcd, // IID658 - 0x48, 0xff, 0xc9, // IID659 - 0x62, 0xfc, 0xd4, 0x14, 0xff, 0xca, // IID660 - 0x62, 0xdc, 0x9c, 0x14, 0xff, 0xcc, // IID661 - 0xd5, 0x18, 0xff, 0xc0, // IID662 - 0xd5, 0x19, 0xff, 0xc5, // IID663 - 0x62, 0xd4, 0xec, 0x14, 0xff, 0xc1, // IID664 - 0x62, 0xfc, 0xe4, 0x14, 0xff, 0xc3, // IID665 - 0x62, 0xfc, 0xe4, 0x10, 0xd3, 0xe2, // IID666 - 0x49, 0xd3, 0xe0, // IID667 - 0x62, 0xd4, 0x9c, 0x1c, 0xd3, 0xe7, // IID668 - 0x62, 0xdc, 0x94, 0x14, 0xd3, 0xe5, // IID669 - 0x62, 0xdc, 0x9c, 0x10, 0xd3, 0xe8, // IID670 - 0xd5, 0x18, 0xd3, 0xeb, // IID671 - 0x62, 0xdc, 0xbc, 0x1c, 0xd3, 0xec, // IID672 - 0x62, 0xfc, 0xf4, 0x14, 0xd3, 0xe9, // IID673 - 0x62, 0x6c, 0xfc, 0x08, 0xf4, 0xe0, // IID674 - 0x62, 0x54, 0xfc, 0x08, 0xf4, 0xf6, // IID675 - 0x62, 0x5c, 0xfc, 0x0c, 0xf4, 0xe7, // IID676 - 0x62, 0x54, 0xfc, 0x0c, 0xf4, 0xf6, // IID677 - 0x62, 0x44, 0xfc, 0x08, 0xaf, 0xbd, 0xae, 0x4c, 0x3b, 0x96, // IID678 - 0x62, 0xec, 0xfc, 0x0c, 0xaf, 0x8a, 0xfb, 0xee, 0x54, 0x9f, // IID679 - 0x62, 0x04, 0xf8, 0x08, 0xf5, 0x9c, 0x8e, 0x83, 0xbf, 0x98, 0x27, // IID680 - 0x62, 0x84, 0xfc, 0x0c, 0xf5, 0xbc, 0x1a, 0xa3, 0x9c, 0x71, 0xc8, // IID681 - 0x62, 0xbc, 0xf4, 0x18, 0xf7, 0x9c, 0xcb, 0xc0, 0x2b, 0xb8, 0x97, // IID682 - 0x62, 0xf4, 0xf4, 0x1c, 0xf7, 0x9c, 0x0b, 0x8d, 0xd3, 0x92, 0x6f, // IID683 - 0x62, 0xc4, 0xfc, 0x08, 0x88, 0xa4, 0x24, 0x2a, 0xd8, 0x74, 0xd5, // IID684 - 0x62, 0x4c, 0xfc, 0x0c, 0x88, 0xbe, 0xd0, 0xf6, 0x03, 0x46, // IID685 - 0x62, 0xdc, 0xe4, 0x18, 0xd3, 0xa0, 0xf9, 0x06, 0x7d, 0x56, // IID686 - 0x62, 0x9c, 0x98, 0x1c, 0xd3, 0xa4, 0x20, 0xb2, 0xa7, 0xb3, 0xe3, // IID687 - 0x62, 0xbc, 0x98, 0x18, 0xd3, 0xbc, 0x87, 0x46, 0x43, 0xa8, 0xce, // IID688 - 0x62, 0x94, 0xb8, 0x1c, 0xd3, 0xbc, 0x86, 0x5b, 0x6f, 0xbd, 0x8e, // IID689 - 0x62, 0x94, 0xc4, 0x10, 0xff, 0x8c, 0x78, 0x23, 0x8d, 0x1d, 0xa5, // IID690 - 0x62, 0x9c, 0x94, 0x1c, 0xff, 0x8c, 0xcd, 0x57, 0x8b, 0xae, 0xa4, // IID691 - 0x62, 0xbc, 0xa0, 0x18, 0xff, 0x84, 0xfd, 0x24, 0x4b, 0x89, 0xde, // IID692 - 0x62, 0xf4, 0x90, 0x1c, 0xff, 0x84, 0x01, 0x37, 0xb7, 0x4b, 0xc9, // IID693 - 0x62, 0xdc, 0xac, 0x10, 0xd3, 0xac, 0x89, 0x6d, 0xb6, 0x76, 0xa0, // IID694 - 0x62, 0xd4, 0xb4, 0x14, 0xd3, 0xa9, 0x21, 0x8d, 0x79, 0x51, // IID695 - 0x62, 0x04, 0xf8, 0x08, 0xf4, 0xa4, 0x95, 0xf6, 0x96, 0x71, 0x20, // IID696 - 0x62, 0xbc, 0xfc, 0x0c, 0xf4, 0x9c, 0x2b, 0x2b, 0xc8, 0x26, 0xdb, // IID697 - 0x62, 0x4c, 0xf4, 0x10, 0x01, 0xbe, 0xff, 0xcc, 0x35, 0x39, // IID698 - 0x62, 0x1c, 0x8c, 0x18, 0x01, 0xb4, 0x93, 0x55, 0x64, 0x52, 0xcb, // IID699 - 0x62, 0x6c, 0xe8, 0x14, 0x01, 0xb4, 0x3c, 0x4b, 0xed, 0xd3, 0x5a, // IID700 - 0x62, 0xe4, 0xdc, 0x14, 0x01, 0xa2, 0x1b, 0x66, 0xd5, 0xcd, // IID701 - 0x62, 0xa4, 0x80, 0x10, 0x21, 0x8c, 0xdb, 0xd2, 0x47, 0xe2, 0x4c, // IID702 - 0x62, 0x6c, 0x88, 0x10, 0x21, 0xb4, 0x5a, 0xec, 0xc2, 0x11, 0xfb, // IID703 - 0x62, 0x44, 0x9c, 0x14, 0x21, 0x84, 0xdb, 0x41, 0xb4, 0x66, 0xd7, // IID704 - 0x62, 0x6c, 0x8c, 0x14, 0x21, 0xb6, 0x24, 0x1c, 0xd2, 0x07, // IID705 - 0x62, 0xc4, 0xa8, 0x10, 0x09, 0xa4, 0xdf, 0x92, 0x17, 0xc2, 0x58, // IID706 - 0x62, 0x14, 0x90, 0x18, 0x09, 0xac, 0x9a, 0xcd, 0x2c, 0x8f, 0xd3, // IID707 - 0x62, 0x44, 0xe4, 0x1c, 0x09, 0x94, 0x1c, 0x44, 0x0e, 0x4f, 0xe0, // IID708 - 0x62, 0x0c, 0x80, 0x14, 0x09, 0xbc, 0x7b, 0x56, 0x17, 0x8d, 0x02, // IID709 - 0x62, 0x4c, 0xb8, 0x10, 0x29, 0x9c, 0x7c, 0x10, 0xf6, 0x80, 0x69, // IID710 - 0x62, 0x14, 0x80, 0x18, 0x29, 0xbc, 0xf3, 0x19, 0x88, 0x68, 0xfb, // IID711 - 0x62, 0x0c, 0xf4, 0x14, 0x29, 0xbc, 0xa9, 0x46, 0x9e, 0x61, 0x31, // IID712 - 0x62, 0x84, 0xec, 0x14, 0x29, 0x94, 0x93, 0x1a, 0x86, 0x22, 0x19, // IID713 - 0x62, 0xc4, 0xe4, 0x18, 0x31, 0xab, 0xe0, 0x2b, 0xe9, 0xb8, // IID714 - 0x62, 0x34, 0xbc, 0x18, 0x31, 0x84, 0x8a, 0x64, 0x1c, 0x30, 0xfb, // IID715 - 0x62, 0x04, 0xf8, 0x14, 0x31, 0x8c, 0x1e, 0xd9, 0x54, 0x66, 0x7c, // IID716 - 0x62, 0x44, 0x94, 0x14, 0x31, 0xaf, 0x87, 0x4b, 0x05, 0xa1, // IID717 - 0x62, 0xd4, 0xe0, 0x10, 0x81, 0x84, 0xb5, 0x59, 0x45, 0xb6, 0x68, 0x00, 0x00, 0x00, 0x01, // IID718 - 0x62, 0x94, 0xf8, 0x14, 0x83, 0x84, 0xfd, 0x0b, 0xc5, 0xeb, 0x9a, 0x01, // IID719 - 0x62, 0x9c, 0x84, 0x10, 0x83, 0xa4, 0x68, 0xf2, 0x95, 0x4e, 0xda, 0x01, // IID720 - 0x62, 0xdc, 0xa4, 0x1c, 0x81, 0xa4, 0x24, 0xda, 0xb4, 0x92, 0xf0, 0x00, 0x00, 0x01, 0x00, // IID721 - 0x62, 0xbc, 0xfc, 0x08, 0x69, 0x8c, 0x12, 0xa1, 0x6d, 0xec, 0x46, 0x00, 0x00, 0x00, 0x01, // IID722 - 0x62, 0x14, 0xfc, 0x0c, 0x6b, 0xbc, 0xd1, 0x0d, 0x95, 0x3c, 0x80, 0x10, // IID723 - 0x62, 0x9c, 0xf0, 0x10, 0x83, 0x8c, 0x33, 0x2c, 0xda, 0x4c, 0x1b, 0x01, // IID724 - 0x62, 0x9c, 0xec, 0x1c, 0x81, 0x8c, 0xb1, 0x7b, 0x94, 0x55, 0xa6, 0x00, 0x10, 0x00, 0x00, // IID725 - 0x62, 0xdc, 0xf0, 0x10, 0xc1, 0xa4, 0x6a, 0xa1, 0x0e, 0x4e, 0x95, 0x08, // IID726 - 0x62, 0xfc, 0x98, 0x1c, 0xc1, 0xa4, 0x0e, 0x55, 0xeb, 0x53, 0xbc, 0x02, // IID727 - 0x62, 0xfc, 0x90, 0x10, 0xc1, 0xbc, 0x02, 0x9f, 0xf3, 0x23, 0xa6, 0x04, // IID728 - 0x62, 0xd4, 0xfc, 0x14, 0xc1, 0xbb, 0xec, 0x2c, 0x42, 0xf8, 0x04, // IID729 - 0x62, 0xbc, 0xa8, 0x10, 0xc1, 0xac, 0xdf, 0xec, 0xdc, 0x46, 0xaa, 0x10, // IID730 - 0x62, 0xbc, 0xc0, 0x14, 0xc1, 0xac, 0x68, 0x1d, 0x1a, 0x31, 0x71, 0x02, // IID731 - 0x62, 0xd4, 0xb4, 0x10, 0x81, 0xa9, 0x54, 0xd4, 0xac, 0xf6, 0x00, 0x00, 0x10, 0x00, // IID732 - 0x62, 0xd4, 0xf0, 0x14, 0x81, 0xac, 0x38, 0xa2, 0x6c, 0xd0, 0x55, 0x00, 0x00, 0x10, 0x00, // IID733 - 0x62, 0x94, 0x90, 0x10, 0x81, 0xb4, 0x01, 0x3f, 0xbe, 0x3e, 0xfd, 0x00, 0x00, 0x10, 0x00, // IID734 - 0x62, 0xfc, 0x98, 0x14, 0x83, 0xb4, 0x5e, 0x43, 0x65, 0x62, 0xd2, 0x10, // IID735 - 0x62, 0xd4, 0xcc, 0x10, 0x83, 0xc6, 0x10, // IID736 - 0x62, 0xd4, 0xfc, 0x18, 0x83, 0xc4, 0x10, // IID737 - 0xd5, 0x19, 0x81, 0xc0, 0x00, 0x00, 0x01, 0x00, // IID738 - 0x62, 0xf4, 0xd4, 0x14, 0x81, 0xc3, 0x00, 0x00, 0x01, 0x00, // IID739 - 0x62, 0xf4, 0xfc, 0x1c, 0x81, 0xc3, 0x00, 0x00, 0x01, 0x00, // IID740 - 0x62, 0xdc, 0xbc, 0x14, 0x81, 0xc0, 0x00, 0x00, 0x01, 0x00, // IID741 - 0x62, 0xdc, 0xd4, 0x10, 0x81, 0xe3, 0x00, 0x00, 0x00, 0x01, // IID742 - 0x62, 0xdc, 0xfc, 0x18, 0x81, 0xe3, 0x00, 0x00, 0x00, 0x01, // IID743 - 0xd5, 0x19, 0x81, 0xe0, 0x00, 0x00, 0x01, 0x00, // IID744 - 0x62, 0xdc, 0x94, 0x1c, 0x81, 0xe7, 0x00, 0x00, 0x10, 0x00, // IID745 - 0x62, 0xfc, 0xfc, 0x1c, 0x81, 0xe5, 0x00, 0x00, 0x10, 0x00, // IID746 - 0x62, 0xdc, 0x8c, 0x14, 0x81, 0xe6, 0x00, 0x00, 0x10, 0x00, // IID747 - 0x62, 0x54, 0xfc, 0x08, 0x69, 0xc5, 0x00, 0x00, 0x00, 0x10, // IID748 - 0x62, 0xdc, 0xfc, 0x08, 0x69, 0xc7, 0x00, 0x00, 0x00, 0x10, // IID749 - 0x62, 0x54, 0xfc, 0x08, 0x69, 0xed, 0x00, 0x00, 0x01, 0x00, // IID750 - 0x62, 0x5c, 0xfc, 0x0c, 0x69, 0xf5, 0x00, 0x00, 0x10, 0x00, // IID751 - 0x62, 0xfc, 0xfc, 0x0c, 0x69, 0xc6, 0x00, 0x00, 0x10, 0x00, // IID752 - 0x62, 0x54, 0xfc, 0x0c, 0x69, 0xc0, 0x00, 0x00, 0x00, 0x10, // IID753 - 0x62, 0xd4, 0x8c, 0x10, 0x81, 0xcf, 0x00, 0x10, 0x00, 0x00, // IID754 - 0x62, 0xdc, 0xfc, 0x18, 0x81, 0xcc, 0x00, 0x10, 0x00, 0x00, // IID755 - 0xd5, 0x19, 0x81, 0xca, 0x00, 0x00, 0x10, 0x00, // IID756 - 0x62, 0xd4, 0xfc, 0x14, 0x81, 0xcc, 0x00, 0x00, 0x00, 0x10, // IID757 - 0x62, 0xd4, 0xfc, 0x1c, 0x81, 0xc9, 0x00, 0x00, 0x00, 0x10, // IID758 - 0x62, 0xfc, 0xc4, 0x14, 0x81, 0xcf, 0x00, 0x01, 0x00, 0x00, // IID759 - 0x62, 0xd4, 0x84, 0x18, 0xc1, 0xd1, 0x10, // IID760 - 0x62, 0xd4, 0xfc, 0x18, 0xc1, 0xd0, 0x10, // IID761 - 0xd5, 0x19, 0xd1, 0xd1, // IID762 - 0x62, 0xfc, 0xb4, 0x18, 0xc1, 0xc1, 0x10, // IID763 - 0x62, 0xfc, 0xfc, 0x18, 0xc1, 0xc4, 0x10, // IID764 - 0xd5, 0x19, 0xd1, 0xc3, // IID765 - 0x62, 0xdc, 0xdc, 0x14, 0xd1, 0xc7, // IID766 - 0x62, 0xfc, 0xfc, 0x1c, 0xd1, 0xc2, // IID767 - 0x62, 0xdc, 0x9c, 0x14, 0xc1, 0xc4, 0x10, // IID768 - 0x62, 0xfc, 0xac, 0x10, 0xc1, 0xca, 0x10, // IID769 - 0x62, 0xdc, 0xfc, 0x18, 0xc1, 0xc8, 0x10, // IID770 - 0xd5, 0x18, 0xc1, 0xce, 0x10, // IID771 - 0x62, 0xdc, 0xa4, 0x14, 0xd1, 0xcd, // IID772 - 0x62, 0xfc, 0xfc, 0x1c, 0xd1, 0xca, // IID773 - 0x62, 0xfc, 0xd4, 0x14, 0xd1, 0xcd, // IID774 - 0x62, 0xf4, 0x9c, 0x18, 0xc1, 0xe1, 0x02, // IID775 - 0x62, 0xdc, 0xfc, 0x18, 0xc1, 0xe0, 0x02, // IID776 - 0xd5, 0x18, 0xc1, 0xe6, 0x08, // IID777 - 0x62, 0xfc, 0xf4, 0x14, 0xc1, 0xe7, 0x08, // IID778 - 0x62, 0xdc, 0xfc, 0x1c, 0xc1, 0xe3, 0x08, // IID779 - 0x62, 0xfc, 0xc4, 0x14, 0xd1, 0xe7, // IID780 - 0x62, 0xdc, 0xbc, 0x18, 0xc1, 0xf9, 0x10, // IID781 - 0x62, 0xfc, 0xfc, 0x18, 0xc1, 0xff, 0x10, // IID782 - 0x49, 0xc1, 0xf9, 0x04, // IID783 - 0x62, 0xd4, 0xcc, 0x14, 0xd1, 0xfd, // IID784 - 0x62, 0xd4, 0xfc, 0x1c, 0xd1, 0xfb, // IID785 - 0x62, 0xd4, 0x9c, 0x1c, 0xc1, 0xfc, 0x02, // IID786 - 0x62, 0xdc, 0xf4, 0x18, 0xc1, 0xe6, 0x08, // IID787 - 0x62, 0xfc, 0xfc, 0x18, 0xc1, 0xe3, 0x08, // IID788 - 0x49, 0xc1, 0xe5, 0x02, // IID789 - 0x62, 0xd4, 0xec, 0x14, 0xc1, 0xe3, 0x08, // IID790 - 0x62, 0xd4, 0xfc, 0x1c, 0xc1, 0xe1, 0x08, // IID791 - 0x62, 0xf4, 0xf4, 0x1c, 0xc1, 0xe1, 0x10, // IID792 - 0x62, 0xfc, 0xac, 0x18, 0xc1, 0xee, 0x04, // IID793 - 0x62, 0xd4, 0xfc, 0x18, 0xc1, 0xe9, 0x04, // IID794 - 0x49, 0xc1, 0xec, 0x02, // IID795 - 0x62, 0xdc, 0xac, 0x14, 0xc1, 0xef, 0x08, // IID796 - 0x62, 0xd4, 0xfc, 0x1c, 0xc1, 0xec, 0x08, // IID797 - 0x62, 0xdc, 0x9c, 0x14, 0xd1, 0xec, // IID798 - 0x62, 0xdc, 0x84, 0x18, 0x81, 0xee, 0x00, 0x00, 0x01, 0x00, // IID799 - 0x62, 0xf4, 0xfc, 0x18, 0x81, 0xe9, 0x00, 0x00, 0x01, 0x00, // IID800 - 0xd5, 0x19, 0x83, 0xea, 0x10, // IID801 - 0x62, 0xd4, 0x9c, 0x1c, 0x83, 0xee, 0x01, // IID802 - 0x62, 0xfc, 0xfc, 0x1c, 0x83, 0xed, 0x01, // IID803 - 0x62, 0xfc, 0xdc, 0x14, 0x81, 0xec, 0x00, 0x00, 0x10, 0x00, // IID804 - 0x62, 0xf4, 0xa4, 0x18, 0x81, 0xf3, 0x00, 0x00, 0x00, 0x01, // IID805 - 0x62, 0xfc, 0xfc, 0x18, 0x81, 0xf7, 0x00, 0x00, 0x00, 0x01, // IID806 - 0xd5, 0x19, 0x81, 0xf7, 0x00, 0x00, 0x00, 0x10, // IID807 - 0x62, 0xdc, 0x94, 0x14, 0x81, 0xf4, 0x00, 0x10, 0x00, 0x00, // IID808 - 0x62, 0xfc, 0xfc, 0x1c, 0x81, 0xf3, 0x00, 0x10, 0x00, 0x00, // IID809 - 0x62, 0xf4, 0xec, 0x1c, 0x81, 0xf2, 0x00, 0x00, 0x00, 0x10, // IID810 - 0x48, 0x81, 0xca, 0x00, 0x00, 0x10, 0x00, // IID811 - 0x62, 0xfc, 0xfc, 0x18, 0x81, 0xce, 0x00, 0x00, 0x10, 0x00, // IID812 - 0xd5, 0x19, 0x81, 0xcd, 0x00, 0x00, 0x10, 0x00, // IID813 - 0x62, 0xf4, 0xf4, 0x10, 0x81, 0xc9, 0x00, 0x00, 0x40, 0x00, // IID814 - 0x62, 0xdc, 0xfc, 0x18, 0x81, 0xc9, 0x00, 0x00, 0x40, 0x00, // IID815 - 0xd5, 0x19, 0x81, 0xcb, 0x00, 0x00, 0x00, 0x40, // IID816 - 0x62, 0xfc, 0xfc, 0x10, 0x81, 0xeb, 0x00, 0x00, 0x40, 0x00, // IID817 - 0x62, 0xdc, 0xfc, 0x18, 0x81, 0xef, 0x00, 0x00, 0x40, 0x00, // IID818 - 0xd5, 0x19, 0x81, 0xea, 0x00, 0x00, 0x04, 0x00, // IID819 - 0x62, 0xfc, 0xf4, 0x14, 0x81, 0xee, 0x00, 0x00, 0x00, 0x40, // IID820 - 0x62, 0xfc, 0xfc, 0x1c, 0x81, 0xea, 0x00, 0x00, 0x00, 0x40, // IID821 - 0x62, 0xfc, 0xc4, 0x14, 0x81, 0xef, 0x00, 0x00, 0x00, 0x10, // IID822 - 0x62, 0x4c, 0x90, 0x18, 0x03, 0xb4, 0x58, 0x3b, 0x3a, 0xea, 0x56, // IID823 - 0x62, 0x1c, 0x90, 0x14, 0x03, 0xbc, 0xda, 0xa8, 0xc6, 0xee, 0xb4, // IID824 - 0x62, 0x4c, 0x9c, 0x18, 0x23, 0xb7, 0x8c, 0xc3, 0xef, 0xb9, // IID825 - 0x62, 0x3c, 0xa0, 0x14, 0x23, 0x94, 0x4e, 0xe5, 0xbe, 0x1e, 0x6a, // IID826 - 0x62, 0x44, 0x88, 0x10, 0x0b, 0x94, 0x93, 0xd7, 0x00, 0x60, 0xd4, // IID827 - 0x62, 0x7c, 0xb0, 0x1c, 0x0b, 0xa4, 0x0a, 0xf6, 0x59, 0x48, 0x0b, // IID828 - 0x62, 0xcc, 0xec, 0x18, 0xaf, 0x8c, 0x90, 0xd8, 0x4c, 0x28, 0x3d, // IID829 - 0x62, 0x0c, 0x94, 0x14, 0xaf, 0x94, 0x66, 0x24, 0x31, 0x81, 0x6e, // IID830 - 0x62, 0x7c, 0xe4, 0x18, 0x2b, 0xae, 0x62, 0xd7, 0xd5, 0x8f, // IID831 - 0x62, 0x4c, 0xc4, 0x14, 0x2b, 0xac, 0x11, 0x13, 0x58, 0xad, 0x9d, // IID832 - 0x62, 0xac, 0xbc, 0x18, 0x33, 0x94, 0xb3, 0x69, 0x59, 0x40, 0xf1, // IID833 - 0x62, 0x4c, 0xac, 0x1c, 0x33, 0xa2, 0xca, 0x81, 0x83, 0x16, // IID834 - 0x62, 0xc4, 0xf4, 0x18, 0x03, 0xd0, // IID835 - 0x49, 0x03, 0xce, // IID836 - 0x62, 0x7c, 0xc4, 0x14, 0x03, 0xd0, // IID837 - 0x62, 0x5c, 0xa4, 0x1c, 0x03, 0xd8, // IID838 - 0x62, 0xe4, 0xb5, 0x18, 0x66, 0xd2, // IID839 - 0x66, 0x4d, 0x0f, 0x38, 0xf6, 0xc7, // IID840 - 0x62, 0xcc, 0x86, 0x18, 0x66, 0xf2, // IID841 - 0xf3, 0x4c, 0x0f, 0x38, 0xf6, 0xda, // IID842 - 0x62, 0xfc, 0xe4, 0x10, 0x23, 0xd6, // IID843 - 0xd5, 0x5c, 0x23, 0xe9, // IID844 - 0x62, 0x44, 0xc4, 0x14, 0x23, 0xdf, // IID845 - 0x62, 0x54, 0xb4, 0x1c, 0x23, 0xcd, // IID846 - 0x62, 0x7c, 0xec, 0x10, 0xaf, 0xf8, // IID847 - 0xd5, 0x98, 0xaf, 0xc9, // IID848 - 0x62, 0x7c, 0xc4, 0x14, 0xaf, 0xe4, // IID849 - 0x62, 0x54, 0xac, 0x1c, 0xaf, 0xd1, // IID850 - 0x62, 0xc4, 0xec, 0x18, 0x0b, 0xde, // IID851 - 0x49, 0x0b, 0xcd, // IID852 - 0x62, 0x4c, 0xb4, 0x1c, 0x0b, 0xcd, // IID853 - 0x62, 0xdc, 0xec, 0x1c, 0x0b, 0xd1, // IID854 - 0x62, 0x7c, 0xc4, 0x10, 0x2b, 0xc0, // IID855 - 0x4d, 0x2b, 0xed, // IID856 - 0x62, 0x54, 0xe4, 0x14, 0x2b, 0xe7, // IID857 - 0x62, 0x74, 0xb4, 0x1c, 0x2b, 0xca, // IID858 - 0x62, 0xcc, 0x94, 0x18, 0x33, 0xc7, // IID859 - 0xd5, 0x59, 0x33, 0xce, // IID860 - 0x62, 0x6c, 0xe4, 0x14, 0x33, 0xf4, // IID861 - 0x62, 0x44, 0x84, 0x14, 0x33, 0xfd, // IID862 - 0x62, 0x54, 0xcc, 0x10, 0x24, 0xea, 0x04, // IID863 - 0xd5, 0xd9, 0xa4, 0xe8, 0x10, // IID864 - 0x62, 0x44, 0xdc, 0x14, 0x24, 0xdd, 0x10, // IID865 - 0x62, 0xcc, 0x84, 0x14, 0x24, 0xdf, 0x02, // IID866 - 0x62, 0x7c, 0x8c, 0x10, 0x2c, 0xdc, 0x08, // IID867 - 0x4c, 0x0f, 0xac, 0xfa, 0x01, // IID868 - 0x62, 0x5c, 0x9c, 0x14, 0x2c, 0xf6, 0x02, // IID869 - 0x62, 0xec, 0xdc, 0x14, 0x2c, 0xc4, 0x01, // IID870 - 0x62, 0xcc, 0xd4, 0x10, 0x40, 0xcc, // IID871 - 0xd5, 0x9d, 0x40, 0xfe, // IID872 - 0x62, 0x54, 0xf4, 0x18, 0x41, 0xff, // IID873 - 0x49, 0x0f, 0x41, 0xcd, // IID874 - 0x62, 0x4c, 0xec, 0x18, 0x42, 0xd2, // IID875 - 0xd5, 0xcd, 0x42, 0xe7, // IID876 - 0x62, 0xf4, 0xbc, 0x18, 0x43, 0xd1, // IID877 - 0x48, 0x0f, 0x43, 0xc9, // IID878 - 0x62, 0x54, 0xac, 0x18, 0x44, 0xe9, // IID879 - 0xd5, 0x9d, 0x44, 0xf3, // IID880 - 0x62, 0xc4, 0xa4, 0x18, 0x45, 0xf9, // IID881 - 0x4c, 0x0f, 0x45, 0xda, // IID882 - 0x62, 0x5c, 0x84, 0x10, 0x46, 0xf1, // IID883 - 0xd5, 0xc9, 0x46, 0xe4, // IID884 - 0x62, 0x5c, 0xec, 0x18, 0x47, 0xd4, // IID885 - 0xd5, 0x9c, 0x47, 0xc1, // IID886 - 0x62, 0x6c, 0xf4, 0x18, 0x48, 0xf7, // IID887 - 0xd5, 0xdc, 0x48, 0xd2, // IID888 - 0x62, 0xfc, 0xec, 0x18, 0x49, 0xda, // IID889 - 0xd5, 0xc9, 0x49, 0xed, // IID890 - 0x62, 0x4c, 0xa4, 0x10, 0x4a, 0xe3, // IID891 - 0xd5, 0x9d, 0x4a, 0xde, // IID892 - 0x62, 0xec, 0xf4, 0x18, 0x4b, 0xea, // IID893 - 0xd5, 0x99, 0x4b, 0xcd, // IID894 - 0x62, 0xc4, 0xec, 0x18, 0x4c, 0xec, // IID895 - 0xd5, 0x99, 0x4c, 0xd2, // IID896 - 0x62, 0xfc, 0xf4, 0x10, 0x4d, 0xde, // IID897 - 0x49, 0x0f, 0x4d, 0xd3, // IID898 - 0x62, 0x54, 0xec, 0x18, 0x4e, 0xf0, // IID899 - 0x4d, 0x0f, 0x4e, 0xf0, // IID900 - 0x62, 0x6c, 0xb4, 0x10, 0x4f, 0xed, // IID901 - 0xd5, 0xdd, 0x4f, 0xd6, // IID902 - 0x62, 0x84, 0xbc, 0x10, 0x40, 0xac, 0x5d, 0x1e, 0x52, 0x9c, 0x43, // IID903 - 0x62, 0xcc, 0xa0, 0x18, 0x41, 0x94, 0x05, 0x7f, 0x12, 0x32, 0x06, // IID904 - 0x62, 0x14, 0xf8, 0x10, 0x42, 0x84, 0x50, 0xef, 0x3d, 0x63, 0x10, // IID905 - 0x62, 0x7c, 0x94, 0x18, 0x43, 0xb2, 0xc8, 0x61, 0x09, 0xab, // IID906 - 0x62, 0x1c, 0x98, 0x18, 0x44, 0x84, 0x57, 0x86, 0xbb, 0xe1, 0x85, // IID907 - 0xd5, 0xde, 0x45, 0xac, 0x9b, 0x2e, 0xd2, 0x27, 0xca, // IID908 - 0x62, 0x8c, 0xf0, 0x18, 0x46, 0x94, 0x21, 0xa0, 0x64, 0xbe, 0x30, // IID909 - 0x62, 0x54, 0x98, 0x10, 0x47, 0xa4, 0x42, 0x06, 0x01, 0x47, 0xdd, // IID910 - 0x62, 0x34, 0xa4, 0x18, 0x48, 0x84, 0xdb, 0x96, 0x9e, 0xcc, 0x25, // IID911 - 0x62, 0x44, 0x9c, 0x18, 0x49, 0x9b, 0x02, 0x8f, 0xd2, 0xf3, // IID912 - 0x62, 0x6c, 0xbc, 0x18, 0x4a, 0x94, 0x5b, 0x16, 0x48, 0x92, 0xb7, // IID913 - 0x62, 0x54, 0x88, 0x10, 0x4b, 0x94, 0xd6, 0x84, 0x48, 0x88, 0x14, // IID914 - 0x62, 0x1c, 0xa4, 0x10, 0x4c, 0x84, 0xb5, 0xa8, 0xb7, 0x92, 0x00, // IID915 - 0x62, 0x6c, 0x8c, 0x18, 0x4d, 0xa4, 0x13, 0x45, 0x2d, 0x9c, 0x00, // IID916 - 0x62, 0x74, 0xb0, 0x10, 0x4e, 0x84, 0x91, 0x6b, 0xc8, 0x55, 0x66, // IID917 - 0x62, 0x84, 0xe0, 0x10, 0x4f, 0xac, 0x0a, 0xf5, 0xbc, 0xfa, 0xef, // IID918 + 0x62, 0x64, 0x0c, 0x10, 0x21, 0xa4, 0xd3, 0x4c, 0xbf, 0xca, 0xb9, // IID271 + 0xd5, 0x53, 0x23, 0x94, 0xd4, 0x3b, 0xa7, 0x23, 0x35, // IID272 + 0x62, 0x84, 0x34, 0x1c, 0x21, 0xac, 0x7f, 0xaa, 0x22, 0xf4, 0xd5, // IID273 + 0x62, 0xec, 0x7c, 0x14, 0x21, 0x87, 0x01, 0x9b, 0xaf, 0xe9, // IID274 + 0x62, 0x8c, 0x1c, 0x10, 0x09, 0xa4, 0x1e, 0x3a, 0x1e, 0x28, 0x17, // IID275 + 0xd5, 0x22, 0x0b, 0x94, 0xbb, 0xbb, 0xb5, 0x77, 0x24, // IID276 + 0x62, 0x44, 0x7c, 0x14, 0x09, 0x84, 0x4b, 0x51, 0x2e, 0x8a, 0xce, // IID277 + 0x62, 0xd4, 0x60, 0x1c, 0x09, 0x9c, 0xe3, 0x2d, 0x84, 0x29, 0xdd, // IID278 + 0x62, 0x9c, 0x28, 0x10, 0x08, 0x94, 0x73, 0xd2, 0x31, 0x64, 0xc2, // IID279 + 0xd5, 0x76, 0x0a, 0xbc, 0x6e, 0x19, 0x85, 0x21, 0x14, // IID280 + 0x62, 0x54, 0x54, 0x14, 0x08, 0xa9, 0x86, 0xed, 0xaf, 0xef, // IID281 + 0x62, 0x04, 0x04, 0x14, 0x08, 0xbc, 0x01, 0x9f, 0x76, 0x1e, 0xf5, // IID282 + 0x62, 0x7c, 0x04, 0x18, 0x29, 0xa2, 0xe5, 0xbc, 0x2b, 0x5c, // IID283 + 0x62, 0x4c, 0x20, 0x10, 0x29, 0x9c, 0x39, 0xb3, 0x78, 0x60, 0x5c, // IID284 + 0x62, 0x54, 0x6c, 0x14, 0x29, 0xb4, 0xd0, 0x7f, 0xc7, 0x12, 0xf6, // IID285 + 0x62, 0x54, 0x34, 0x1c, 0x29, 0x8f, 0xad, 0xcd, 0x5a, 0x77, // IID286 + 0x62, 0xac, 0x50, 0x10, 0x31, 0xbc, 0x52, 0xd5, 0x1f, 0xe3, 0x2f, // IID287 + 0xd5, 0x15, 0x33, 0x93, 0xde, 0x50, 0x31, 0x0a, // IID288 + 0x62, 0x2c, 0x68, 0x14, 0x31, 0x84, 0xf6, 0x97, 0xe8, 0xd4, 0x1a, // IID289 + 0x62, 0x7c, 0x38, 0x1c, 0x31, 0x84, 0x20, 0x82, 0xae, 0x6e, 0x62, // IID290 + 0x62, 0xac, 0x7c, 0x10, 0x30, 0x94, 0x3d, 0xf3, 0x49, 0xfc, 0xeb, // IID291 + 0xd5, 0x34, 0x32, 0xac, 0xbb, 0xe1, 0xf1, 0x7e, 0x23, // IID292 + 0x62, 0x3c, 0x14, 0x14, 0x30, 0xb4, 0xb2, 0x5b, 0x09, 0xc0, 0x5c, // IID293 + 0x62, 0x4c, 0x20, 0x14, 0x30, 0x9c, 0xe1, 0x58, 0xb9, 0xf7, 0x1c, // IID294 + 0x62, 0xdc, 0x7c, 0x10, 0x83, 0xc0, 0x10, // IID295 + 0x62, 0xdc, 0x7c, 0x18, 0x83, 0xc0, 0x10, // IID296 + 0xd5, 0x10, 0x81, 0xc5, 0x00, 0x00, 0x01, 0x00, // IID297 + 0x62, 0xd4, 0x3c, 0x14, 0x81, 0xc0, 0x00, 0x00, 0x10, 0x00, // IID298 + 0x62, 0xd4, 0x7c, 0x1c, 0x81, 0xc5, 0x00, 0x00, 0x10, 0x00, // IID299 + 0x62, 0xdc, 0x14, 0x14, 0x81, 0xc5, 0x00, 0x00, 0x00, 0x01, // IID300 + 0x41, 0x83, 0xe4, 0x10, // IID301 + 0x62, 0xdc, 0x7c, 0x18, 0x83, 0xe6, 0x10, // IID302 + 0xd5, 0x11, 0x83, 0xe0, 0x10, // IID303 + 0x62, 0xd4, 0x3c, 0x1c, 0x83, 0xe4, 0x01, // IID304 + 0x62, 0xd4, 0x7c, 0x1c, 0x83, 0xe5, 0x01, // IID305 + 0x62, 0xdc, 0x34, 0x14, 0x83, 0xe1, 0x10, // IID306 + 0x62, 0xec, 0x7c, 0x08, 0x69, 0xd7, 0x00, 0x00, 0x01, 0x00, // IID307 + 0x62, 0xd4, 0x7c, 0x08, 0x69, 0xc1, 0x00, 0x00, 0x01, 0x00, // IID308 + 0x62, 0x4c, 0x7c, 0x08, 0x69, 0xd2, 0x00, 0x00, 0x00, 0x10, // IID309 + 0x62, 0x6c, 0x7c, 0x0c, 0x6b, 0xcd, 0x01, // IID310 + 0x62, 0xdc, 0x7c, 0x0c, 0x6b, 0xc0, 0x01, // IID311 + 0x62, 0x4c, 0x7c, 0x0c, 0x69, 0xc0, 0x00, 0x00, 0x00, 0x01, // IID312 + 0x62, 0xdc, 0x0c, 0x10, 0x83, 0xca, 0x01, // IID313 + 0x62, 0xfc, 0x7c, 0x18, 0x83, 0xce, 0x01, // IID314 + 0xd5, 0x10, 0x81, 0xc9, 0x00, 0x00, 0x10, 0x00, // IID315 + 0x62, 0xd4, 0x3c, 0x14, 0x83, 0xc8, 0x01, // IID316 + 0x62, 0xdc, 0x7c, 0x1c, 0x83, 0xcb, 0x01, // IID317 +#endif // _LP64 + 0x62, 0xf4, 0x6c, 0x1c, 0x81, 0xca, 0x00, 0x00, 0x00, 0x10, // IID318 +#ifdef _LP64 + 0xd5, 0x10, 0xc1, 0xd6, 0x08, // IID319 + 0x62, 0xfc, 0x7c, 0x18, 0xc1, 0xd7, 0x08, // IID320 + 0xd5, 0x10, 0xc1, 0xd3, 0x04, // IID321 + 0x62, 0xdc, 0x0c, 0x10, 0xc1, 0xc0, 0x02, // IID322 + 0x62, 0xdc, 0x7c, 0x18, 0xc1, 0xc5, 0x02, // IID323 + 0x41, 0xc1, 0xc0, 0x02, // IID324 + 0x62, 0xdc, 0x6c, 0x14, 0xc1, 0xc0, 0x10, // IID325 + 0x62, 0xd4, 0x7c, 0x1c, 0xc1, 0xc5, 0x10, // IID326 + 0x62, 0xdc, 0x3c, 0x14, 0xd1, 0xc0, // IID327 + 0x62, 0xfc, 0x1c, 0x10, 0xc1, 0xc9, 0x10, // IID328 + 0x62, 0xdc, 0x7c, 0x18, 0xc1, 0xc8, 0x10, // IID329 + 0xd5, 0x10, 0xc1, 0xc9, 0x04, // IID330 + 0x62, 0xf4, 0x3c, 0x14, 0xc1, 0xc9, 0x04, // IID331 + 0x62, 0xfc, 0x7c, 0x1c, 0xc1, 0xc8, 0x04, // IID332 + 0x62, 0xd4, 0x04, 0x1c, 0xc1, 0xcf, 0x02, // IID333 + 0x62, 0xdc, 0x0c, 0x18, 0xc1, 0xe3, 0x04, // IID334 + 0x62, 0xfc, 0x7c, 0x18, 0xc1, 0xe7, 0x04, // IID335 + 0xd5, 0x11, 0xc1, 0xe6, 0x04, // IID336 + 0x62, 0xf4, 0x24, 0x14, 0xc1, 0xe2, 0x02, // IID337 + 0x62, 0xfc, 0x7c, 0x1c, 0xc1, 0xe3, 0x02, // IID338 + 0x62, 0xfc, 0x5c, 0x14, 0xc1, 0xe4, 0x02, // IID339 + 0x62, 0xfc, 0x54, 0x10, 0xd1, 0xff, // IID340 + 0x62, 0xdc, 0x7c, 0x18, 0xd1, 0xfe, // IID341 + 0xd5, 0x11, 0xc1, 0xf9, 0x02, // IID342 + 0x62, 0xfc, 0x3c, 0x14, 0xc1, 0xfb, 0x04, // IID343 + 0x62, 0xd4, 0x7c, 0x1c, 0xc1, 0xfe, 0x04, // IID344 + 0x62, 0xdc, 0x2c, 0x14, 0xc1, 0xfa, 0x10, // IID345 + 0x62, 0xd4, 0x4c, 0x10, 0xc1, 0xe5, 0x08, // IID346 + 0x62, 0xdc, 0x7c, 0x18, 0xc1, 0xe0, 0x08, // IID347 + 0x41, 0xc1, 0xe6, 0x10, // IID348 + 0x62, 0xdc, 0x1c, 0x14, 0xc1, 0xe1, 0x08, // IID349 + 0x62, 0xd4, 0x7c, 0x1c, 0xc1, 0xe2, 0x08, // IID350 + 0x62, 0xfc, 0x5c, 0x14, 0xd1, 0xe4, // IID351 + 0x62, 0xf4, 0x1c, 0x18, 0xc1, 0xeb, 0x04, // IID352 + 0x62, 0xfc, 0x7c, 0x18, 0xc1, 0xef, 0x04, // IID353 + 0xd5, 0x11, 0xc1, 0xec, 0x10, // IID354 + 0x62, 0xdc, 0x3c, 0x14, 0xc1, 0xee, 0x04, // IID355 + 0x62, 0xdc, 0x7c, 0x1c, 0xc1, 0xef, 0x04, // IID356 + 0x62, 0xdc, 0x04, 0x14, 0xc1, 0xef, 0x02, // IID357 + 0x62, 0xd4, 0x5c, 0x10, 0x81, 0xea, 0x00, 0x01, 0x00, 0x00, // IID358 + 0x62, 0xd4, 0x7c, 0x18, 0x81, 0xed, 0x00, 0x01, 0x00, 0x00, // IID359 + 0xd5, 0x11, 0x81, 0xe9, 0x00, 0x01, 0x00, 0x00, // IID360 + 0x62, 0xd4, 0x44, 0x14, 0x81, 0xec, 0x00, 0x00, 0x00, 0x10, // IID361 + 0x62, 0xfc, 0x7c, 0x1c, 0x81, 0xe8, 0x00, 0x00, 0x00, 0x10, // IID362 + 0x62, 0xdc, 0x04, 0x14, 0x83, 0xef, 0x01, // IID363 + 0x62, 0xd4, 0x34, 0x18, 0x81, 0xf7, 0x00, 0x00, 0x00, 0x01, // IID364 + 0x62, 0xd4, 0x7c, 0x18, 0x81, 0xf5, 0x00, 0x00, 0x00, 0x01, // IID365 + 0xd5, 0x11, 0x83, 0xf4, 0x10, // IID366 + 0x62, 0xfc, 0x14, 0x14, 0x83, 0xf6, 0x10, // IID367 +#endif // _LP64 + 0x62, 0xf4, 0x7c, 0x1c, 0x83, 0xf3, 0x10, // IID368 +#ifdef _LP64 + 0x62, 0xd4, 0x3c, 0x1c, 0x83, 0xf0, 0x10, // IID369 + 0x62, 0xd4, 0x7c, 0x10, 0x81, 0xed, 0x00, 0x00, 0x40, 0x00, // IID370 + 0x62, 0xd4, 0x7c, 0x18, 0x81, 0xec, 0x00, 0x00, 0x40, 0x00, // IID371 + 0xd5, 0x10, 0x81, 0xe9, 0x00, 0x00, 0x00, 0x04, // IID372 + 0x62, 0xdc, 0x4c, 0x14, 0x81, 0xea, 0x00, 0x00, 0x00, 0x40, // IID373 + 0x62, 0xd4, 0x7c, 0x1c, 0x81, 0xea, 0x00, 0x00, 0x00, 0x40, // IID374 + 0x62, 0xd4, 0x24, 0x1c, 0x81, 0xeb, 0x00, 0x00, 0x00, 0x40, // IID375 + 0x62, 0x1c, 0x64, 0x10, 0x03, 0xa4, 0x06, 0x73, 0x0a, 0x1a, 0x6a, // IID376 + 0xd5, 0x74, 0x03, 0xb4, 0x9a, 0xcf, 0x90, 0xf9, 0x25, // IID377 + 0x62, 0x6c, 0x70, 0x1c, 0x03, 0x8c, 0x03, 0xbc, 0x5d, 0x2d, 0x48, // IID378 + 0x62, 0x54, 0x34, 0x1c, 0x03, 0x8b, 0x01, 0xee, 0xd5, 0x43, // IID379 + 0x62, 0xac, 0x74, 0x18, 0x23, 0xbc, 0xbd, 0xbc, 0xc2, 0x25, 0x28, // IID380 + 0xd5, 0x47, 0x23, 0x9c, 0xfd, 0x6b, 0x47, 0x97, 0xed, // IID381 + 0x62, 0xac, 0x30, 0x1c, 0x23, 0xbc, 0x36, 0x45, 0x53, 0xea, 0xf8, // IID382 + 0x62, 0xdc, 0x60, 0x1c, 0x23, 0x9c, 0x84, 0xee, 0x23, 0x02, 0x0b, // IID383 + 0x62, 0x04, 0x00, 0x18, 0xaf, 0xac, 0x67, 0x97, 0x85, 0xd6, 0xe0, // IID384 + 0xd5, 0xd0, 0xaf, 0x8c, 0x5f, 0x45, 0x75, 0xdc, 0x0a, // IID385 + 0x62, 0x74, 0x20, 0x14, 0xaf, 0x8c, 0xb2, 0x9f, 0xf0, 0x26, 0xbc, // IID386 + 0x62, 0xdc, 0x60, 0x1c, 0xaf, 0x9c, 0xf4, 0xd9, 0x65, 0x62, 0xae, // IID387 + 0x62, 0xd4, 0x74, 0x10, 0x0b, 0x8e, 0x23, 0x22, 0x64, 0x10, // IID388 + 0xd5, 0x55, 0x0b, 0x97, 0x46, 0x7c, 0x65, 0x85, // IID389 + 0x62, 0x84, 0x04, 0x1c, 0x0b, 0xb4, 0xa4, 0x97, 0x69, 0x3b, 0x74, // IID390 + 0x62, 0x74, 0x38, 0x1c, 0x0b, 0x84, 0xf2, 0x24, 0xeb, 0x7b, 0xa7, // IID391 + 0x62, 0x0c, 0x74, 0x18, 0x2b, 0xa4, 0xae, 0xe5, 0x10, 0x93, 0x0e, // IID392 + 0xd5, 0x13, 0x2b, 0x8c, 0x56, 0x2f, 0x91, 0xf8, 0xe4, // IID393 + 0x62, 0xcc, 0x34, 0x1c, 0x2b, 0xae, 0xd3, 0xff, 0x79, 0x2f, // IID394 + 0x62, 0xa4, 0x7c, 0x14, 0x2b, 0x84, 0xb2, 0xc1, 0x71, 0x5d, 0x67, // IID395 + 0x62, 0x24, 0x20, 0x10, 0x33, 0xa4, 0x93, 0x7f, 0xf4, 0x3d, 0x87, // IID396 + 0xd5, 0x35, 0x33, 0xb4, 0x5f, 0x34, 0xae, 0x0d, 0xb0, // IID397 + 0x62, 0xc4, 0x58, 0x14, 0x33, 0x94, 0x85, 0x1e, 0x39, 0x10, 0xe6, // IID398 + 0x62, 0xc4, 0x60, 0x14, 0x33, 0x9c, 0x7d, 0x56, 0x27, 0xe4, 0xd2, // IID399 + 0x62, 0xa4, 0x10, 0x10, 0x32, 0x8c, 0xaa, 0x84, 0x3e, 0x57, 0x66, // IID400 + 0xd5, 0x73, 0x32, 0xb4, 0xc8, 0x3f, 0xa9, 0x94, 0x3a, // IID401 + 0x62, 0x44, 0x10, 0x1c, 0x32, 0xac, 0x7f, 0x32, 0x35, 0xd4, 0x76, // IID402 + 0x62, 0x14, 0x04, 0x1c, 0x32, 0xbc, 0x0d, 0xe6, 0x92, 0xb1, 0xb8, // IID403 + 0x62, 0xec, 0x75, 0x10, 0x33, 0x84, 0x17, 0x91, 0xa2, 0x62, 0x05, // IID404 + 0x66, 0xd5, 0x76, 0x33, 0xac, 0xe2, 0x0e, 0x98, 0xe6, 0xab, // IID405 + 0x62, 0x54, 0x25, 0x14, 0x33, 0x9a, 0x5a, 0x1c, 0x91, 0x0a, // IID406 + 0x62, 0x4c, 0x01, 0x14, 0x33, 0xbc, 0x9e, 0x26, 0x5c, 0x09, 0xff, // IID407 + 0x62, 0x7c, 0x1c, 0x18, 0x03, 0xef, // IID408 + 0xd5, 0x54, 0x03, 0xe4, // IID409 + 0xd5, 0x51, 0x03, 0xe0, // IID410 + 0x62, 0x54, 0x24, 0x1c, 0x03, 0xd7, // IID411 + 0x62, 0xec, 0x64, 0x14, 0x03, 0xdc, // IID412 + 0x62, 0x7c, 0x44, 0x14, 0x03, 0xff, // IID413 + 0x62, 0xcc, 0x2c, 0x10, 0x23, 0xd8, // IID414 + 0xd5, 0x51, 0x23, 0xfc, // IID415 + 0x45, 0x23, 0xdd, // IID416 + 0x62, 0xdc, 0x14, 0x1c, 0x23, 0xd7, // IID417 + 0x62, 0xec, 0x44, 0x14, 0x23, 0xff, // IID418 + 0x62, 0x44, 0x34, 0x1c, 0x23, 0xd9, // IID419 + 0x62, 0xcc, 0x54, 0x10, 0xaf, 0xe0, // IID420 + 0xd5, 0xd1, 0xaf, 0xed, // IID421 + 0x41, 0x0f, 0xaf, 0xdb, // IID422 + 0x62, 0xf4, 0x54, 0x14, 0xaf, 0xd9, // IID423 + 0x62, 0x6c, 0x04, 0x14, 0xaf, 0xfd, // IID424 + 0x62, 0x44, 0x04, 0x1c, 0xaf, 0xcf, // IID425 + 0x62, 0xcc, 0x0d, 0x10, 0x0b, 0xf9, // IID426 + 0x66, 0xd5, 0x40, 0x0b, 0xd1, // IID427 + 0x66, 0x44, 0x0b, 0xd1, // IID428 + 0x62, 0xcc, 0x05, 0x14, 0x0b, 0xea, // IID429 + 0x62, 0xec, 0x55, 0x14, 0x0b, 0xeb, // IID430 +#endif // _LP64 + 0x62, 0xf4, 0x6d, 0x1c, 0x0b, 0xda, // IID431 +#ifdef _LP64 + 0x62, 0x6c, 0x74, 0x18, 0x0b, 0xc6, // IID432 + 0xd5, 0x10, 0x0b, 0xcb, // IID433 + 0xd5, 0x55, 0x0b, 0xdb, // IID434 + 0x62, 0x54, 0x04, 0x14, 0x0b, 0xcd, // IID435 + 0x62, 0x6c, 0x04, 0x14, 0x0b, 0xff, // IID436 + 0x62, 0xec, 0x64, 0x14, 0x0b, 0xcb, // IID437 + 0x62, 0x6c, 0x5c, 0x10, 0xa5, 0xc0, // IID438 + 0x44, 0x0f, 0xa5, 0xe2, // IID439 + 0x62, 0x44, 0x14, 0x14, 0xa5, 0xf9, // IID440 + 0x62, 0xec, 0x74, 0x14, 0xa5, 0xe1, // IID441 + 0x62, 0xc4, 0x5c, 0x10, 0xad, 0xd7, // IID442 + 0x44, 0x0f, 0xad, 0xe1, // IID443 + 0x62, 0xc4, 0x0c, 0x1c, 0xad, 0xf9, // IID444 + 0x62, 0x7c, 0x64, 0x14, 0xad, 0xeb, // IID445 + 0x62, 0x4c, 0x0c, 0x10, 0x2b, 0xdb, // IID446 + 0x41, 0x2b, 0xd3, // IID447 + 0x62, 0x5c, 0x04, 0x1c, 0x2b, 0xd8, // IID448 + 0x62, 0x5c, 0x0c, 0x1c, 0x2b, 0xf1, // IID449 + 0x62, 0xc4, 0x04, 0x10, 0x33, 0xc4, // IID450 + 0xd5, 0x41, 0x33, 0xe6, // IID451 + 0xd5, 0x45, 0x33, 0xf5, // IID452 + 0x62, 0xec, 0x3c, 0x14, 0x33, 0xc9, // IID453 + 0x62, 0x6c, 0x2c, 0x14, 0x33, 0xd5, // IID454 + 0x62, 0x54, 0x24, 0x1c, 0x33, 0xeb, // IID455 + 0x62, 0xcc, 0x24, 0x10, 0x24, 0xe9, 0x04, // IID456 + 0xd5, 0x94, 0xa4, 0xd6, 0x04, // IID457 + 0x62, 0x44, 0x54, 0x14, 0x24, 0xc7, 0x10, // IID458 + 0x62, 0xe4, 0x6c, 0x1c, 0x24, 0xda, 0x01, // IID459 + 0x62, 0x54, 0x44, 0x10, 0x2c, 0xc5, 0x10, // IID460 + 0xd5, 0xd1, 0xac, 0xf2, 0x01, // IID461 + 0x62, 0x44, 0x3c, 0x14, 0x2c, 0xf1, 0x10, // IID462 + 0x62, 0x7c, 0x64, 0x14, 0x2c, 0xc3, 0x04, // IID463 + 0x62, 0x6c, 0x0c, 0x10, 0x40, 0xd1, // IID464 + 0xd5, 0x95, 0x40, 0xf2, // IID465 + 0x62, 0xcc, 0x3c, 0x10, 0x41, 0xdd, // IID466 + 0xd5, 0xd4, 0x41, 0xcc, // IID467 + 0x62, 0x54, 0x24, 0x18, 0x42, 0xd6, // IID468 + 0xd5, 0xd5, 0x42, 0xf1, // IID469 + 0x62, 0xcc, 0x14, 0x18, 0x43, 0xf3, // IID470 + 0xd5, 0xd1, 0x43, 0xc0, // IID471 + 0x62, 0x5c, 0x1c, 0x10, 0x44, 0xee, // IID472 + 0xd5, 0xd5, 0x44, 0xf0, // IID473 + 0x62, 0xcc, 0x54, 0x10, 0x45, 0xe7, // IID474 + 0xd5, 0x94, 0x45, 0xc0, // IID475 + 0x62, 0x6c, 0x04, 0x18, 0x46, 0xd6, // IID476 + 0xd5, 0xc4, 0x46, 0xfa, // IID477 + 0x62, 0x54, 0x24, 0x10, 0x47, 0xc2, // IID478 + 0xd5, 0xc1, 0x47, 0xd3, // IID479 + 0x62, 0xfc, 0x24, 0x10, 0x48, 0xdd, // IID480 + 0xd5, 0x95, 0x48, 0xe7, // IID481 + 0x62, 0xfc, 0x1c, 0x18, 0x49, 0xd2, // IID482 + 0xd5, 0xd0, 0x49, 0xd3, // IID483 + 0x62, 0xec, 0x7c, 0x10, 0x4a, 0xe7, // IID484 + 0xd5, 0xd0, 0x4a, 0xd0, // IID485 + 0x62, 0x4c, 0x64, 0x18, 0x4b, 0xfe, // IID486 + 0xd5, 0xd5, 0x4b, 0xfd, // IID487 + 0x62, 0x44, 0x1c, 0x10, 0x4c, 0xca, // IID488 + 0xd5, 0xd4, 0x4c, 0xc4, // IID489 + 0x62, 0xdc, 0x7c, 0x10, 0x4d, 0xd2, // IID490 + 0xd5, 0xd5, 0x4d, 0xe4, // IID491 + 0x62, 0xcc, 0x34, 0x18, 0x4e, 0xe0, // IID492 + 0xd5, 0xd5, 0x4e, 0xc5, // IID493 + 0x62, 0x44, 0x44, 0x10, 0x4f, 0xdf, // IID494 + 0xd5, 0x94, 0x4f, 0xe2, // IID495 + 0x62, 0x5c, 0x64, 0x10, 0x40, 0x8c, 0x4f, 0x43, 0x67, 0x41, 0xfd, // IID496 + 0xd5, 0xb6, 0x40, 0x84, 0x45, 0xcb, 0xa0, 0xe6, 0x41, // IID497 + 0x62, 0x3c, 0x40, 0x10, 0x41, 0xbc, 0xf3, 0xd3, 0x01, 0x52, 0xaa, // IID498 + 0xd5, 0x91, 0x41, 0x94, 0x13, 0xcb, 0xd8, 0x5e, 0xe5, // IID499 + 0x62, 0x0c, 0x64, 0x18, 0x42, 0xac, 0x27, 0x46, 0x22, 0xd4, 0x0b, // IID500 + 0xd5, 0xf0, 0x42, 0xac, 0x6b, 0xe8, 0x77, 0xae, 0xbe, // IID501 + 0x62, 0x2c, 0x44, 0x10, 0x43, 0xac, 0x8e, 0x28, 0x24, 0x52, 0xca, // IID502 + 0xd5, 0xd1, 0x43, 0x91, 0xc3, 0x84, 0x21, 0x63, // IID503 + 0x62, 0x3c, 0x14, 0x10, 0x44, 0xac, 0x2a, 0x3a, 0x15, 0x8d, 0xc6, // IID504 + 0xd5, 0xc7, 0x44, 0xac, 0xcc, 0x2e, 0x20, 0x73, 0x99, // IID505 + 0x62, 0xc4, 0x30, 0x10, 0x45, 0x94, 0xb1, 0x1f, 0xc9, 0x6a, 0x7f, // IID506 + 0xd5, 0xd5, 0x45, 0xa6, 0x94, 0x65, 0x2e, 0x56, // IID507 + 0x62, 0x44, 0x20, 0x10, 0x46, 0x84, 0xa7, 0x49, 0xc7, 0x9a, 0xb9, // IID508 + 0xd5, 0xd7, 0x46, 0x8c, 0xda, 0x57, 0xed, 0xc7, 0xa6, // IID509 + 0x62, 0xec, 0x74, 0x18, 0x47, 0xa0, 0x15, 0x5c, 0x76, 0xec, // IID510 + 0xd5, 0x93, 0x47, 0x9c, 0x05, 0x15, 0x26, 0x02, 0x1d, // IID511 + 0x62, 0x14, 0x68, 0x18, 0x48, 0xb4, 0x64, 0x6f, 0xa5, 0x8d, 0xae, // IID512 + 0xd5, 0xf4, 0x48, 0x84, 0x51, 0x1c, 0x3b, 0xda, 0xe8, // IID513 + 0xd5, 0xa1, 0x49, 0x8c, 0xbf, 0x31, 0xd3, 0x2d, 0x94, // IID514 + 0xd5, 0xc7, 0x49, 0x84, 0x57, 0xf7, 0xc2, 0x04, 0x80, // IID515 + 0x62, 0xd4, 0x40, 0x10, 0x4a, 0x8c, 0x3b, 0x85, 0xc5, 0x38, 0x37, // IID516 + 0xd5, 0xd7, 0x4a, 0x84, 0x16, 0xa8, 0x15, 0xcc, 0x0f, // IID517 + 0x62, 0x44, 0x08, 0x18, 0x4b, 0x94, 0x6e, 0x61, 0x31, 0xcf, 0xbb, // IID518 + 0xd5, 0x95, 0x4b, 0x94, 0x24, 0x9f, 0xc5, 0xd7, 0x03, // IID519 + 0x62, 0x84, 0x2c, 0x18, 0x4c, 0xac, 0xc0, 0xb4, 0x84, 0x65, 0x4a, // IID520 + 0xd5, 0xf4, 0x4c, 0x94, 0xe3, 0xef, 0x60, 0xc6, 0x47, // IID521 + 0x62, 0x74, 0x2c, 0x10, 0x4d, 0x91, 0x97, 0x7a, 0x97, 0x61, // IID522 + 0xd5, 0xe5, 0x4d, 0xb4, 0xdf, 0xcb, 0x01, 0xc6, 0x53, // IID523 + 0x62, 0x7c, 0x0c, 0x18, 0x4e, 0x89, 0x1e, 0x11, 0x93, 0xa9, // IID524 + 0xd5, 0xb5, 0x4e, 0xbc, 0x23, 0x92, 0x47, 0x16, 0x76, // IID525 + 0x62, 0x14, 0x24, 0x10, 0x4f, 0xb4, 0xa9, 0xd7, 0x52, 0x57, 0x0f, // IID526 + 0x44, 0x0f, 0x4f, 0xa4, 0xcb, 0x3a, 0x4b, 0xfe, 0xaa, // IID527 + 0xd5, 0x5d, 0x13, 0xf7, // IID528 + 0x4c, 0x3b, 0xe2, // IID529 + 0xd5, 0xd9, 0xaf, 0xe8, // IID530 + 0xf3, 0xd5, 0x9d, 0xb8, 0xc9, // IID531 + 0x4d, 0x1b, 0xc4, // IID532 + 0xd5, 0x5d, 0x2b, 0xf8, // IID533 + 0xf3, 0xd5, 0x9c, 0xbc, 0xd0, // IID534 + 0xf3, 0xd5, 0xd8, 0xbd, 0xe5, // IID535 + 0xd5, 0x18, 0x03, 0xd1, // IID536 + 0x4d, 0x23, 0xf5, // IID537 + 0xd5, 0x59, 0x0b, 0xe0, // IID538 + 0xd5, 0x58, 0x33, 0xee, // IID539 + 0xd5, 0x1d, 0x8b, 0xe3, // IID540 + 0xd5, 0xc8, 0xbc, 0xfa, // IID541 + 0xd5, 0xdd, 0xbd, 0xfc, // IID542 + 0xd5, 0xcd, 0xa3, 0xc8, // IID543 + 0xd5, 0x48, 0x87, 0xeb, // IID544 + 0xd5, 0x58, 0x85, 0xff, // IID545 + 0xd5, 0x1c, 0x01, 0x93, 0x5f, 0xc1, 0xf2, 0xe7, // IID546 + 0xd5, 0x6d, 0x21, 0x8c, 0x4b, 0x18, 0x94, 0x68, 0x87, // IID547 + 0xd5, 0x2e, 0x39, 0xac, 0xe3, 0x02, 0x21, 0xf7, 0x35, // IID548 + 0xd5, 0x49, 0x09, 0xa8, 0xef, 0xaf, 0xb9, 0xcb, // IID549 + 0xd5, 0x58, 0x31, 0x93, 0x23, 0xdd, 0xb4, 0xbf, // IID550 + 0xd5, 0x3e, 0x29, 0xb4, 0xdf, 0xba, 0xd9, 0x72, 0xbd, // IID551 + 0xd5, 0x4d, 0x89, 0xa4, 0x89, 0x9f, 0xe9, 0x9e, 0x8d, // IID552 + 0xd5, 0xb9, 0xc1, 0x9c, 0xa8, 0x90, 0xe9, 0x6b, 0x3a, // IID553 + 0xd5, 0x1a, 0x81, 0xa4, 0x16, 0xdd, 0x8b, 0xef, 0x07, 0x00, 0x00, 0x10, 0x00, // IID554 + 0xd5, 0x2b, 0x81, 0x84, 0x25, 0x4f, 0x76, 0xb8, 0x8a, 0x00, 0x00, 0x01, 0x00, // IID555 + 0x49, 0x81, 0xba, 0x26, 0x57, 0x2d, 0xf4, 0x00, 0x00, 0x00, 0x10, // IID556 + 0xd5, 0x1a, 0xc1, 0xbc, 0x77, 0xf5, 0xd9, 0x16, 0x6a, 0x04, // IID557 + 0xd5, 0x28, 0xc1, 0xa4, 0x69, 0x1e, 0xac, 0x66, 0x5f, 0x08, // IID558 + 0xd5, 0x28, 0x81, 0x9c, 0xf1, 0xb4, 0x6a, 0x73, 0xfb, 0x00, 0x00, 0x00, 0x10, // IID559 + 0xd5, 0x3a, 0xc1, 0xac, 0x35, 0x0b, 0x5b, 0x40, 0x0e, 0x08, // IID560 + 0xd5, 0x3a, 0x81, 0xac, 0xeb, 0xb5, 0xfb, 0x9d, 0x88, 0x00, 0x10, 0x00, 0x00, // IID561 + 0xd5, 0x1b, 0x83, 0xb4, 0x56, 0xdd, 0x7c, 0x86, 0xe6, 0x10, // IID562 + 0xd5, 0x2a, 0x81, 0x8c, 0xc2, 0x16, 0xb3, 0xd9, 0x18, 0x00, 0x10, 0x00, 0x00, // IID563 + 0x48, 0xc7, 0x83, 0xb3, 0xf8, 0xa7, 0xcf, 0x00, 0x01, 0x00, 0x00, // IID564 + 0xd5, 0x39, 0xf7, 0x84, 0xec, 0xc4, 0xfd, 0xa0, 0x65, 0x00, 0x00, 0x00, 0xf0, // IID565 + 0xd5, 0x69, 0x03, 0xbc, 0x13, 0xf4, 0x0e, 0xe5, 0xe2, // IID566 + 0xd5, 0x5a, 0x23, 0xb4, 0x62, 0x38, 0x1c, 0x5f, 0x1a, // IID567 + 0xd5, 0x79, 0x3b, 0xbc, 0x1e, 0x81, 0xd0, 0x6e, 0xc1, // IID568 + 0xf3, 0xd5, 0xcc, 0xbd, 0xa9, 0xe4, 0xfb, 0xe3, 0x12, // IID569 + 0xd5, 0x3c, 0x0b, 0xb4, 0xad, 0x42, 0x30, 0xd7, 0x00, // IID570 + 0xd5, 0x7e, 0x13, 0xbc, 0xb9, 0x12, 0xe9, 0xbd, 0x0a, // IID571 + 0xd5, 0xeb, 0xaf, 0xa4, 0x1d, 0xe1, 0x03, 0x24, 0xa7, // IID572 + 0xf3, 0xd5, 0x98, 0xb8, 0x9e, 0xdd, 0x93, 0x39, 0x8d, // IID573 + 0xd5, 0x4d, 0x1b, 0x91, 0x09, 0xba, 0x4a, 0x33, // IID574 + 0xd5, 0x2f, 0x2b, 0x8c, 0xf1, 0xfe, 0x9e, 0x65, 0xde, // IID575 + 0xf3, 0xd5, 0xdc, 0xbc, 0x8c, 0x24, 0x4f, 0x45, 0xce, 0xde, // IID576 + 0xd5, 0x79, 0x33, 0x84, 0x44, 0xb9, 0x83, 0xc4, 0x48, // IID577 + 0xd5, 0x6d, 0x8b, 0xb4, 0x01, 0xb1, 0x17, 0x73, 0xf7, // IID578 + 0xd5, 0x3f, 0x8d, 0x9c, 0xae, 0xd0, 0x8f, 0xeb, 0x3e, // IID579 + 0xf2, 0xd5, 0xdf, 0x2c, 0x94, 0xd5, 0x2e, 0x82, 0xf4, 0x3e, // IID580 + 0xd5, 0x7c, 0x87, 0xac, 0xa3, 0x47, 0xc2, 0xf0, 0xc0, // IID581 + 0xd5, 0x3d, 0x85, 0x84, 0x26, 0x17, 0x6a, 0xb5, 0x15, // IID582 + 0xd5, 0x19, 0x81, 0xc2, 0x00, 0x10, 0x00, 0x00, // IID583 + 0xd5, 0x18, 0x83, 0xe4, 0x10, // IID584 + 0xd5, 0x18, 0x81, 0xd7, 0x00, 0x00, 0x10, 0x00, // IID585 + 0x49, 0x81, 0xfc, 0x00, 0x10, 0x00, 0x00, // IID586 + 0x48, 0xc1, 0xd1, 0x04, // IID587 + 0x49, 0xd1, 0xde, // IID588 + 0xd5, 0x18, 0xc1, 0xc7, 0x02, // IID589 + 0x49, 0xc1, 0xcc, 0x04, // IID590 + 0x49, 0xc1, 0xfa, 0x04, // IID591 + 0xd5, 0x18, 0xc1, 0xe4, 0x04, // IID592 + 0x48, 0x81, 0xd9, 0x00, 0x00, 0x10, 0x00, // IID593 + 0xd5, 0x18, 0xc1, 0xe7, 0x10, // IID594 + 0xd5, 0x19, 0xc1, 0xeb, 0x02, // IID595 + 0x48, 0x81, 0xe9, 0x00, 0x00, 0x01, 0x00, // IID596 + 0x49, 0x81, 0xf1, 0x00, 0x00, 0x10, 0x00, // IID597 + 0xd5, 0x18, 0xc7, 0xc0, 0x00, 0x00, 0x01, 0x00, // IID598 + 0xd5, 0x19, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, // IID599 + 0xd5, 0x98, 0xba, 0xe2, 0x40, // IID600 + 0xd5, 0x19, 0xf7, 0xc5, 0x00, 0xf0, 0xff, 0xff, // IID601 + 0xd5, 0x19, 0x81, 0xce, 0x00, 0x00, 0x00, 0x04, // IID602 + 0xd5, 0x19, 0x81, 0xe9, 0x00, 0x00, 0x00, 0x10, // IID603 + 0xd5, 0xfe, 0x40, 0xb4, 0xb9, 0xf0, 0x92, 0xff, 0x47, // IID604 + 0xd5, 0xbf, 0x41, 0x8c, 0x60, 0xc0, 0x04, 0x49, 0x38, // IID605 + 0xd5, 0xfa, 0x42, 0xbc, 0xc7, 0x9a, 0xed, 0x80, 0xe6, // IID606 + 0xd5, 0xbf, 0x43, 0x8c, 0x35, 0xc8, 0x49, 0x5d, 0x2b, // IID607 + 0xd5, 0xca, 0x44, 0x84, 0x7b, 0x81, 0x93, 0x37, 0x22, // IID608 + 0x4d, 0x0f, 0x45, 0x83, 0xa0, 0x67, 0x9d, 0x04, // IID609 + 0xd5, 0xfc, 0x46, 0xa4, 0x80, 0x57, 0xe2, 0x6b, 0xa1, // IID610 + 0xd5, 0xda, 0x47, 0x9c, 0x02, 0x14, 0xaa, 0xa1, 0xf5, // IID611 + 0xd5, 0xfe, 0x48, 0xa4, 0x61, 0xf4, 0xdd, 0x9b, 0xcd, // IID612 + 0xd5, 0xef, 0x49, 0xbc, 0x7e, 0x5a, 0xbc, 0x01, 0x50, // IID613 + 0xd5, 0xb8, 0x4a, 0x9c, 0x8a, 0x87, 0xdc, 0x90, 0xd7, // IID614 + 0xd5, 0xd8, 0x4b, 0x8c, 0x24, 0xc8, 0x07, 0xb6, 0xaa, // IID615 + 0xd5, 0xef, 0x4c, 0xb4, 0x61, 0x0d, 0xf3, 0x4f, 0xda, // IID616 + 0xd5, 0xc9, 0x4d, 0x99, 0xd4, 0x0d, 0x54, 0xd5, // IID617 + 0x4a, 0x0f, 0x4e, 0x9c, 0x61, 0x34, 0x97, 0xd2, 0xbc, // IID618 + 0xd5, 0xa9, 0x4f, 0x9c, 0xcf, 0xa2, 0xa9, 0x68, 0xd4, // IID619 + 0xd5, 0x11, 0xff, 0xd0, // IID620 + 0x49, 0xf7, 0xf1, // IID621 + 0xd5, 0x19, 0xf7, 0xfc, // IID622 + 0x48, 0xf7, 0xea, // IID623 + 0xd5, 0x19, 0xf7, 0xe7, // IID624 + 0x49, 0xf7, 0xdc, // IID625 + 0x49, 0xf7, 0xd4, // IID626 + 0xd5, 0x19, 0xd3, 0xc0, // IID627 + 0xd5, 0x19, 0xd3, 0xcc, // IID628 + 0x49, 0xd3, 0xfb, // IID629 + 0xd5, 0x19, 0xd3, 0xe3, // IID630 + 0xd5, 0x18, 0xd3, 0xe7, // IID631 + 0xd5, 0x18, 0xd3, 0xe9, // IID632 + 0xd5, 0x18, 0xff, 0xc0, // IID633 + 0x49, 0xff, 0xcc, // IID634 + 0xd5, 0x18, 0x57, // IID635 + 0xd5, 0x19, 0x58, // IID636 + 0xd5, 0x12, 0xff, 0x94, 0x32, 0xce, 0x62, 0x9c, 0x99, // IID637 + 0xd5, 0x19, 0xf7, 0xa0, 0xdf, 0xdb, 0xf5, 0x99, // IID638 + 0xd5, 0x29, 0xf7, 0x9c, 0x16, 0x6e, 0x93, 0xf3, 0x40, // IID639 + 0x4b, 0xd3, 0xbc, 0x2a, 0x72, 0xcb, 0x04, 0x7d, // IID640 + 0xd5, 0x1a, 0xd3, 0xa4, 0xda, 0x24, 0x4b, 0x89, 0xde, // IID641 + 0x49, 0xd3, 0xac, 0x4d, 0x80, 0xaa, 0x96, 0x79, // IID642 + 0x49, 0xff, 0x86, 0x2a, 0xd0, 0xc2, 0x67, // IID643 + 0xd5, 0x3a, 0xff, 0x8c, 0x16, 0xc0, 0x62, 0x4f, 0x22, // IID644 + 0xd5, 0x19, 0x69, 0x94, 0x5f, 0x10, 0xbb, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x01, // IID645 + 0xd5, 0x59, 0x69, 0xef, 0x00, 0x10, 0x00, 0x00, // IID646 + 0xd5, 0xc8, 0xa4, 0xdb, 0x01, // IID647 + 0xd5, 0xc9, 0xac, 0xfb, 0x04, // IID648 + 0x62, 0xfc, 0x0c, 0x10, 0x8f, 0xc0, // IID649 + 0x62, 0xfc, 0xe4, 0x18, 0x8f, 0xc1, // IID650 + 0x62, 0xfc, 0x0c, 0x10, 0xff, 0xf4, // IID651 + 0x62, 0xd4, 0x84, 0x10, 0xff, 0xf0, // IID652 + 0xd5, 0xcf, 0xb6, 0xa4, 0x30, 0x7a, 0xe6, 0x9a, 0x46, // IID653 + 0xd5, 0xad, 0xb7, 0xb4, 0x90, 0xfe, 0x61, 0x96, 0xb7, // IID654 + 0xd5, 0xc8, 0xbe, 0xab, 0x95, 0x1f, 0x25, 0x9b, // IID655 + 0xd5, 0xd9, 0xbf, 0x9c, 0x9f, 0x19, 0x88, 0x31, 0x60, // IID656 + 0xd5, 0xcd, 0xb6, 0xf5, // IID657 + 0xd5, 0xdc, 0xb7, 0xf2, // IID658 + 0xd5, 0xc9, 0xbe, 0xdf, // IID659 + 0xd5, 0xd8, 0xbf, 0xe0, // IID660 + 0xd5, 0xcd, 0xb1, 0xa4, 0xdb, 0x9d, 0x47, 0xc3, 0x0f, // IID661 + 0x62, 0xfc, 0xfc, 0x08, 0xf7, 0xfc, // IID662 + 0x62, 0xdc, 0xfc, 0x0c, 0xf7, 0xfe, // IID663 + 0x62, 0xfc, 0xfc, 0x08, 0xf7, 0xf6, // IID664 + 0x62, 0xd4, 0xfc, 0x0c, 0xf7, 0xf3, // IID665 + 0x62, 0xf4, 0xfc, 0x08, 0xf7, 0xe9, // IID666 + 0x62, 0xdc, 0xfc, 0x0c, 0xf7, 0xec, // IID667 + 0x62, 0xfc, 0xfc, 0x08, 0xf7, 0xe5, // IID668 + 0x62, 0xd4, 0xfc, 0x0c, 0xf7, 0xe5, // IID669 + 0x62, 0x9c, 0xfc, 0x08, 0xf7, 0xa4, 0xba, 0x6e, 0xce, 0xa1, 0x70, // IID670 + 0x62, 0xdc, 0xf8, 0x0c, 0xf7, 0xa4, 0x58, 0xa4, 0x7a, 0x8f, 0xe9, // IID671 + 0x62, 0x5c, 0xfc, 0x08, 0xaf, 0xd3, // IID672 + 0xd5, 0x18, 0xf7, 0xe9, // IID673 + 0x62, 0xfc, 0xfc, 0x0c, 0xaf, 0xd6, // IID674 + 0x62, 0xf4, 0xfc, 0x0c, 0xaf, 0xdb, // IID675 + 0x62, 0x44, 0xfc, 0x08, 0xf5, 0xe7, // IID676 + 0x62, 0x54, 0xfc, 0x08, 0xf5, 0xff, // IID677 + 0x62, 0xd4, 0xfc, 0x0c, 0xf5, 0xdc, // IID678 + 0x62, 0xf4, 0xfc, 0x0c, 0xf5, 0xdb, // IID679 + 0x62, 0xd4, 0xac, 0x10, 0xf7, 0xdb, // IID680 + 0xd5, 0x18, 0xf7, 0xd9, // IID681 + 0x62, 0xdc, 0xec, 0x1c, 0xf7, 0xdf, // IID682 + 0x62, 0xdc, 0xa4, 0x14, 0xf7, 0xdb, // IID683 + 0x62, 0xd4, 0x84, 0x10, 0xf7, 0xd7, // IID684 + 0xd5, 0x18, 0xf7, 0xd5, // IID685 + 0x62, 0xdc, 0xfc, 0x08, 0x88, 0xd8, // IID686 + 0x62, 0x4c, 0xfc, 0x08, 0x88, 0xe4, // IID687 + 0x62, 0xcc, 0xfc, 0x0c, 0x88, 0xfb, // IID688 + 0x62, 0x54, 0xfc, 0x0c, 0x88, 0xed, // IID689 + 0x62, 0xdc, 0xb4, 0x10, 0xd3, 0xc4, // IID690 + 0xd5, 0x19, 0xd3, 0xc7, // IID691 + 0x62, 0xfc, 0xb4, 0x14, 0xd3, 0xc7, // IID692 + 0x62, 0xf4, 0xf4, 0x1c, 0xd3, 0xc1, // IID693 + 0x62, 0xd4, 0xcc, 0x10, 0xd3, 0xce, // IID694 + 0x49, 0xd3, 0xcf, // IID695 + 0x62, 0xdc, 0xa4, 0x1c, 0xd3, 0xce, // IID696 + 0x62, 0xdc, 0xbc, 0x14, 0xd3, 0xc8, // IID697 + 0x62, 0xfc, 0xac, 0x18, 0xd3, 0xe4, // IID698 + 0xd5, 0x18, 0xd3, 0xe3, // IID699 + 0x62, 0xdc, 0xf4, 0x14, 0xd3, 0xe1, // IID700 + 0x62, 0xd4, 0x94, 0x1c, 0xd3, 0xe5, // IID701 + 0x62, 0xdc, 0x84, 0x10, 0xd3, 0xfe, // IID702 + 0xd5, 0x18, 0xd3, 0xfa, // IID703 + 0x62, 0xdc, 0xb4, 0x14, 0xd3, 0xf9, // IID704 + 0x62, 0xdc, 0x9c, 0x14, 0xd3, 0xfc, // IID705 + 0x62, 0xdc, 0xcc, 0x10, 0xff, 0xcb, // IID706 + 0x49, 0xff, 0xcc, // IID707 + 0x62, 0xd4, 0xec, 0x14, 0xff, 0xcb, // IID708 + 0x62, 0xd4, 0xac, 0x1c, 0xff, 0xca, // IID709 + 0x62, 0xdc, 0xdc, 0x10, 0xff, 0xc0, // IID710 + 0xd5, 0x18, 0xff, 0xc2, // IID711 + 0x62, 0xd4, 0xe4, 0x1c, 0xff, 0xc3, // IID712 + 0x62, 0xdc, 0xac, 0x14, 0xff, 0xc2, // IID713 + 0x62, 0xd4, 0xd4, 0x10, 0xd3, 0xe0, // IID714 + 0x48, 0xd3, 0xe3, // IID715 + 0x62, 0xfc, 0xcc, 0x14, 0xd3, 0xe5, // IID716 + 0x62, 0xdc, 0xa4, 0x14, 0xd3, 0xe3, // IID717 + 0x62, 0xfc, 0x9c, 0x18, 0xd3, 0xe8, // IID718 + 0x49, 0xd3, 0xe8, // IID719 + 0x62, 0xd4, 0xec, 0x1c, 0xd3, 0xe9, // IID720 + 0x62, 0xfc, 0xdc, 0x14, 0xd3, 0xec, // IID721 + 0x62, 0x6c, 0xfc, 0x08, 0xf4, 0xfd, // IID722 + 0x62, 0xec, 0xfc, 0x08, 0xf4, 0xe4, // IID723 + 0x62, 0xfc, 0xfc, 0x0c, 0xf4, 0xc8, // IID724 + 0x62, 0x54, 0xfc, 0x0c, 0xf4, 0xf6, // IID725 + 0x62, 0x0c, 0xfc, 0x08, 0xaf, 0x9c, 0x49, 0x93, 0x23, 0x5a, 0x44, // IID726 + 0x62, 0xa4, 0xfc, 0x0c, 0xaf, 0xbc, 0x49, 0xf4, 0x10, 0x7f, 0xeb, // IID727 + 0x62, 0x7c, 0xf8, 0x08, 0xf5, 0xac, 0x4e, 0x6a, 0xe6, 0xf3, 0x8a, // IID728 + 0x62, 0x5c, 0xfc, 0x0c, 0xf5, 0xaf, 0xa7, 0x9d, 0xd4, 0xcb, // IID729 + 0x62, 0x9c, 0x84, 0x10, 0xf7, 0x9c, 0x68, 0xf2, 0x95, 0x4e, 0xda, // IID730 + 0x62, 0x94, 0x90, 0x1c, 0xf7, 0x9c, 0xe3, 0xab, 0x13, 0x00, 0x5c, // IID731 + 0x62, 0xfc, 0xfc, 0x08, 0x88, 0x94, 0x8a, 0x51, 0x15, 0xec, 0x9e, // IID732 + 0x62, 0x54, 0xfc, 0x0c, 0x88, 0x8a, 0x78, 0x2a, 0x58, 0xa3, // IID733 + 0x62, 0x9c, 0xf0, 0x10, 0xd3, 0xa4, 0x33, 0x2c, 0xda, 0x4c, 0x1b, // IID734 + 0x62, 0xd4, 0xb4, 0x14, 0xd3, 0xa4, 0x54, 0xce, 0x3b, 0x82, 0x62, // IID735 + 0x62, 0xd4, 0xb0, 0x18, 0xd3, 0xbc, 0x92, 0xb8, 0x85, 0xb5, 0xd9, // IID736 + 0x62, 0x94, 0xe0, 0x1c, 0xd3, 0xbc, 0x1e, 0x00, 0x1e, 0x29, 0x20, // IID737 + 0x62, 0x94, 0x9c, 0x18, 0xff, 0x8c, 0xb7, 0x45, 0x25, 0x08, 0xdf, // IID738 + 0x62, 0x94, 0xb0, 0x1c, 0xff, 0x8c, 0x4a, 0x84, 0x1d, 0x41, 0x21, // IID739 + 0x62, 0xb4, 0xd8, 0x10, 0xff, 0x84, 0xcb, 0x9e, 0x32, 0xf0, 0x02, // IID740 + 0x62, 0x94, 0xa8, 0x1c, 0xff, 0x84, 0x3c, 0x74, 0xa3, 0xaf, 0xc8, // IID741 + 0x62, 0xbc, 0xbc, 0x10, 0xd3, 0xac, 0xf7, 0x50, 0xa5, 0x18, 0x8e, // IID742 + 0x62, 0xbc, 0xb4, 0x14, 0xd3, 0xac, 0x53, 0x88, 0x0a, 0x7b, 0x50, // IID743 + 0x62, 0x64, 0xf8, 0x08, 0xf4, 0xbc, 0x03, 0x2a, 0x19, 0xd5, 0x19, // IID744 + 0x62, 0x3c, 0xf8, 0x0c, 0xf4, 0x8c, 0xa6, 0xcd, 0x07, 0x10, 0x21, // IID745 + 0x62, 0x6c, 0xfc, 0x10, 0x01, 0xa4, 0xdd, 0xe2, 0x05, 0xdc, 0xf7, // IID746 + 0x4e, 0x03, 0xbc, 0xc2, 0xa8, 0x5f, 0x46, 0xcb, // IID747 + 0x62, 0x14, 0xb8, 0x14, 0x01, 0xac, 0xc6, 0xd2, 0x59, 0xdc, 0x6c, // IID748 + 0x62, 0x9c, 0xe4, 0x1c, 0x01, 0x9c, 0xf3, 0xde, 0xe8, 0xc5, 0x36, // IID749 + 0x62, 0x0c, 0xd0, 0x10, 0x21, 0x9c, 0x5b, 0xed, 0xc4, 0xfd, 0xd3, // IID750 + 0xd5, 0x5e, 0x23, 0xbc, 0xbd, 0x4a, 0xc7, 0xf2, 0x6e, // IID751 + 0x62, 0x0c, 0x90, 0x1c, 0x21, 0x9c, 0x4f, 0xab, 0xe9, 0x4f, 0x73, // IID752 + 0x62, 0x14, 0x80, 0x1c, 0x21, 0xbc, 0xee, 0xaa, 0x7a, 0x19, 0xf9, // IID753 + 0x62, 0x0c, 0x9c, 0x18, 0x09, 0xa4, 0xfe, 0x9e, 0x3f, 0xa3, 0x3b, // IID754 + 0xd5, 0x4b, 0x0b, 0x84, 0x0c, 0xcd, 0xc4, 0x1f, 0xd7, // IID755 + 0x62, 0x04, 0xb8, 0x1c, 0x09, 0x9c, 0xc8, 0x6b, 0x42, 0xbd, 0xe1, // IID756 + 0x62, 0xdc, 0xf4, 0x1c, 0x09, 0x8c, 0x9b, 0xad, 0xbc, 0xe4, 0x7b, // IID757 + 0x62, 0xfc, 0xb8, 0x10, 0x29, 0x94, 0xb7, 0xd7, 0x27, 0x88, 0x6f, // IID758 + 0x62, 0xc4, 0xd4, 0x10, 0x29, 0xaa, 0x38, 0x47, 0xca, 0xf9, // IID759 + 0x62, 0x9c, 0xc0, 0x14, 0x29, 0x9c, 0xd3, 0xc0, 0xbc, 0x22, 0x09, // IID760 + 0x62, 0x2c, 0xb4, 0x14, 0x29, 0x8c, 0x3f, 0x54, 0x6b, 0x0b, 0xc7, // IID761 + 0x62, 0xd4, 0xa0, 0x18, 0x31, 0x8c, 0x9c, 0xe9, 0x13, 0x8e, 0xa4, // IID762 + 0xd5, 0x7c, 0x33, 0xa4, 0x13, 0x7e, 0x9b, 0x6b, 0x71, // IID763 + 0x62, 0xa4, 0xd0, 0x14, 0x31, 0x84, 0x29, 0xe2, 0xbb, 0x0f, 0xa5, // IID764 + 0x62, 0x3c, 0x98, 0x1c, 0x31, 0xa4, 0x14, 0xb1, 0x7f, 0x0b, 0x0e, // IID765 + 0x62, 0xf4, 0x8c, 0x10, 0x81, 0x81, 0x4f, 0x7b, 0x3b, 0x2d, 0x00, 0x00, 0x10, 0x00, // IID766 + 0x62, 0xbc, 0x8c, 0x1c, 0x81, 0x84, 0xbd, 0x18, 0x51, 0xdd, 0xed, 0x00, 0x10, 0x00, 0x00, // IID767 + 0x62, 0xbc, 0xc0, 0x10, 0x83, 0xa4, 0x3c, 0x96, 0xb2, 0x91, 0xf6, 0x10, // IID768 + 0x62, 0xf4, 0xac, 0x1c, 0x83, 0xa4, 0xd2, 0x7c, 0xf1, 0x75, 0x38, 0x01, // IID769 + 0x62, 0xa4, 0xf8, 0x08, 0x69, 0x8c, 0x89, 0x76, 0x10, 0xc7, 0x32, 0x00, 0x10, 0x00, 0x00, // IID770 + 0x62, 0xcc, 0xfc, 0x0c, 0x69, 0x9c, 0x9f, 0x0d, 0xa6, 0xad, 0x7b, 0x00, 0x00, 0x10, 0x00, // IID771 + 0x62, 0xfc, 0xb0, 0x10, 0x81, 0x8c, 0x7a, 0x44, 0x74, 0x14, 0x48, 0x00, 0x00, 0x00, 0x01, // IID772 + 0x62, 0x9c, 0x90, 0x14, 0x81, 0x8c, 0x5a, 0xa8, 0xc6, 0xee, 0xb4, 0x00, 0x00, 0x10, 0x00, // IID773 + 0x62, 0xfc, 0x84, 0x10, 0xc1, 0xa2, 0x8c, 0xc3, 0xef, 0xb9, 0x02, // IID774 + 0x62, 0x94, 0xb4, 0x14, 0xc1, 0xa4, 0x3a, 0xa4, 0x5d, 0x92, 0x48, 0x10, // IID775 + 0x62, 0xfc, 0xac, 0x10, 0xc1, 0xba, 0xbe, 0x3a, 0x5e, 0xa1, 0x08, // IID776 + 0x62, 0xd4, 0x98, 0x1c, 0xc1, 0xbc, 0xb2, 0x64, 0x82, 0x95, 0x5d, 0x08, // IID777 + 0x62, 0xfc, 0xe8, 0x18, 0xc1, 0xac, 0xa1, 0x23, 0xdd, 0x5a, 0x29, 0x10, // IID778 + 0x62, 0xbc, 0xe0, 0x1c, 0xc1, 0xac, 0x66, 0xcb, 0x29, 0x29, 0x78, 0x02, // IID779 + 0x62, 0xfc, 0xe4, 0x10, 0x83, 0xaf, 0x8e, 0xe2, 0x7e, 0xb6, 0x01, // IID780 + 0x62, 0xbc, 0xbc, 0x1c, 0x81, 0xac, 0xb3, 0x66, 0x51, 0xd4, 0xe4, 0x00, 0x00, 0x10, 0x00, // IID781 + 0x62, 0xb4, 0xe4, 0x10, 0x81, 0xb4, 0x11, 0xe9, 0x6e, 0xa6, 0x45, 0x00, 0x00, 0x10, 0x00, // IID782 + 0x62, 0x94, 0x98, 0x14, 0x83, 0xb4, 0x29, 0xec, 0x6c, 0x5e, 0xd7, 0x10, // IID783 + 0x62, 0xf4, 0xbc, 0x18, 0x81, 0xc1, 0x00, 0x00, 0x00, 0x01, // IID784 + 0x62, 0xd4, 0xfc, 0x18, 0x81, 0xc6, 0x00, 0x00, 0x00, 0x01, // IID785 + 0xd5, 0x18, 0x81, 0xc0, 0x00, 0x01, 0x00, 0x00, // IID786 + 0x62, 0xd4, 0xbc, 0x14, 0x81, 0xc1, 0x00, 0x10, 0x00, 0x00, // IID787 + 0x62, 0xfc, 0xfc, 0x1c, 0x81, 0xc2, 0x00, 0x10, 0x00, 0x00, // IID788 + 0x62, 0xd4, 0xbc, 0x1c, 0x83, 0xc0, 0x01, // IID789 + 0x62, 0xfc, 0x84, 0x18, 0x81, 0xe6, 0x00, 0x00, 0x10, 0x00, // IID790 + 0x62, 0xdc, 0xfc, 0x18, 0x81, 0xe2, 0x00, 0x00, 0x10, 0x00, // IID791 + 0x48, 0x81, 0xe2, 0x00, 0x10, 0x00, 0x00, // IID792 + 0x62, 0xfc, 0xec, 0x1c, 0x81, 0xe6, 0x00, 0x00, 0x00, 0x10, // IID793 + 0x62, 0xdc, 0xfc, 0x1c, 0x81, 0xe5, 0x00, 0x00, 0x00, 0x10, // IID794 + 0x62, 0xfc, 0xc4, 0x14, 0x81, 0xe7, 0x00, 0x00, 0x00, 0x01, // IID795 + 0x62, 0x54, 0xfc, 0x08, 0x69, 0xcd, 0x00, 0x00, 0x10, 0x00, // IID796 + 0x62, 0xfc, 0xfc, 0x08, 0x69, 0xc2, 0x00, 0x00, 0x10, 0x00, // IID797 + 0x62, 0xec, 0xfc, 0x08, 0x69, 0xc0, 0x00, 0x00, 0x10, 0x00, // IID798 + 0x62, 0xec, 0xfc, 0x0c, 0x6b, 0xcf, 0x01, // IID799 + 0x62, 0xd4, 0xfc, 0x0c, 0x6b, 0xc4, 0x01, // IID800 + 0x62, 0x54, 0xfc, 0x0c, 0x69, 0xd2, 0x00, 0x00, 0x00, 0x10, // IID801 + 0x62, 0xfc, 0xec, 0x18, 0x81, 0xcb, 0x00, 0x01, 0x00, 0x00, // IID802 + 0x62, 0xd4, 0xfc, 0x18, 0x81, 0xce, 0x00, 0x01, 0x00, 0x00, // IID803 + 0x49, 0x83, 0xcd, 0x01, // IID804 + 0x62, 0xdc, 0xb4, 0x14, 0x81, 0xcd, 0x00, 0x01, 0x00, 0x00, // IID805 + 0x62, 0xf4, 0xfc, 0x1c, 0x81, 0xca, 0x00, 0x01, 0x00, 0x00, // IID806 + 0x62, 0xfc, 0xfc, 0x14, 0x83, 0xc8, 0x10, // IID807 + 0x62, 0xfc, 0x94, 0x18, 0xc1, 0xd3, 0x04, // IID808 + 0x62, 0xd4, 0xfc, 0x18, 0xc1, 0xd4, 0x04, // IID809 + 0x49, 0xc1, 0xd1, 0x04, // IID810 + 0x62, 0xfc, 0x94, 0x18, 0xd1, 0xc0, // IID811 + 0x62, 0xdc, 0xfc, 0x18, 0xd1, 0xc7, // IID812 + 0xd5, 0x19, 0xc1, 0xc6, 0x08, // IID813 + 0x62, 0xfc, 0x8c, 0x14, 0xc1, 0xc4, 0x08, // IID814 + 0x62, 0xdc, 0xfc, 0x1c, 0xc1, 0xc7, 0x08, // IID815 + 0x62, 0xdc, 0x84, 0x14, 0xc1, 0xc7, 0x04, // IID816 + 0x62, 0xd4, 0xcc, 0x10, 0xc1, 0xca, 0x04, // IID817 + 0x62, 0xd4, 0xfc, 0x18, 0xc1, 0xcd, 0x04, // IID818 + 0xd5, 0x19, 0xc1, 0xc8, 0x10, // IID819 + 0x62, 0xfc, 0x94, 0x14, 0xc1, 0xce, 0x10, // IID820 + 0x62, 0xfc, 0xfc, 0x1c, 0xc1, 0xcc, 0x10, // IID821 + 0x62, 0xdc, 0xa4, 0x14, 0xc1, 0xcb, 0x04, // IID822 + 0x62, 0xfc, 0x84, 0x10, 0xc1, 0xe3, 0x02, // IID823 + 0x62, 0xfc, 0xfc, 0x18, 0xc1, 0xe4, 0x02, // IID824 + 0x49, 0xc1, 0xe3, 0x08, // IID825 + 0x62, 0xd4, 0xec, 0x1c, 0xd1, 0xe7, // IID826 + 0x62, 0xd4, 0xfc, 0x1c, 0xd1, 0xe2, // IID827 + 0x62, 0xdc, 0x94, 0x14, 0xc1, 0xe5, 0x04, // IID828 + 0x62, 0xfc, 0xdc, 0x10, 0xd1, 0xf8, // IID829 + 0x62, 0xfc, 0xfc, 0x18, 0xd1, 0xfd, // IID830 + 0xd5, 0x19, 0xc1, 0xfc, 0x08, // IID831 + 0x62, 0xf4, 0x8c, 0x14, 0xc1, 0xf9, 0x04, // IID832 + 0x62, 0xd4, 0xfc, 0x1c, 0xc1, 0xff, 0x04, // IID833 + 0x62, 0xf4, 0xf4, 0x1c, 0xc1, 0xf9, 0x04, // IID834 + 0x62, 0xdc, 0xec, 0x18, 0xc1, 0xe2, 0x04, // IID835 + 0x62, 0xdc, 0xfc, 0x18, 0xc1, 0xe2, 0x04, // IID836 + 0x49, 0xc1, 0xe0, 0x04, // IID837 + 0x62, 0xf4, 0xf4, 0x1c, 0xd1, 0xe1, // IID838 + 0x62, 0xf4, 0xfc, 0x1c, 0xd1, 0xe1, // IID839 + 0x62, 0xd4, 0x94, 0x1c, 0xc1, 0xe5, 0x02, // IID840 + 0x62, 0xdc, 0x8c, 0x18, 0xc1, 0xeb, 0x02, // IID841 + 0x62, 0xd4, 0xfc, 0x18, 0xc1, 0xeb, 0x02, // IID842 + 0x49, 0xc1, 0xe9, 0x10, // IID843 + 0x62, 0xdc, 0xec, 0x1c, 0xc1, 0xef, 0x02, // IID844 + 0x62, 0xd4, 0xfc, 0x1c, 0xc1, 0xee, 0x02, // IID845 + 0x62, 0xd4, 0x9c, 0x1c, 0xc1, 0xec, 0x08, // IID846 + 0x62, 0xdc, 0xac, 0x18, 0x83, 0xec, 0x01, // IID847 + 0x62, 0xd4, 0xfc, 0x18, 0x83, 0xe8, 0x01, // IID848 + 0x48, 0x81, 0xe9, 0x00, 0x00, 0x00, 0x01, // IID849 + 0x62, 0xf4, 0xec, 0x1c, 0x81, 0xeb, 0x00, 0x00, 0x00, 0x01, // IID850 + 0x62, 0xfc, 0xfc, 0x1c, 0x81, 0xea, 0x00, 0x00, 0x00, 0x01, // IID851 + 0x62, 0xdc, 0xa4, 0x14, 0x81, 0xeb, 0x00, 0x00, 0x01, 0x00, // IID852 + 0x62, 0xf4, 0x8c, 0x10, 0x81, 0xf1, 0x00, 0x10, 0x00, 0x00, // IID853 + 0x62, 0xfc, 0xfc, 0x18, 0x81, 0xf5, 0x00, 0x10, 0x00, 0x00, // IID854 + 0x48, 0x81, 0xf1, 0x00, 0x00, 0x00, 0x01, // IID855 + 0x62, 0xd4, 0xd4, 0x14, 0x83, 0xf4, 0x01, // IID856 + 0x62, 0xf4, 0xfc, 0x1c, 0x83, 0xf2, 0x01, // IID857 + 0x62, 0xf4, 0xe4, 0x1c, 0x81, 0xf3, 0x00, 0x00, 0x00, 0x01, // IID858 + 0x62, 0xf4, 0xa4, 0x18, 0x81, 0xca, 0x00, 0x00, 0x01, 0x00, // IID859 + 0x62, 0xd4, 0xfc, 0x18, 0x81, 0xce, 0x00, 0x00, 0x01, 0x00, // IID860 + 0x49, 0x81, 0xce, 0x00, 0x00, 0x04, 0x00, // IID861 + 0x62, 0xdc, 0xb4, 0x10, 0x81, 0xcd, 0x00, 0x00, 0x04, 0x00, // IID862 + 0x62, 0xfc, 0xfc, 0x18, 0x81, 0xcd, 0x00, 0x00, 0x04, 0x00, // IID863 + 0x49, 0x81, 0xcb, 0x00, 0x00, 0x00, 0x01, // IID864 + 0x62, 0xfc, 0x94, 0x10, 0x81, 0xeb, 0x00, 0x00, 0x00, 0x04, // IID865 + 0x62, 0xd4, 0xfc, 0x18, 0x81, 0xeb, 0x00, 0x00, 0x00, 0x04, // IID866 + 0xd5, 0x18, 0x81, 0xea, 0x00, 0x00, 0x00, 0x04, // IID867 + 0x62, 0xfc, 0x9c, 0x14, 0x81, 0xef, 0x00, 0x00, 0x40, 0x00, // IID868 + 0x62, 0xfc, 0xfc, 0x1c, 0x81, 0xed, 0x00, 0x00, 0x40, 0x00, // IID869 + 0x62, 0xfc, 0xfc, 0x14, 0x81, 0xe8, 0x00, 0x00, 0x00, 0x01, // IID870 + 0x62, 0x0c, 0xbc, 0x18, 0x03, 0x8c, 0x42, 0xef, 0x3d, 0x63, 0x10, // IID871 + 0xd5, 0x3c, 0x03, 0xac, 0x42, 0xf8, 0xba, 0xdf, 0x8b, // IID872 + 0x62, 0x44, 0xf4, 0x14, 0x03, 0x94, 0x24, 0xbf, 0x0a, 0xa8, 0x23, // IID873 + 0x62, 0x5c, 0xb0, 0x1c, 0x03, 0x8c, 0x1d, 0xae, 0x61, 0x61, 0xfd, // IID874 + 0x62, 0x24, 0xb0, 0x18, 0x23, 0xa4, 0x89, 0xaa, 0xff, 0x61, 0x42, // IID875 + 0xd5, 0x6e, 0x23, 0x9c, 0x22, 0x3f, 0x36, 0x42, 0xd9, // IID876 + 0x62, 0x7c, 0x8c, 0x1c, 0x23, 0x98, 0xdf, 0x0d, 0xba, 0x63, // IID877 + 0x62, 0x3c, 0xb8, 0x1c, 0x23, 0x84, 0x4e, 0xbc, 0x54, 0x49, 0xbc, // IID878 + 0x62, 0xdc, 0xe4, 0x10, 0x0b, 0x8c, 0x8b, 0x3a, 0x80, 0x97, 0x80, // IID879 + 0xd5, 0x6a, 0x0b, 0x9c, 0x53, 0x16, 0x48, 0x92, 0xb7, // IID880 + 0x62, 0x54, 0x88, 0x14, 0x0b, 0x94, 0xd6, 0x84, 0x48, 0x88, 0x14, // IID881 + 0x62, 0x4c, 0xa4, 0x14, 0x0b, 0x9d, 0x80, 0x71, 0x33, 0x20, // IID882 + 0x62, 0xec, 0xf4, 0x18, 0xaf, 0xac, 0x1d, 0x72, 0x77, 0xfc, 0xcc, // IID883 + 0xd5, 0x9b, 0xaf, 0x94, 0xcc, 0xbf, 0x08, 0x27, 0x85, // IID884 + 0x62, 0x2c, 0xbc, 0x1c, 0xaf, 0xac, 0x21, 0x6a, 0x39, 0x85, 0x6e, // IID885 + 0x62, 0xac, 0xfc, 0x14, 0xaf, 0x84, 0xd3, 0x00, 0x6d, 0xa6, 0xb6, // IID886 + 0x62, 0xc4, 0xd8, 0x10, 0x2b, 0x8c, 0x35, 0x4f, 0x9a, 0x21, 0x1d, // IID887 + 0xd5, 0x7c, 0x2b, 0x8c, 0xed, 0x39, 0x57, 0x97, 0x97, // IID888 + 0x62, 0x64, 0xd8, 0x14, 0x2b, 0x84, 0xa3, 0xa6, 0x9d, 0xc5, 0x32, // IID889 + 0x62, 0x54, 0xb8, 0x1c, 0x2b, 0x84, 0x0c, 0x31, 0xd2, 0x41, 0xd9, // IID890 + 0x62, 0xc4, 0xec, 0x18, 0x33, 0x99, 0x91, 0x3b, 0x90, 0x7d, // IID891 + 0xd5, 0x7f, 0x33, 0xa4, 0x9d, 0x6f, 0x1f, 0x09, 0x53, // IID892 + 0x62, 0xcc, 0xf4, 0x14, 0x33, 0x83, 0x07, 0x92, 0x6e, 0x7c, // IID893 + 0x62, 0x14, 0x80, 0x1c, 0x33, 0xbc, 0xc5, 0xa0, 0x86, 0x37, 0x8a, // IID894 + 0x62, 0xfc, 0xfc, 0x10, 0x03, 0xda, // IID895 + 0xd5, 0x5c, 0x03, 0xc2, // IID896 + 0x4d, 0x03, 0xcf, // IID897 + 0x62, 0x44, 0xe4, 0x14, 0x03, 0xd5, // IID898 + 0x62, 0x6c, 0x9c, 0x14, 0x03, 0xe6, // IID899 + 0x62, 0x7c, 0xcc, 0x14, 0x03, 0xde, // IID900 + 0x62, 0x54, 0xf5, 0x18, 0x66, 0xe5, // IID901 + 0x62, 0x44, 0xfd, 0x08, 0x66, 0xf4, // IID902 + 0x62, 0x7c, 0x9e, 0x10, 0x66, 0xf2, // IID903 + 0x62, 0x6c, 0xfe, 0x08, 0x66, 0xf3, // IID904 + 0x62, 0x54, 0xdc, 0x10, 0x23, 0xf6, // IID905 + 0xd5, 0x58, 0x23, 0xcf, // IID906 + 0xd5, 0x49, 0x23, 0xce, // IID907 + 0x62, 0xc4, 0xe4, 0x14, 0x23, 0xe7, // IID908 + 0x62, 0xd4, 0xe4, 0x1c, 0x23, 0xdd, // IID909 + 0x62, 0x6c, 0xcc, 0x14, 0x23, 0xf6, // IID910 + 0x62, 0x64, 0xf4, 0x10, 0xaf, 0xc1, // IID911 + 0xd5, 0xc9, 0xaf, 0xe8, // IID912 + 0xd5, 0xdc, 0xaf, 0xed, // IID913 + 0x62, 0x7c, 0xa4, 0x14, 0xaf, 0xef, // IID914 + 0x62, 0x44, 0xac, 0x14, 0xaf, 0xd0, // IID915 + 0x62, 0x7c, 0xcc, 0x14, 0xaf, 0xee, // IID916 + 0x62, 0xdc, 0xa4, 0x18, 0x0b, 0xd5, // IID917 + 0xd5, 0x19, 0x0b, 0xd7, // IID918 + 0xd5, 0x1d, 0x0b, 0xd5, // IID919 + 0x62, 0x64, 0xa4, 0x14, 0x0b, 0xe1, // IID920 + 0x62, 0x44, 0xb4, 0x14, 0x0b, 0xc9, // IID921 + 0x62, 0x74, 0xf4, 0x1c, 0x0b, 0xc1, // IID922 + 0x62, 0x7c, 0xf4, 0x18, 0x2b, 0xd0, // IID923 + 0xd5, 0x48, 0x2b, 0xc9, // IID924 + 0x62, 0xcc, 0x94, 0x1c, 0x2b, 0xe8, // IID925 + 0x62, 0x4c, 0x84, 0x14, 0x2b, 0xfc, // IID926 + 0xd5, 0x59, 0x33, 0xfc, // IID927 + 0x4d, 0x33, 0xd3, // IID928 + 0xd5, 0x58, 0x33, 0xda, // IID929 + 0x62, 0x74, 0x84, 0x14, 0x33, 0xca, // IID930 + 0x62, 0x54, 0x94, 0x1c, 0x33, 0xe9, // IID931 + 0x62, 0x74, 0xf4, 0x1c, 0x33, 0xd1, // IID932 + 0x62, 0xcc, 0x9c, 0x18, 0x24, 0xf0, 0x08, // IID933 + 0xd5, 0xdd, 0xa4, 0xc9, 0x08, // IID934 + 0x62, 0x7c, 0xd4, 0x14, 0x24, 0xfc, 0x08, // IID935 + 0x62, 0x7c, 0xd4, 0x14, 0x24, 0xd5, 0x08, // IID936 + 0xd5, 0x9c, 0xac, 0xc2, 0x02, // IID937 + 0xd5, 0xdd, 0xac, 0xea, 0x08, // IID938 + 0x62, 0xcc, 0x94, 0x14, 0x2c, 0xda, 0x02, // IID939 + 0x62, 0xd4, 0x9c, 0x1c, 0x2c, 0xcc, 0x04, // IID940 + 0x62, 0xec, 0xd4, 0x10, 0x40, 0xf7, // IID941 + 0x4d, 0x0f, 0x40, 0xcd, // IID942 + 0x62, 0xcc, 0xf4, 0x18, 0x41, 0xf8, // IID943 + 0xd5, 0xcc, 0x41, 0xe2, // IID944 + 0x62, 0x6c, 0x8c, 0x18, 0x42, 0xff, // IID945 + 0xd5, 0xdc, 0x42, 0xf7, // IID946 + 0x62, 0x6c, 0xac, 0x18, 0x43, 0xee, // IID947 + 0xd5, 0x99, 0x43, 0xda, // IID948 + 0x62, 0xc4, 0xc4, 0x10, 0x44, 0xed, // IID949 + 0xd5, 0x9c, 0x44, 0xd4, // IID950 + 0x62, 0x5c, 0xe4, 0x18, 0x45, 0xcd, // IID951 + 0xd5, 0xd9, 0x45, 0xc6, // IID952 + 0x62, 0xdc, 0x94, 0x18, 0x46, 0xcd, // IID953 + 0xd5, 0xcd, 0x46, 0xfd, // IID954 + 0x62, 0x5c, 0xa4, 0x10, 0x47, 0xce, // IID955 + 0xd5, 0xdc, 0x47, 0xd4, // IID956 + 0x62, 0x7c, 0xbc, 0x18, 0x48, 0xe6, // IID957 + 0xd5, 0xdc, 0x48, 0xf9, // IID958 + 0x62, 0xdc, 0x94, 0x10, 0x49, 0xc9, // IID959 + 0xd5, 0xc9, 0x49, 0xf6, // IID960 + 0x62, 0x44, 0xf4, 0x18, 0x4a, 0xd9, // IID961 + 0xd5, 0xc9, 0x4a, 0xf3, // IID962 + 0x62, 0xcc, 0x8c, 0x18, 0x4b, 0xd8, // IID963 + 0xd5, 0xdc, 0x4b, 0xc1, // IID964 + 0x62, 0xcc, 0xf4, 0x10, 0x4c, 0xde, // IID965 + 0xd5, 0xc9, 0x4c, 0xde, // IID966 + 0x62, 0x5c, 0xb4, 0x10, 0x4d, 0xdd, // IID967 + 0xd5, 0x9d, 0x4d, 0xe2, // IID968 + 0x62, 0xd4, 0xa4, 0x18, 0x4e, 0xda, // IID969 + 0xd5, 0x98, 0x4e, 0xd6, // IID970 + 0x62, 0x7c, 0x8c, 0x18, 0x4f, 0xff, // IID971 + 0xd5, 0x9d, 0x4f, 0xc0, // IID972 + 0x62, 0x04, 0xe4, 0x18, 0x40, 0xbc, 0xc2, 0x20, 0x9f, 0xc0, 0xce, // IID973 + 0xd5, 0xea, 0x40, 0xbc, 0x81, 0x9c, 0x1d, 0xf4, 0x17, // IID974 + 0x62, 0x7c, 0x84, 0x10, 0x41, 0x98, 0x42, 0x89, 0x01, 0x2c, // IID975 + 0xd5, 0xbc, 0x41, 0x9c, 0xe0, 0x55, 0x6a, 0x4b, 0x67, // IID976 + 0x62, 0x54, 0xb4, 0x18, 0x42, 0xac, 0x09, 0xdf, 0x11, 0x4a, 0x39, // IID977 + 0xd5, 0xec, 0x42, 0xb4, 0x72, 0x78, 0xd4, 0xc9, 0x93, // IID978 + 0x62, 0xdc, 0x94, 0x18, 0x43, 0x8c, 0xc8, 0x66, 0x0b, 0x50, 0x46, // IID979 + 0xd5, 0xfe, 0x43, 0x84, 0x4a, 0x7c, 0x3b, 0x28, 0x53, // IID980 + 0x62, 0x04, 0xc4, 0x10, 0x44, 0x8c, 0x0f, 0xe2, 0xfc, 0xfc, 0xa0, // IID981 + 0xd5, 0xfd, 0x44, 0x8c, 0x44, 0xec, 0x0a, 0x31, 0xac, // IID982 + 0x62, 0x0c, 0xe0, 0x18, 0x45, 0x8c, 0x88, 0x79, 0x53, 0x35, 0x99, // IID983 + 0xd5, 0xfb, 0x45, 0x84, 0xf3, 0x5d, 0x45, 0x7f, 0x79, // IID984 + 0x62, 0x6c, 0xb0, 0x10, 0x46, 0xb4, 0x52, 0xcd, 0xaa, 0x9d, 0x1c, // IID985 + 0xd5, 0xea, 0x46, 0xb4, 0x49, 0x57, 0x05, 0x34, 0xc2, // IID986 + 0x62, 0x4c, 0xbc, 0x10, 0x47, 0x91, 0xb5, 0x60, 0x70, 0x74, // IID987 + 0xd5, 0xbd, 0x47, 0x84, 0xe0, 0xf6, 0x85, 0xd2, 0x47, // IID988 + 0x62, 0x84, 0x9c, 0x18, 0x48, 0x84, 0x95, 0x14, 0xb2, 0xe5, 0x34, // IID989 + 0xd5, 0xa9, 0x48, 0x94, 0x1f, 0x4f, 0xc7, 0xae, 0xbf, // IID990 + 0x62, 0xa4, 0xec, 0x10, 0x49, 0xac, 0xab, 0x97, 0x91, 0xb1, 0x51, // IID991 + 0xd5, 0xef, 0x49, 0x84, 0xfb, 0x0a, 0x52, 0x01, 0x3e, // IID992 + 0x62, 0x04, 0x90, 0x10, 0x4a, 0x94, 0xca, 0x8e, 0xc7, 0x83, 0xa0, // IID993 + 0xd5, 0x9e, 0x4a, 0x9c, 0xd6, 0xad, 0xeb, 0x8c, 0x97, // IID994 + 0x62, 0x14, 0xd8, 0x10, 0x4b, 0xbc, 0x09, 0xaa, 0xed, 0x37, 0x4a, // IID995 + 0xd5, 0xed, 0x4b, 0xbc, 0x21, 0x86, 0x9f, 0x99, 0x4f, // IID996 + 0x62, 0x84, 0xe8, 0x10, 0x4c, 0xbc, 0x19, 0xe3, 0xbb, 0xef, 0xcb, // IID997 + 0xd5, 0xdb, 0x4c, 0x84, 0xd0, 0xee, 0x66, 0xed, 0x52, // IID998 + 0x62, 0xe4, 0xa4, 0x18, 0x4d, 0x91, 0x63, 0x91, 0xe0, 0x1d, // IID999 + 0xd5, 0xbd, 0x4d, 0xb4, 0x78, 0xda, 0xb4, 0xf3, 0x5d, // IID1000 + 0x62, 0x5c, 0x80, 0x18, 0x4e, 0xb4, 0x66, 0x76, 0xb9, 0x9a, 0x5c, // IID1001 + 0xd5, 0xfe, 0x4e, 0x94, 0x9a, 0xd7, 0x3c, 0x27, 0xff, // IID1002 + 0x62, 0x5c, 0x90, 0x10, 0x4f, 0x8c, 0xe6, 0x73, 0x30, 0x56, 0xc8, // IID1003 + 0xd5, 0xc9, 0x4f, 0xa4, 0x58, 0xef, 0x7d, 0xdc, 0x1b, // IID1004 #endif // _LP64 }; @@ -2196,19 +2364,19 @@ 15, // IID265 15, // IID266 11, // IID267 - 11, // IID268 + 9, // IID268 11, // IID269 11, // IID270 11, // IID271 - 11, // IID272 + 9, // IID272 11, // IID273 10, // IID274 11, // IID275 - 11, // IID276 + 9, // IID276 11, // IID277 11, // IID278 11, // IID279 - 11, // IID280 + 9, // IID280 10, // IID281 11, // IID282 10, // IID283 @@ -2216,645 +2384,729 @@ 11, // IID285 10, // IID286 11, // IID287 - 10, // IID288 + 8, // IID288 11, // IID289 11, // IID290 - 10, // IID291 - 10, // IID292 - 8, // IID293 - 7, // IID294 + 11, // IID291 + 9, // IID292 + 11, // IID293 + 11, // IID294 7, // IID295 - 10, // IID296 - 10, // IID297 + 7, // IID296 + 8, // IID297 10, // IID298 - 8, // IID299 + 10, // IID299 10, // IID300 - 10, // IID301 + 4, // IID301 7, // IID302 - 10, // IID303 -#endif // _LP64 - 10, // IID304 -#ifdef _LP64 - 10, // IID305 - 10, // IID306 + 5, // IID303 + 7, // IID304 + 7, // IID305 + 7, // IID306 10, // IID307 - 7, // IID308 + 10, // IID308 10, // IID309 - 10, // IID310 - 8, // IID311 - 7, // IID312 + 7, // IID310 + 7, // IID311 + 10, // IID312 7, // IID313 - 10, // IID314 - 6, // IID315 - 6, // IID316 - 4, // IID317 - 7, // IID318 -#endif // _LP64 - 7, // IID319 -#ifdef _LP64 - 5, // IID320 - 7, // IID321 + 7, // IID314 + 8, // IID315 + 7, // IID316 + 7, // IID317 +#endif // _LP64 + 10, // IID318 +#ifdef _LP64 + 5, // IID319 + 7, // IID320 + 5, // IID321 7, // IID322 7, // IID323 - 7, // IID324 -#endif // _LP64 + 4, // IID324 7, // IID325 -#ifdef _LP64 - 4, // IID326 - 7, // IID327 + 7, // IID326 + 6, // IID327 7, // IID328 7, // IID329 - 7, // IID330 + 5, // IID330 7, // IID331 - 5, // IID332 + 7, // IID332 7, // IID333 7, // IID334 7, // IID335 - 7, // IID336 + 5, // IID336 7, // IID337 - 4, // IID338 + 7, // IID338 7, // IID339 - 7, // IID340 - 7, // IID341 - 7, // IID342 + 6, // IID340 + 6, // IID341 + 5, // IID342 7, // IID343 - 4, // IID344 + 7, // IID344 7, // IID345 7, // IID346 7, // IID347 - 7, // IID348 + 4, // IID348 7, // IID349 - 5, // IID350 + 7, // IID350 6, // IID351 - 6, // IID352 + 7, // IID352 7, // IID353 - 10, // IID354 - 10, // IID355 - 8, // IID356 - 10, // IID357 + 5, // IID354 + 7, // IID355 + 7, // IID356 + 7, // IID357 10, // IID358 10, // IID359 - 10, // IID360 + 8, // IID360 10, // IID361 -#endif // _LP64 - 6, // IID362 -#ifdef _LP64 - 10, // IID363 + 10, // IID362 + 7, // IID363 10, // IID364 10, // IID365 - 10, // IID366 - 10, // IID367 - 8, // IID368 - 10, // IID369 + 5, // IID366 + 7, // IID367 +#endif // _LP64 + 7, // IID368 +#ifdef _LP64 + 7, // IID369 10, // IID370 10, // IID371 - 10, // IID372 + 8, // IID372 10, // IID373 - 11, // IID374 - 11, // IID375 + 10, // IID374 + 10, // IID375 11, // IID376 - 11, // IID377 + 9, // IID377 11, // IID378 10, // IID379 11, // IID380 - 11, // IID381 + 9, // IID381 11, // IID382 11, // IID383 11, // IID384 - 11, // IID385 + 9, // IID385 11, // IID386 11, // IID387 - 6, // IID388 - 4, // IID389 - 6, // IID390 - 6, // IID391 - 6, // IID392 - 3, // IID393 - 6, // IID394 - 6, // IID395 - 6, // IID396 - 4, // IID397 - 6, // IID398 - 6, // IID399 - 6, // IID400 - 5, // IID401 - 6, // IID402 - 6, // IID403 - 6, // IID404 - 4, // IID405 - 6, // IID406 - 6, // IID407 + 10, // IID388 + 8, // IID389 + 11, // IID390 + 11, // IID391 + 11, // IID392 + 9, // IID393 + 10, // IID394 + 11, // IID395 + 11, // IID396 + 9, // IID397 + 11, // IID398 + 11, // IID399 + 11, // IID400 + 9, // IID401 + 11, // IID402 + 11, // IID403 + 11, // IID404 + 10, // IID405 + 10, // IID406 + 11, // IID407 6, // IID408 4, // IID409 - 6, // IID410 + 4, // IID410 6, // IID411 6, // IID412 - 4, // IID413 + 6, // IID413 6, // IID414 - 6, // IID415 - 6, // IID416 - 4, // IID417 + 4, // IID415 + 3, // IID416 + 6, // IID417 6, // IID418 6, // IID419 6, // IID420 4, // IID421 - 6, // IID422 + 4, // IID422 6, // IID423 - 7, // IID424 - 5, // IID425 - 7, // IID426 - 7, // IID427 - 7, // IID428 - 5, // IID429 - 7, // IID430 - 7, // IID431 + 6, // IID424 + 6, // IID425 + 6, // IID426 + 5, // IID427 + 4, // IID428 + 6, // IID429 + 6, // IID430 +#endif // _LP64 + 6, // IID431 +#ifdef _LP64 6, // IID432 4, // IID433 - 6, // IID434 - 4, // IID435 + 4, // IID434 + 6, // IID435 6, // IID436 - 4, // IID437 + 6, // IID437 6, // IID438 4, // IID439 6, // IID440 - 4, // IID441 + 6, // IID441 6, // IID442 4, // IID443 6, // IID444 - 4, // IID445 + 6, // IID445 6, // IID446 - 4, // IID447 + 3, // IID447 6, // IID448 - 4, // IID449 + 6, // IID449 6, // IID450 4, // IID451 4, // IID452 - 4, // IID453 + 6, // IID453 6, // IID454 - 4, // IID455 - 6, // IID456 - 4, // IID457 - 6, // IID458 - 4, // IID459 - 6, // IID460 - 4, // IID461 - 6, // IID462 - 4, // IID463 - 10, // IID464 - 11, // IID465 - 11, // IID466 - 11, // IID467 - 10, // IID468 - 11, // IID469 - 11, // IID470 - 11, // IID471 - 11, // IID472 - 11, // IID473 - 11, // IID474 - 11, // IID475 - 11, // IID476 - 11, // IID477 - 11, // IID478 - 11, // IID479 - 4, // IID480 + 6, // IID455 + 7, // IID456 + 5, // IID457 + 7, // IID458 + 7, // IID459 + 7, // IID460 + 5, // IID461 + 7, // IID462 + 7, // IID463 + 6, // IID464 + 4, // IID465 + 6, // IID466 + 4, // IID467 + 6, // IID468 + 4, // IID469 + 6, // IID470 + 4, // IID471 + 6, // IID472 + 4, // IID473 + 6, // IID474 + 4, // IID475 + 6, // IID476 + 4, // IID477 + 6, // IID478 + 4, // IID479 + 6, // IID480 4, // IID481 - 4, // IID482 - 5, // IID483 - 4, // IID484 + 6, // IID482 + 4, // IID483 + 6, // IID484 4, // IID485 - 5, // IID486 - 5, // IID487 - 4, // IID488 + 6, // IID486 + 4, // IID487 + 6, // IID488 4, // IID489 - 4, // IID490 - 3, // IID491 - 4, // IID492 + 6, // IID490 + 4, // IID491 + 6, // IID492 4, // IID493 - 4, // IID494 + 6, // IID494 4, // IID495 - 4, // IID496 - 4, // IID497 - 9, // IID498 + 11, // IID496 + 9, // IID497 + 11, // IID498 9, // IID499 - 9, // IID500 + 11, // IID500 9, // IID501 - 9, // IID502 - 9, // IID503 - 9, // IID504 + 11, // IID502 + 8, // IID503 + 11, // IID504 9, // IID505 - 12, // IID506 - 12, // IID507 + 11, // IID506 + 8, // IID507 11, // IID508 - 8, // IID509 - 9, // IID510 - 13, // IID511 - 10, // IID512 - 12, // IID513 - 10, // IID514 - 10, // IID515 - 13, // IID516 - 12, // IID517 - 9, // IID518 + 9, // IID509 + 10, // IID510 + 9, // IID511 + 11, // IID512 + 9, // IID513 + 9, // IID514 + 9, // IID515 + 11, // IID516 + 9, // IID517 + 11, // IID518 9, // IID519 - 9, // IID520 + 11, // IID520 9, // IID521 - 9, // IID522 - 7, // IID523 - 9, // IID524 + 10, // IID522 + 9, // IID523 + 10, // IID524 9, // IID525 - 9, // IID526 + 11, // IID526 9, // IID527 - 10, // IID528 - 9, // IID529 - 9, // IID530 - 7, // IID531 - 10, // IID532 - 9, // IID533 - 9, // IID534 + 4, // IID528 + 3, // IID529 + 4, // IID530 + 5, // IID531 + 3, // IID532 + 4, // IID533 + 5, // IID534 5, // IID535 - 5, // IID536 - 8, // IID537 - 8, // IID538 + 4, // IID536 + 3, // IID537 + 4, // IID538 4, // IID539 4, // IID540 - 5, // IID541 - 5, // IID542 + 4, // IID541 + 4, // IID542 4, // IID543 4, // IID544 - 7, // IID545 - 4, // IID546 - 3, // IID547 - 4, // IID548 + 4, // IID545 + 8, // IID546 + 9, // IID547 + 9, // IID548 8, // IID549 8, // IID550 - 10, // IID551 - 5, // IID552 - 8, // IID553 - 8, // IID554 - 7, // IID555 - 9, // IID556 - 8, // IID557 - 9, // IID558 - 9, // IID559 - 9, // IID560 - 9, // IID561 - 8, // IID562 - 9, // IID563 - 9, // IID564 - 9, // IID565 + 9, // IID551 + 9, // IID552 + 9, // IID553 + 13, // IID554 + 13, // IID555 + 11, // IID556 + 10, // IID557 + 10, // IID558 + 13, // IID559 + 10, // IID560 + 13, // IID561 + 10, // IID562 + 13, // IID563 + 11, // IID564 + 13, // IID565 9, // IID566 9, // IID567 9, // IID568 9, // IID569 9, // IID570 9, // IID571 - 4, // IID572 - 4, // IID573 - 4, // IID574 - 3, // IID575 - 3, // IID576 - 4, // IID577 - 4, // IID578 - 3, // IID579 - 4, // IID580 - 3, // IID581 - 4, // IID582 - 4, // IID583 - 4, // IID584 - 3, // IID585 - 3, // IID586 - 3, // IID587 + 9, // IID572 + 9, // IID573 + 8, // IID574 + 9, // IID575 + 10, // IID576 + 9, // IID577 + 9, // IID578 + 9, // IID579 + 10, // IID580 + 9, // IID581 + 9, // IID582 + 8, // IID583 + 5, // IID584 + 8, // IID585 + 7, // IID586 + 4, // IID587 3, // IID588 - 9, // IID589 - 9, // IID590 - 9, // IID591 - 9, // IID592 - 9, // IID593 - 9, // IID594 - 9, // IID595 - 9, // IID596 - 13, // IID597 + 5, // IID589 + 4, // IID590 + 4, // IID591 + 5, // IID592 + 7, // IID593 + 5, // IID594 + 5, // IID595 + 7, // IID596 + 7, // IID597 8, // IID598 - 5, // IID599 + 11, // IID599 5, // IID600 - 6, // IID601 - 6, // IID602 - 6, // IID603 - 6, // IID604 + 8, // IID601 + 8, // IID602 + 8, // IID603 + 9, // IID604 9, // IID605 9, // IID606 9, // IID607 9, // IID608 - 4, // IID609 - 4, // IID610 - 4, // IID611 - 4, // IID612 + 8, // IID609 + 9, // IID610 + 9, // IID611 + 9, // IID612 9, // IID613 - 6, // IID614 - 6, // IID615 - 6, // IID616 - 6, // IID617 - 6, // IID618 - 6, // IID619 - 6, // IID620 - 6, // IID621 - 11, // IID622 - 11, // IID623 - 6, // IID624 - 4, // IID625 - 6, // IID626 - 6, // IID627 - 6, // IID628 - 6, // IID629 - 6, // IID630 - 6, // IID631 - 6, // IID632 + 9, // IID614 + 9, // IID615 + 9, // IID616 + 8, // IID617 + 9, // IID618 + 9, // IID619 + 4, // IID620 + 3, // IID621 + 4, // IID622 + 3, // IID623 + 4, // IID624 + 3, // IID625 + 3, // IID626 + 4, // IID627 + 4, // IID628 + 3, // IID629 + 4, // IID630 + 4, // IID631 + 4, // IID632 4, // IID633 - 6, // IID634 - 6, // IID635 - 6, // IID636 - 4, // IID637 - 6, // IID638 - 6, // IID639 - 6, // IID640 - 6, // IID641 - 6, // IID642 - 4, // IID643 - 6, // IID644 - 6, // IID645 - 6, // IID646 - 4, // IID647 - 6, // IID648 + 3, // IID634 + 3, // IID635 + 3, // IID636 + 9, // IID637 + 8, // IID638 + 9, // IID639 + 8, // IID640 + 9, // IID641 + 8, // IID642 + 7, // IID643 + 9, // IID644 + 13, // IID645 + 8, // IID646 + 5, // IID647 + 5, // IID648 6, // IID649 6, // IID650 - 3, // IID651 + 6, // IID651 6, // IID652 - 6, // IID653 - 6, // IID654 - 3, // IID655 - 6, // IID656 - 6, // IID657 - 6, // IID658 - 3, // IID659 - 6, // IID660 - 6, // IID661 - 4, // IID662 - 4, // IID663 + 9, // IID653 + 9, // IID654 + 8, // IID655 + 9, // IID656 + 4, // IID657 + 4, // IID658 + 4, // IID659 + 4, // IID660 + 9, // IID661 + 6, // IID662 + 6, // IID663 6, // IID664 6, // IID665 6, // IID666 - 3, // IID667 + 6, // IID667 6, // IID668 6, // IID669 - 6, // IID670 - 4, // IID671 + 11, // IID670 + 11, // IID671 6, // IID672 - 6, // IID673 + 4, // IID673 6, // IID674 6, // IID675 6, // IID676 6, // IID677 - 10, // IID678 - 10, // IID679 - 11, // IID680 - 11, // IID681 - 11, // IID682 - 11, // IID683 - 11, // IID684 - 10, // IID685 - 10, // IID686 - 11, // IID687 - 11, // IID688 - 11, // IID689 - 11, // IID690 - 11, // IID691 - 11, // IID692 - 11, // IID693 - 11, // IID694 - 10, // IID695 - 11, // IID696 - 11, // IID697 - 10, // IID698 - 11, // IID699 - 11, // IID700 - 10, // IID701 - 11, // IID702 - 11, // IID703 - 11, // IID704 - 10, // IID705 - 11, // IID706 - 11, // IID707 - 11, // IID708 - 11, // IID709 - 11, // IID710 - 11, // IID711 - 11, // IID712 - 11, // IID713 - 10, // IID714 - 11, // IID715 - 11, // IID716 - 10, // IID717 - 15, // IID718 - 12, // IID719 - 12, // IID720 - 15, // IID721 - 15, // IID722 - 12, // IID723 - 12, // IID724 - 15, // IID725 - 12, // IID726 - 12, // IID727 - 12, // IID728 - 11, // IID729 - 12, // IID730 - 12, // IID731 - 14, // IID732 - 15, // IID733 - 15, // IID734 - 12, // IID735 - 7, // IID736 - 7, // IID737 - 8, // IID738 - 10, // IID739 - 10, // IID740 - 10, // IID741 - 10, // IID742 - 10, // IID743 - 8, // IID744 - 10, // IID745 - 10, // IID746 - 10, // IID747 - 10, // IID748 - 10, // IID749 - 10, // IID750 - 10, // IID751 - 10, // IID752 - 10, // IID753 - 10, // IID754 - 10, // IID755 - 8, // IID756 - 10, // IID757 - 10, // IID758 + 6, // IID678 + 6, // IID679 + 6, // IID680 + 4, // IID681 + 6, // IID682 + 6, // IID683 + 6, // IID684 + 4, // IID685 + 6, // IID686 + 6, // IID687 + 6, // IID688 + 6, // IID689 + 6, // IID690 + 4, // IID691 + 6, // IID692 + 6, // IID693 + 6, // IID694 + 3, // IID695 + 6, // IID696 + 6, // IID697 + 6, // IID698 + 4, // IID699 + 6, // IID700 + 6, // IID701 + 6, // IID702 + 4, // IID703 + 6, // IID704 + 6, // IID705 + 6, // IID706 + 3, // IID707 + 6, // IID708 + 6, // IID709 + 6, // IID710 + 4, // IID711 + 6, // IID712 + 6, // IID713 + 6, // IID714 + 3, // IID715 + 6, // IID716 + 6, // IID717 + 6, // IID718 + 3, // IID719 + 6, // IID720 + 6, // IID721 + 6, // IID722 + 6, // IID723 + 6, // IID724 + 6, // IID725 + 11, // IID726 + 11, // IID727 + 11, // IID728 + 10, // IID729 + 11, // IID730 + 11, // IID731 + 11, // IID732 + 10, // IID733 + 11, // IID734 + 11, // IID735 + 11, // IID736 + 11, // IID737 + 11, // IID738 + 11, // IID739 + 11, // IID740 + 11, // IID741 + 11, // IID742 + 11, // IID743 + 11, // IID744 + 11, // IID745 + 11, // IID746 + 8, // IID747 + 11, // IID748 + 11, // IID749 + 11, // IID750 + 9, // IID751 + 11, // IID752 + 11, // IID753 + 11, // IID754 + 9, // IID755 + 11, // IID756 + 11, // IID757 + 11, // IID758 10, // IID759 - 7, // IID760 - 7, // IID761 - 4, // IID762 - 7, // IID763 - 7, // IID764 - 4, // IID765 - 6, // IID766 - 6, // IID767 - 7, // IID768 - 7, // IID769 - 7, // IID770 - 5, // IID771 - 6, // IID772 - 6, // IID773 - 6, // IID774 - 7, // IID775 - 7, // IID776 - 5, // IID777 - 7, // IID778 - 7, // IID779 - 6, // IID780 - 7, // IID781 - 7, // IID782 - 4, // IID783 - 6, // IID784 - 6, // IID785 - 7, // IID786 - 7, // IID787 - 7, // IID788 - 4, // IID789 - 7, // IID790 - 7, // IID791 + 11, // IID760 + 11, // IID761 + 11, // IID762 + 9, // IID763 + 11, // IID764 + 11, // IID765 + 14, // IID766 + 15, // IID767 + 12, // IID768 + 12, // IID769 + 15, // IID770 + 15, // IID771 + 15, // IID772 + 15, // IID773 + 11, // IID774 + 12, // IID775 + 11, // IID776 + 12, // IID777 + 12, // IID778 + 12, // IID779 + 11, // IID780 + 15, // IID781 + 15, // IID782 + 12, // IID783 + 10, // IID784 + 10, // IID785 + 8, // IID786 + 10, // IID787 + 10, // IID788 + 7, // IID789 + 10, // IID790 + 10, // IID791 7, // IID792 - 7, // IID793 - 7, // IID794 - 4, // IID795 - 7, // IID796 - 7, // IID797 - 6, // IID798 - 10, // IID799 - 10, // IID800 - 5, // IID801 - 7, // IID802 - 7, // IID803 - 10, // IID804 + 10, // IID793 + 10, // IID794 + 10, // IID795 + 10, // IID796 + 10, // IID797 + 10, // IID798 + 7, // IID799 + 7, // IID800 + 10, // IID801 + 10, // IID802 + 10, // IID803 + 4, // IID804 10, // IID805 10, // IID806 - 8, // IID807 - 10, // IID808 - 10, // IID809 - 10, // IID810 - 7, // IID811 - 10, // IID812 - 8, // IID813 - 10, // IID814 - 10, // IID815 - 8, // IID816 - 10, // IID817 - 10, // IID818 - 8, // IID819 - 10, // IID820 - 10, // IID821 - 10, // IID822 - 11, // IID823 - 11, // IID824 - 10, // IID825 - 11, // IID826 - 11, // IID827 - 11, // IID828 - 11, // IID829 - 11, // IID830 - 10, // IID831 - 11, // IID832 - 11, // IID833 - 10, // IID834 - 6, // IID835 - 3, // IID836 - 6, // IID837 + 7, // IID807 + 7, // IID808 + 7, // IID809 + 4, // IID810 + 6, // IID811 + 6, // IID812 + 5, // IID813 + 7, // IID814 + 7, // IID815 + 7, // IID816 + 7, // IID817 + 7, // IID818 + 5, // IID819 + 7, // IID820 + 7, // IID821 + 7, // IID822 + 7, // IID823 + 7, // IID824 + 4, // IID825 + 6, // IID826 + 6, // IID827 + 7, // IID828 + 6, // IID829 + 6, // IID830 + 5, // IID831 + 7, // IID832 + 7, // IID833 + 7, // IID834 + 7, // IID835 + 7, // IID836 + 4, // IID837 6, // IID838 6, // IID839 - 6, // IID840 - 6, // IID841 - 6, // IID842 - 6, // IID843 - 4, // IID844 - 6, // IID845 - 6, // IID846 - 6, // IID847 - 4, // IID848 - 6, // IID849 - 6, // IID850 - 6, // IID851 - 3, // IID852 - 6, // IID853 - 6, // IID854 - 6, // IID855 - 3, // IID856 - 6, // IID857 - 6, // IID858 - 6, // IID859 - 4, // IID860 - 6, // IID861 - 6, // IID862 - 7, // IID863 - 5, // IID864 - 7, // IID865 - 7, // IID866 - 7, // IID867 - 5, // IID868 - 7, // IID869 - 7, // IID870 - 6, // IID871 - 4, // IID872 - 6, // IID873 - 4, // IID874 - 6, // IID875 - 4, // IID876 - 6, // IID877 - 4, // IID878 - 6, // IID879 - 4, // IID880 - 6, // IID881 - 4, // IID882 - 6, // IID883 - 4, // IID884 - 6, // IID885 - 4, // IID886 - 6, // IID887 - 4, // IID888 - 6, // IID889 - 4, // IID890 - 6, // IID891 - 4, // IID892 - 6, // IID893 - 4, // IID894 + 7, // IID840 + 7, // IID841 + 7, // IID842 + 4, // IID843 + 7, // IID844 + 7, // IID845 + 7, // IID846 + 7, // IID847 + 7, // IID848 + 7, // IID849 + 10, // IID850 + 10, // IID851 + 10, // IID852 + 10, // IID853 + 10, // IID854 + 7, // IID855 + 7, // IID856 + 7, // IID857 + 10, // IID858 + 10, // IID859 + 10, // IID860 + 7, // IID861 + 10, // IID862 + 10, // IID863 + 7, // IID864 + 10, // IID865 + 10, // IID866 + 8, // IID867 + 10, // IID868 + 10, // IID869 + 10, // IID870 + 11, // IID871 + 9, // IID872 + 11, // IID873 + 11, // IID874 + 11, // IID875 + 9, // IID876 + 10, // IID877 + 11, // IID878 + 11, // IID879 + 9, // IID880 + 11, // IID881 + 10, // IID882 + 11, // IID883 + 9, // IID884 + 11, // IID885 + 11, // IID886 + 11, // IID887 + 9, // IID888 + 11, // IID889 + 11, // IID890 + 10, // IID891 + 9, // IID892 + 10, // IID893 + 11, // IID894 6, // IID895 4, // IID896 - 6, // IID897 - 4, // IID898 + 3, // IID897 + 6, // IID898 6, // IID899 - 4, // IID900 + 6, // IID900 6, // IID901 - 4, // IID902 - 11, // IID903 - 11, // IID904 - 11, // IID905 - 10, // IID906 - 11, // IID907 - 9, // IID908 - 11, // IID909 - 11, // IID910 - 11, // IID911 - 10, // IID912 - 11, // IID913 - 11, // IID914 - 11, // IID915 - 11, // IID916 - 11, // IID917 - 11, // IID918 + 6, // IID902 + 6, // IID903 + 6, // IID904 + 6, // IID905 + 4, // IID906 + 4, // IID907 + 6, // IID908 + 6, // IID909 + 6, // IID910 + 6, // IID911 + 4, // IID912 + 4, // IID913 + 6, // IID914 + 6, // IID915 + 6, // IID916 + 6, // IID917 + 4, // IID918 + 4, // IID919 + 6, // IID920 + 6, // IID921 + 6, // IID922 + 6, // IID923 + 4, // IID924 + 6, // IID925 + 6, // IID926 + 4, // IID927 + 3, // IID928 + 4, // IID929 + 6, // IID930 + 6, // IID931 + 6, // IID932 + 7, // IID933 + 5, // IID934 + 7, // IID935 + 7, // IID936 + 5, // IID937 + 5, // IID938 + 7, // IID939 + 7, // IID940 + 6, // IID941 + 4, // IID942 + 6, // IID943 + 4, // IID944 + 6, // IID945 + 4, // IID946 + 6, // IID947 + 4, // IID948 + 6, // IID949 + 4, // IID950 + 6, // IID951 + 4, // IID952 + 6, // IID953 + 4, // IID954 + 6, // IID955 + 4, // IID956 + 6, // IID957 + 4, // IID958 + 6, // IID959 + 4, // IID960 + 6, // IID961 + 4, // IID962 + 6, // IID963 + 4, // IID964 + 6, // IID965 + 4, // IID966 + 6, // IID967 + 4, // IID968 + 6, // IID969 + 4, // IID970 + 6, // IID971 + 4, // IID972 + 11, // IID973 + 9, // IID974 + 10, // IID975 + 9, // IID976 + 11, // IID977 + 9, // IID978 + 11, // IID979 + 9, // IID980 + 11, // IID981 + 9, // IID982 + 11, // IID983 + 9, // IID984 + 11, // IID985 + 9, // IID986 + 10, // IID987 + 9, // IID988 + 11, // IID989 + 9, // IID990 + 11, // IID991 + 9, // IID992 + 11, // IID993 + 9, // IID994 + 11, // IID995 + 9, // IID996 + 11, // IID997 + 9, // IID998 + 10, // IID999 + 9, // IID1000 + 11, // IID1001 + 9, // IID1002 + 11, // IID1003 + 9, // IID1004 #endif // _LP64 }; @@ -3152,662 +3404,746 @@ "__ eaddl(r28, Address(r24, rcx, (Address::ScaleFactor)3, -0x6053edc2), r28, false);", // IID268 "__ eaddl(r17, Address(r18, r24, (Address::ScaleFactor)3, -0x1bf71f78), r29, true);", // IID269 "__ eaddl(rcx, Address(r15, r28, (Address::ScaleFactor)1, +0x15b8216), rcx, true);", // IID270 - "__ eorl(r30, Address(rbx, rdx, (Address::ScaleFactor)3, -0x463540b4), r28, false);", // IID271 - "__ eorl(r18, Address(r28, r10, (Address::ScaleFactor)3, +0x3523a73b), r18, false);", // IID272 - "__ eorl(r9, Address(r15, r15, (Address::ScaleFactor)1, -0x2a0bdd56), r21, true);", // IID273 - "__ eorl(r16, Address(r23, -0x165064ff), r16, true);", // IID274 - "__ eorb(r28, Address(r30, r11, (Address::ScaleFactor)0, +0x17281e3a), r20, false);", // IID275 - "__ eorb(rdx, Address(rbx, r31, (Address::ScaleFactor)2, +0x2477b5bb), rdx, false);", // IID276 - "__ eorb(r16, Address(r11, rcx, (Address::ScaleFactor)1, -0x3175d1af), r24, true);", // IID277 - "__ eorb(rbx, Address(r11, r20, (Address::ScaleFactor)3, -0x22d67bd3), rbx, true);", // IID278 - "__ esubl(r26, Address(r27, r30, (Address::ScaleFactor)1, -0x3d9bce2e), rdx, false);", // IID279 - "__ esubl(r31, Address(r22, r29, (Address::ScaleFactor)1, +0x14218519), r31, false);", // IID280 - "__ esubl(r21, Address(r9, -0x1050127a), r13, true);", // IID281 - "__ esubl(r31, Address(r9, r8, (Address::ScaleFactor)0, -0xae18961), r31, true);", // IID282 - "__ exorl(r15, Address(r18, +0x5c2bbce5), r12, false);", // IID283 - "__ exorl(r27, Address(r25, r23, (Address::ScaleFactor)0, +0x5c6078b3), r27, false);", // IID284 - "__ exorl(r18, Address(r8, rdx, (Address::ScaleFactor)3, -0x9ed3881), r14, true);", // IID285 - "__ exorl(r9, Address(r15, +0x775acdad), r9, true);", // IID286 - "__ exorb(r21, Address(r18, r26, (Address::ScaleFactor)1, +0x2fe31fd5), r23, false);", // IID287 - "__ exorb(r10, Address(r27, +0xa3150de), r10, false);", // IID288 - "__ exorb(r18, Address(r22, r30, (Address::ScaleFactor)3, +0x1ad4e897), r24, true);", // IID289 - "__ exorb(r8, Address(r16, r20, (Address::ScaleFactor)0, +0x626eae82), r8, true);", // IID290 - "__ eaddl(r21, r15, 1048576, false);", // IID291 - "__ eaddl(rax, r18, 1048576, false);", // IID292 - "__ eaddl(r18, r18, 256, false);", // IID293 - "__ eaddl(r13, r19, 16, true);", // IID294 - "__ eaddl(rax, r23, 16, true);", // IID295 - "__ eaddl(r25, r25, 16777216, true);", // IID296 - "__ eandl(r29, r18, 1048576, false);", // IID297 - "__ eandl(rax, r14, 1048576, false);", // IID298 - "__ eandl(r19, r19, 65536, false);", // IID299 - "__ eandl(r27, r25, 1048576, true);", // IID300 - "__ eandl(rax, r20, 1048576, true);", // IID301 - "__ eandl(r28, r28, 16, true);", // IID302 - "__ eimull(r31, r22, 4096, false);", // IID303 -#endif // _LP64 - "__ eimull(rax, rbx, 4096, false);", // IID304 -#ifdef _LP64 - "__ eimull(r24, r24, 1048576, false);", // IID305 - "__ eimull(r21, r16, 65536, true);", // IID306 - "__ eimull(rax, r24, 65536, true);", // IID307 - "__ eimull(r13, r13, 16, true);", // IID308 - "__ eorl(r29, r8, 16777216, false);", // IID309 - "__ eorl(rax, r12, 16777216, false);", // IID310 - "__ eorl(r30, r30, 4096, false);", // IID311 - "__ eorl(r24, rdx, 16, true);", // IID312 - "__ eorl(rax, r8, 16, true);", // IID313 - "__ eorl(r13, r13, 4096, true);", // IID314 - "__ ercll(r25, r13, 1);", // IID315 - "__ ercll(rax, r18, 1);", // IID316 - "__ ercll(r9, r9, 16);", // IID317 - "__ eroll(r26, r25, 8, false);", // IID318 -#endif // _LP64 - "__ eroll(rax, rdx, 8, false);", // IID319 -#ifdef _LP64 - "__ eroll(r24, r24, 16, false);", // IID320 - "__ eroll(r24, rcx, 8, true);", // IID321 - "__ eroll(rax, r30, 8, true);", // IID322 - "__ eroll(r28, r28, 16, true);", // IID323 - "__ erorl(r17, r28, 4, false);", // IID324 -#endif // _LP64 - "__ erorl(rax, rdx, 4, false);", // IID325 -#ifdef _LP64 - "__ erorl(r8, r8, 16, false);", // IID326 - "__ erorl(r19, rdx, 16, true);", // IID327 - "__ erorl(rax, r31, 16, true);", // IID328 - "__ erorl(r22, r22, 8, true);", // IID329 - "__ esall(r23, r25, 16, false);", // IID330 - "__ esall(rax, r14, 16, false);", // IID331 - "__ esall(r31, r31, 8, false);", // IID332 - "__ esall(r30, r24, 2, true);", // IID333 - "__ esall(rax, r29, 2, true);", // IID334 - "__ esall(r8, r8, 2, true);", // IID335 - "__ esarl(r18, r24, 16, false);", // IID336 - "__ esarl(rax, r13, 16, false);", // IID337 - "__ esarl(r24, r24, 1, false);", // IID338 - "__ esarl(r28, r17, 16, true);", // IID339 - "__ esarl(rax, r24, 16, true);", // IID340 - "__ esarl(r17, r17, 4, true);", // IID341 - "__ eshll(r24, rcx, 4, false);", // IID342 - "__ eshll(rax, r16, 4, false);", // IID343 - "__ eshll(r15, r15, 2, false);", // IID344 - "__ eshll(r14, r27, 4, true);", // IID345 - "__ eshll(rax, r23, 4, true);", // IID346 - "__ eshll(r30, r30, 4, true);", // IID347 - "__ eshrl(r27, rdx, 2, false);", // IID348 - "__ eshrl(rax, r19, 2, false);", // IID349 - "__ eshrl(r20, r20, 2, false);", // IID350 - "__ eshrl(r21, r23, 1, true);", // IID351 - "__ eshrl(rax, r30, 1, true);", // IID352 - "__ eshrl(r25, r25, 2, true);", // IID353 - "__ esubl(r24, r19, 1048576, false);", // IID354 - "__ esubl(rax, r14, 1048576, false);", // IID355 - "__ esubl(r22, r22, 268435456, false);", // IID356 - "__ esubl(r24, r24, 65536, true);", // IID357 - "__ esubl(rax, r14, 65536, true);", // IID358 - "__ esubl(r28, r28, 268435456, true);", // IID359 - "__ exorl(rbx, r20, 256, false);", // IID360 - "__ exorl(rax, r15, 256, false);", // IID361 -#endif // _LP64 - "__ exorl(rbx, rbx, 4096, false);", // IID362 -#ifdef _LP64 - "__ exorl(r24, r30, 65536, true);", // IID363 - "__ exorl(rax, r31, 65536, true);", // IID364 - "__ exorl(r31, r31, 4096, true);", // IID365 - "__ esubl_imm32(r20, r10, 1048576, false);", // IID366 - "__ esubl_imm32(rax, r13, 1048576, false);", // IID367 - "__ esubl_imm32(r25, r25, 1048576, false);", // IID368 - "__ esubl_imm32(r23, r12, 1073741824, true);", // IID369 - "__ esubl_imm32(rax, r16, 1073741824, true);", // IID370 - "__ esubl_imm32(r31, r31, 65536, true);", // IID371 - "__ eaddl(r17, r13, Address(r9, +0x7fef2f98), false);", // IID372 - "__ eaddl(r29, r8, Address(r22, -0x4df70aac), true);", // IID373 - "__ eandl(r13, r17, Address(r12, r15, (Address::ScaleFactor)3, +0x50a8a902), false);", // IID374 - "__ eandl(r22, r25, Address(r26, r10, (Address::ScaleFactor)2, +0x70ea2754), true);", // IID375 - "__ eimull(r19, r12, Address(r30, r8, (Address::ScaleFactor)0, +0x6a1a0a73), false);", // IID376 - "__ eimull(r30, r18, Address(r18, r19, (Address::ScaleFactor)2, -0x7fcd28c7), true);", // IID377 - "__ eorl(r16, r31, Address(r25, r11, (Address::ScaleFactor)3, +0x482d5dbc), false);", // IID378 - "__ eorl(r9, r27, Address(r11, +0x43d5ee01), true);", // IID379 - "__ esubl(rcx, r23, Address(r21, r15, (Address::ScaleFactor)2, +0x2825c2bc), false);", // IID380 - "__ esubl(r27, r22, Address(r13, r15, (Address::ScaleFactor)1, +0x771f0da7), true);", // IID381 - "__ exorl(r9, r30, Address(r9, r22, (Address::ScaleFactor)3, -0x4ad6c88e), false);", // IID382 - "__ exorl(r11, r16, Address(rbx, r28, (Address::ScaleFactor)2, +0xb0223ee), true);", // IID383 - "__ exorb(r15, r29, Address(r15, r28, (Address::ScaleFactor)1, -0x1f297a69), false);", // IID384 - "__ exorb(r17, r30, Address(r23, rbx, (Address::ScaleFactor)1, +0xadc7545), true);", // IID385 - "__ exorw(r27, r9, Address(rdx, r22, (Address::ScaleFactor)2, -0x43d90f61), false);", // IID386 - "__ exorw(rbx, r22, Address(r28, r22, (Address::ScaleFactor)0, -0x7d30a0b1), true);", // IID387 - "__ eaddl(r14, r24, rcx, false);", // IID388 - "__ eaddl(r8, r8, r17, false);", // IID389 - "__ eaddl(r26, r24, r12, true);", // IID390 - "__ eaddl(r24, r24, r23, true);", // IID391 - "__ eandl(r13, r26, r31, false);", // IID392 - "__ eandl(r11, r11, r8, false);", // IID393 - "__ eandl(rcx, r19, r15, true);", // IID394 - "__ eandl(r12, r12, r12, true);", // IID395 - "__ eimull(r22, r20, r19, false);", // IID396 - "__ eimull(r8, r8, rdx, false);", // IID397 - "__ eimull(r22, r27, r23, true);", // IID398 - "__ eimull(r9, r9, r18, true);", // IID399 - "__ eorw(rcx, r30, r13, false);", // IID400 - "__ eorw(r28, r28, r19, false);", // IID401 - "__ eorw(r12, r30, r27, true);", // IID402 - "__ eorw(r8, r8, r22, true);", // IID403 - "__ eorl(r16, rcx, r30, false);", // IID404 - "__ eorl(r10, r10, r25, false);", // IID405 - "__ eorl(r15, r17, r17, true);", // IID406 - "__ eorl(r9, r9, r30, true);", // IID407 - "__ eshldl(r20, r21, r8, false);", // IID408 - "__ eshldl(r26, r26, r14, false);", // IID409 - "__ eshldl(r16, rdx, r14, true);", // IID410 - "__ eshldl(r19, r19, r8, true);", // IID411 - "__ eshrdl(r27, rbx, r26, false);", // IID412 - "__ eshrdl(r28, r28, r19, false);", // IID413 - "__ eshrdl(rcx, r11, r14, true);", // IID414 - "__ eshrdl(r31, r31, r19, true);", // IID415 - "__ esubl(r26, r13, r25, false);", // IID416 - "__ esubl(r24, r24, r11, false);", // IID417 - "__ esubl(r18, r20, r13, true);", // IID418 - "__ esubl(r16, r16, r18, true);", // IID419 - "__ exorl(r19, r17, r8, false);", // IID420 - "__ exorl(r19, r19, r13, false);", // IID421 - "__ exorl(r23, r13, r15, true);", // IID422 - "__ exorl(r11, r11, r29, true);", // IID423 - "__ eshldl(r29, r17, r17, 1, false);", // IID424 - "__ eshldl(r22, r22, r24, 4, false);", // IID425 - "__ eshldl(r8, r28, r11, 16, true);", // IID426 - "__ eshldl(r15, r15, r23, 4, true);", // IID427 - "__ eshrdl(r29, r22, r16, 4, false);", // IID428 - "__ eshrdl(r13, r13, r9, 4, false);", // IID429 - "__ eshrdl(r15, r21, r12, 2, true);", // IID430 - "__ eshrdl(r17, r17, r23, 2, true);", // IID431 - "__ ecmovl (Assembler::Condition::overflow, rdx, r16, r29);", // IID432 - "__ ecmovl (Assembler::Condition::overflow, r10, r10, r21);", // IID433 - "__ ecmovl (Assembler::Condition::noOverflow, r17, r29, r18);", // IID434 - "__ ecmovl (Assembler::Condition::noOverflow, r28, r28, r24);", // IID435 - "__ ecmovl (Assembler::Condition::below, r10, r20, r27);", // IID436 - "__ ecmovl (Assembler::Condition::below, r10, r10, r14);", // IID437 - "__ ecmovl (Assembler::Condition::aboveEqual, r11, r27, rcx);", // IID438 - "__ ecmovl (Assembler::Condition::aboveEqual, r22, r22, r15);", // IID439 - "__ ecmovl (Assembler::Condition::zero, r31, r30, r19);", // IID440 - "__ ecmovl (Assembler::Condition::zero, r19, r19, r26);", // IID441 - "__ ecmovl (Assembler::Condition::notZero, r21, r14, r26);", // IID442 - "__ ecmovl (Assembler::Condition::notZero, r20, r20, r15);", // IID443 - "__ ecmovl (Assembler::Condition::belowEqual, r12, r13, r23);", // IID444 - "__ ecmovl (Assembler::Condition::belowEqual, r28, r28, r20);", // IID445 - "__ ecmovl (Assembler::Condition::above, r20, r24, r11);", // IID446 - "__ ecmovl (Assembler::Condition::above, r10, r10, r15);", // IID447 - "__ ecmovl (Assembler::Condition::negative, r19, r20, r23);", // IID448 - "__ ecmovl (Assembler::Condition::negative, r15, r15, r26);", // IID449 - "__ ecmovl (Assembler::Condition::positive, r19, r24, r23);", // IID450 - "__ ecmovl (Assembler::Condition::positive, r28, r28, r11);", // IID451 - "__ ecmovl (Assembler::Condition::parity, r13, r13, rdx);", // IID452 - "__ ecmovl (Assembler::Condition::parity, r31, r31, r23);", // IID453 - "__ ecmovl (Assembler::Condition::noParity, r23, r9, r27);", // IID454 - "__ ecmovl (Assembler::Condition::noParity, r21, r21, r20);", // IID455 - "__ ecmovl (Assembler::Condition::less, r24, r21, r29);", // IID456 - "__ ecmovl (Assembler::Condition::less, rbx, rbx, r11);", // IID457 - "__ ecmovl (Assembler::Condition::greaterEqual, r21, rbx, rcx);", // IID458 - "__ ecmovl (Assembler::Condition::greaterEqual, r31, r31, r21);", // IID459 - "__ ecmovl (Assembler::Condition::lessEqual, r15, r25, r30);", // IID460 - "__ ecmovl (Assembler::Condition::lessEqual, r23, r23, r25);", // IID461 - "__ ecmovl (Assembler::Condition::greater, r18, rcx, r10);", // IID462 - "__ ecmovl (Assembler::Condition::greater, rcx, rcx, r31);", // IID463 - "__ ecmovl (Assembler::Condition::overflow, r21, r19, Address(r26, -0x6e290873));", // IID464 - "__ ecmovl (Assembler::Condition::noOverflow, r24, r19, Address(r22, rcx, (Address::ScaleFactor)0, +0x11f85f9a));", // IID465 - "__ ecmovl (Assembler::Condition::below, r17, r24, Address(r20, +0x534d775e));", // IID466 - "__ ecmovl (Assembler::Condition::aboveEqual, r20, r18, Address(r20, -0x47c94ecd));", // IID467 - "__ ecmovl (Assembler::Condition::zero, r9, r13, Address(r23, -0x4b83c563));", // IID468 - "__ ecmovl (Assembler::Condition::notZero, r11, r25, Address(r24, r14, (Address::ScaleFactor)1, -0x446507af));", // IID469 - "__ ecmovl (Assembler::Condition::belowEqual, r14, r24, Address(r30, r13, (Address::ScaleFactor)2, +0xd0661d));", // IID470 - "__ ecmovl (Assembler::Condition::above, r13, r25, Address(r14, r27, (Address::ScaleFactor)3, +0x47e1403));", // IID471 - "__ ecmovl (Assembler::Condition::negative, r24, r19, Address(rcx, rdx, (Address::ScaleFactor)3, -0x644a5318));", // IID472 - "__ ecmovl (Assembler::Condition::positive, r26, r24, Address(r22, r22, (Address::ScaleFactor)0, +0x70352446));", // IID473 - "__ ecmovl (Assembler::Condition::parity, r19, r26, Address(r8, r30, (Address::ScaleFactor)2, +0x78a12f5c));", // IID474 - "__ ecmovl (Assembler::Condition::noParity, r29, r11, Address(r25, r20, (Address::ScaleFactor)0, +0x27a8303a));", // IID475 - "__ ecmovl (Assembler::Condition::less, r22, r24, Address(r27, r16, (Address::ScaleFactor)1, +0x2541a10));", // IID476 - "__ ecmovl (Assembler::Condition::greaterEqual, r31, r15, Address(r8, r16, (Address::ScaleFactor)3, +0x558e3251));", // IID477 - "__ ecmovl (Assembler::Condition::lessEqual, r27, r18, Address(r8, r10, (Address::ScaleFactor)0, -0x471987b7));", // IID478 - "__ ecmovl (Assembler::Condition::greater, r18, r16, Address(r18, r19, (Address::ScaleFactor)2, -0x120ae81e));", // IID479 - "__ adcq(rbx, r31);", // IID480 - "__ cmpq(r30, r31);", // IID481 - "__ imulq(r29, r28);", // IID482 - "__ popcntq(r25, r10);", // IID483 - "__ sbbq(r24, r20);", // IID484 - "__ subq(r16, rdx);", // IID485 - "__ tzcntq(r26, r28);", // IID486 - "__ lzcntq(r28, r9);", // IID487 - "__ addq(r20, r24);", // IID488 - "__ andq(r24, r29);", // IID489 - "__ orq(r23, r27);", // IID490 - "__ xorq(r15, r12);", // IID491 - "__ movq(r18, r19);", // IID492 - "__ bsfq(r31, rcx);", // IID493 - "__ bsrq(r9, r13);", // IID494 - "__ btq(r20, rcx);", // IID495 - "__ xchgq(r8, r21);", // IID496 - "__ testq(r24, r14);", // IID497 - "__ addq(Address(rcx, r23, (Address::ScaleFactor)2, +0x4ff06c4d), r29);", // IID498 - "__ andq(Address(r24, r10, (Address::ScaleFactor)1, -0x75d9a189), r26);", // IID499 - "__ cmpq(Address(rbx, rbx, (Address::ScaleFactor)0, +0x4033d59c), r17);", // IID500 - "__ orq(Address(r22, r12, (Address::ScaleFactor)3, -0x3893347d), r18);", // IID501 - "__ xorq(Address(r20, r23, (Address::ScaleFactor)3, +0x4b311560), r12);", // IID502 - "__ subq(Address(r10, r28, (Address::ScaleFactor)2, +0x5c3a2657), r29);", // IID503 - "__ movq(Address(r13, r25, (Address::ScaleFactor)3, +0x1a3d6f3f), r22);", // IID504 - "__ xaddq(Address(r17, r24, (Address::ScaleFactor)3, -0x35addbd8), r25);", // IID505 - "__ andq(Address(r25, +0x632184c3), 16777216);", // IID506 - "__ addq(Address(r13, r13, (Address::ScaleFactor)0, -0x3972eac6), 16777216);", // IID507 - "__ cmpq(Address(r9, -0x13b4c806), 4096);", // IID508 - "__ sarq(Address(r31, +0x4fa7f551), 1);", // IID509 - "__ salq(Address(r21, r31, (Address::ScaleFactor)2, +0x31aa8232), 1);", // IID510 - "__ sbbq(Address(r24, r31, (Address::ScaleFactor)2, -0x466538b7), 268435456);", // IID511 - "__ shrq(Address(r28, r22, (Address::ScaleFactor)0, -0x3efe85b1), 2);", // IID512 - "__ subq(Address(r16, -0x1389a3eb), 1048576);", // IID513 - "__ xorq(Address(r29, r8, (Address::ScaleFactor)0, +0x1d022615), 16);", // IID514 - "__ orq(Address(r12, r28, (Address::ScaleFactor)1, -0x34c898e2), 1);", // IID515 - "__ movq(Address(rcx, r24, (Address::ScaleFactor)2, -0x1644eb08), 256);", // IID516 - "__ testq(Address(r29, -0x7d23890b), -65536);", // IID517 - "__ addq(r23, Address(rcx, r19, (Address::ScaleFactor)2, +0x70eac654));", // IID518 - "__ andq(rdx, Address(r24, r15, (Address::ScaleFactor)0, -0x204ddaa9));", // IID519 - "__ cmpq(rdx, Address(r23, r11, (Address::ScaleFactor)3, +0x32c930bd));", // IID520 - "__ lzcntq(r28, Address(rdx, -0x5433c28f));", // IID521 - "__ orq(r22, Address(r19, r14, (Address::ScaleFactor)1, -0x2cc67d38));", // IID522 - "__ adcq(r10, Address(r10, +0x3d7c59f));", // IID523 - "__ imulq(r10, Address(r8, r8, (Address::ScaleFactor)3, -0xe61862d));", // IID524 - "__ popcntq(r23, Address(r29, -0x777ed96d));", // IID525 - "__ sbbq(rcx, Address(rbx, r19, (Address::ScaleFactor)1, +0x53c601cb));", // IID526 - "__ subq(r14, Address(r17, rbx, (Address::ScaleFactor)0, -0x768bf073));", // IID527 - "__ tzcntq(r29, Address(r10, r19, (Address::ScaleFactor)1, +0x30c98d3c));", // IID528 - "__ xorq(r10, Address(r16, r27, (Address::ScaleFactor)0, -0x3d08d602));", // IID529 - "__ movq(r18, Address(r28, r28, (Address::ScaleFactor)3, -0x62fbac91));", // IID530 - "__ leaq(rbx, Address(rcx, +0x450602a5));", // IID531 - "__ cvttsd2siq(r12, Address(r30, r31, (Address::ScaleFactor)0, -0x6798a630));", // IID532 - "__ xchgq(r31, Address(r24, r10, (Address::ScaleFactor)1, -0x706712ed));", // IID533 - "__ testq(r14, Address(r13, r20, (Address::ScaleFactor)3, +0x171081f2));", // IID534 - "__ addq(r31, 16);", // IID535 - "__ andq(r25, 16);", // IID536 - "__ adcq(r23, 256);", // IID537 - "__ cmpq(r19, 268435456);", // IID538 - "__ rclq(r31, 1);", // IID539 - "__ rcrq(r17, 1);", // IID540 - "__ rolq(r25, 2);", // IID541 - "__ rorq(r17, 4);", // IID542 - "__ sarq(r28, 1);", // IID543 - "__ salq(r15, 4);", // IID544 - "__ sbbq(rbx, 65536);", // IID545 - "__ shlq(r21, 1);", // IID546 - "__ shrq(r10, 1);", // IID547 - "__ subq(r14, 16);", // IID548 - "__ xorq(r18, 268435456);", // IID549 - "__ movq(r23, 16);", // IID550 - "__ mov64(r12, 1099511627776);", // IID551 - "__ btq(r14, 4);", // IID552 - "__ testq(r24, -4096);", // IID553 - "__ orq_imm32(r19, 1048576);", // IID554 - "__ subq_imm32(rcx, 268435456);", // IID555 - "__ cmovq(Assembler::Condition::overflow, rdx, Address(r19, rbx, (Address::ScaleFactor)3, +0x211c8c4));", // IID556 - "__ cmovq(Assembler::Condition::noOverflow, rbx, Address(r21, +0x49267743));", // IID557 - "__ cmovq(Assembler::Condition::below, r21, Address(r8, r28, (Address::ScaleFactor)1, -0x4c8c2946));", // IID558 - "__ cmovq(Assembler::Condition::aboveEqual, r12, Address(r26, r20, (Address::ScaleFactor)0, -0x264df89c));", // IID559 - "__ cmovq(Assembler::Condition::zero, r17, Address(r28, r9, (Address::ScaleFactor)2, +0x3497196b));", // IID560 - "__ cmovq(Assembler::Condition::notZero, r13, Address(r15, r23, (Address::ScaleFactor)1, -0x27a30999));", // IID561 - "__ cmovq(Assembler::Condition::belowEqual, r22, Address(r22, +0xf39ab05));", // IID562 - "__ cmovq(Assembler::Condition::above, rcx, Address(r22, r26, (Address::ScaleFactor)3, -0x48c954c));", // IID563 - "__ cmovq(Assembler::Condition::negative, r25, Address(r19, r21, (Address::ScaleFactor)0, +0xe405b0b));", // IID564 - "__ cmovq(Assembler::Condition::positive, r12, Address(r19, r29, (Address::ScaleFactor)3, -0x7762044b));", // IID565 - "__ cmovq(Assembler::Condition::parity, rbx, Address(r30, r10, (Address::ScaleFactor)1, -0x19798323));", // IID566 - "__ cmovq(Assembler::Condition::noParity, r21, Address(r24, r31, (Address::ScaleFactor)0, -0x5731652b));", // IID567 - "__ cmovq(Assembler::Condition::less, r18, Address(r8, r10, (Address::ScaleFactor)1, -0x5613be89));", // IID568 - "__ cmovq(Assembler::Condition::greaterEqual, r28, Address(r21, r21, (Address::ScaleFactor)3, +0x65a0fdc4));", // IID569 - "__ cmovq(Assembler::Condition::lessEqual, r23, Address(r11, r18, (Address::ScaleFactor)0, -0x1d1af10c));", // IID570 - "__ cmovq(Assembler::Condition::greater, r22, Address(r18, r12, (Address::ScaleFactor)1, +0x1a5f1c38));", // IID571 - "__ call(r23);", // IID572 - "__ divq(r30);", // IID573 - "__ idivq(r19);", // IID574 - "__ imulq(r9);", // IID575 - "__ mulq(r13);", // IID576 - "__ negq(r16);", // IID577 - "__ notq(r29);", // IID578 - "__ rolq(rcx);", // IID579 - "__ rorq(r25);", // IID580 - "__ sarq(r8);", // IID581 - "__ salq(r27);", // IID582 - "__ shlq(r30);", // IID583 - "__ shrq(r23);", // IID584 - "__ incrementq(rbx);", // IID585 - "__ decrementq(r14);", // IID586 - "__ pushp(r21);", // IID587 - "__ popp(r21);", // IID588 - "__ call(Address(r20, r21, (Address::ScaleFactor)1, +0x56c6af2f));", // IID589 - "__ mulq(Address(r31, r19, (Address::ScaleFactor)3, -0x1b4eb23));", // IID590 - "__ negq(Address(r27, r27, (Address::ScaleFactor)0, -0x58dbfc1f));", // IID591 - "__ sarq(Address(rbx, r22, (Address::ScaleFactor)2, -0x606349d1));", // IID592 - "__ salq(Address(r26, r23, (Address::ScaleFactor)3, +0xb95a079));", // IID593 - "__ shrq(Address(r14, r26, (Address::ScaleFactor)0, +0x3544e09));", // IID594 - "__ incrementq(Address(r27, rdx, (Address::ScaleFactor)0, +0x120b3250));", // IID595 - "__ decrementq(Address(r9, r25, (Address::ScaleFactor)2, -0x34aaeccb));", // IID596 - "__ imulq(r20, Address(r16, r28, (Address::ScaleFactor)1, -0x59de05a5), 1048576);", // IID597 - "__ imulq(r17, r23, 256);", // IID598 - "__ shldq(r19, r11, 8);", // IID599 - "__ shrdq(r28, r10, 8);", // IID600 - "__ pop2(r29, r26);", // IID601 - "__ pop2p(r22, r10);", // IID602 - "__ push2(r25, r30);", // IID603 - "__ push2p(r28, r15);", // IID604 - "__ movzbq(r11, Address(r29, r19, (Address::ScaleFactor)2, -0x12368d34));", // IID605 - "__ movzwq(r14, Address(r8, r30, (Address::ScaleFactor)2, -0x4a9392de));", // IID606 - "__ movsbq(r28, Address(r23, r15, (Address::ScaleFactor)0, +0x6189cb54));", // IID607 - "__ movswq(r28, Address(rbx, r23, (Address::ScaleFactor)3, -0x2de86561));", // IID608 - "__ movzbq(r11, rcx);", // IID609 - "__ movzwq(r30, r15);", // IID610 - "__ movsbq(r14, rcx);", // IID611 - "__ movswq(r23, r9);", // IID612 - "__ cmpxchgq(r12, Address(r13, r10, (Address::ScaleFactor)1, -0x7c62c3a));", // IID613 - "__ eidivq(rcx, false);", // IID614 - "__ eidivq(r15, true);", // IID615 - "__ edivq(r23, false);", // IID616 - "__ edivq(r24, true);", // IID617 - "__ eimulq(r27, false);", // IID618 - "__ eimulq(r30, true);", // IID619 - "__ emulq(r12, false);", // IID620 - "__ emulq(rcx, true);", // IID621 - "__ emulq(Address(r13, r9, (Address::ScaleFactor)3, -0x226aab94), false);", // IID622 - "__ emulq(Address(r13, r24, (Address::ScaleFactor)3, -0x286c7605), true);", // IID623 - "__ eimulq(r21, r30, false);", // IID624 - "__ eimulq(r17, r17, false);", // IID625 - "__ eimulq(r29, r12, true);", // IID626 - "__ eimulq(r30, r30, true);", // IID627 - "__ elzcntq(r24, r15, false);", // IID628 - "__ elzcntq(r25, r25, false);", // IID629 - "__ elzcntq(r25, r21, true);", // IID630 - "__ elzcntq(r22, r22, true);", // IID631 - "__ enegq(r17, r30, false);", // IID632 - "__ enegq(r17, r17, false);", // IID633 - "__ enegq(r31, r17, true);", // IID634 - "__ enegq(r29, r29, true);", // IID635 - "__ enotq(r10, r9);", // IID636 - "__ enotq(r24, r24);", // IID637 - "__ epopcntq(r28, r15, false);", // IID638 - "__ epopcntq(r10, r10, false);", // IID639 - "__ epopcntq(r27, r30, true);", // IID640 - "__ epopcntq(r28, r28, true);", // IID641 - "__ erolq(r28, r14, false);", // IID642 - "__ erolq(r23, r23, false);", // IID643 - "__ erolq(r23, r24, true);", // IID644 - "__ erolq(r21, r21, true);", // IID645 - "__ erorq(r31, r22, false);", // IID646 - "__ erorq(r28, r28, false);", // IID647 - "__ erorq(r17, r10, true);", // IID648 - "__ erorq(r9, r9, true);", // IID649 - "__ esalq(r29, r30, false);", // IID650 - "__ esalq(r11, r11, false);", // IID651 - "__ esalq(r26, r11, true);", // IID652 - "__ esalq(r16, r16, true);", // IID653 - "__ esarq(rbx, r15, false);", // IID654 - "__ esarq(r14, r14, false);", // IID655 - "__ esarq(r25, r16, true);", // IID656 - "__ esarq(r8, r8, true);", // IID657 - "__ edecq(r11, r13, false);", // IID658 - "__ edecq(rcx, rcx, false);", // IID659 - "__ edecq(r21, r18, true);", // IID660 - "__ edecq(r28, r28, true);", // IID661 - "__ eincq(r16, r16, false);", // IID662 - "__ eincq(r29, r29, false);", // IID663 - "__ eincq(r18, r9, true);", // IID664 - "__ eincq(r19, r19, true);", // IID665 - "__ eshlq(r19, r18, false);", // IID666 - "__ eshlq(r8, r8, false);", // IID667 - "__ eshlq(r12, r15, true);", // IID668 - "__ eshlq(r29, r29, true);", // IID669 - "__ eshrq(r28, r24, false);", // IID670 - "__ eshrq(r19, r19, false);", // IID671 - "__ eshrq(r8, r28, true);", // IID672 - "__ eshrq(r17, r17, true);", // IID673 - "__ etzcntq(r28, r16, false);", // IID674 - "__ etzcntq(r14, r14, false);", // IID675 - "__ etzcntq(r12, r31, true);", // IID676 - "__ etzcntq(r14, r14, true);", // IID677 - "__ eimulq(r31, Address(r13, -0x69c4b352), false);", // IID678 - "__ eimulq(r17, Address(r18, -0x60ab1105), true);", // IID679 - "__ elzcntq(r27, Address(r14, r25, (Address::ScaleFactor)2, +0x2798bf83), false);", // IID680 - "__ elzcntq(r23, Address(r10, r11, (Address::ScaleFactor)0, -0x378e635d), true);", // IID681 - "__ enegq(rcx, Address(r19, r9, (Address::ScaleFactor)3, -0x6847d440), false);", // IID682 - "__ enegq(rcx, Address(rbx, rcx, (Address::ScaleFactor)0, +0x6f92d38d), true);", // IID683 - "__ epopcntq(r20, Address(r12, -0x2a8b27d6), false);", // IID684 - "__ epopcntq(r31, Address(r30, +0x4603f6d0), true);", // IID685 - "__ esalq(rbx, Address(r24, +0x567d06f9), false);", // IID686 - "__ esalq(r12, Address(r24, r28, (Address::ScaleFactor)0, -0x1c4c584e), true);", // IID687 - "__ esarq(r12, Address(r23, r24, (Address::ScaleFactor)2, -0x3157bcba), false);", // IID688 - "__ esarq(r8, Address(r14, r24, (Address::ScaleFactor)2, -0x714290a5), true);", // IID689 - "__ edecq(r23, Address(r8, r15, (Address::ScaleFactor)1, -0x5ae272dd), false);", // IID690 - "__ edecq(r13, Address(r29, r9, (Address::ScaleFactor)3, -0x5b5174a9), true);", // IID691 - "__ eincq(r11, Address(r21, r31, (Address::ScaleFactor)3, -0x2176b4dc), false);", // IID692 - "__ eincq(r13, Address(rcx, r16, (Address::ScaleFactor)0, -0x36b448c9), true);", // IID693 - "__ eshrq(r26, Address(r25, rcx, (Address::ScaleFactor)2, -0x5f894993), false);", // IID694 - "__ eshrq(r25, Address(r9, +0x51798d21), true);", // IID695 - "__ etzcntq(r28, Address(r13, r26, (Address::ScaleFactor)2, +0x207196f6), false);", // IID696 - "__ etzcntq(rbx, Address(r19, r13, (Address::ScaleFactor)0, -0x24d937d5), true);", // IID697 - "__ eaddq(r17, Address(r30, +0x3935ccff), r31, false);", // IID698 - "__ eaddq(r14, Address(r27, r10, (Address::ScaleFactor)2, -0x34ad9bab), r14, false);", // IID699 - "__ eaddq(r18, Address(r20, r23, (Address::ScaleFactor)0, +0x5ad3ed4b), r30, true);", // IID700 - "__ eaddq(r20, Address(rdx, -0x322a99e5), r20, true);", // IID701 - "__ eandq(r31, Address(rbx, r27, (Address::ScaleFactor)3, +0x4ce247d2), r17, false);", // IID702 - "__ eandq(r30, Address(r18, r19, (Address::ScaleFactor)1, -0x4ee3d14), r30, false);", // IID703 - "__ eandq(r28, Address(r11, rbx, (Address::ScaleFactor)3, -0x28994bbf), r24, true);", // IID704 - "__ eandq(r30, Address(r22, +0x7d21c24), r30, true);", // IID705 - "__ eorq(r26, Address(r15, r19, (Address::ScaleFactor)3, +0x58c21792), r20, false);", // IID706 - "__ eorq(r13, Address(r10, r27, (Address::ScaleFactor)2, -0x2c70d333), r13, false);", // IID707 - "__ eorq(rbx, Address(r12, rbx, (Address::ScaleFactor)0, -0x1fb0f1bc), r26, true);", // IID708 - "__ eorq(r31, Address(r27, r31, (Address::ScaleFactor)1, +0x28d1756), r31, true);", // IID709 - "__ esubq(r24, Address(r28, r23, (Address::ScaleFactor)1, +0x6980f610), r27, false);", // IID710 - "__ esubq(r15, Address(r11, r30, (Address::ScaleFactor)3, -0x49777e7), r15, false);", // IID711 - "__ esubq(r17, Address(r25, r13, (Address::ScaleFactor)2, +0x31619e46), r31, true);", // IID712 - "__ esubq(r18, Address(r11, r10, (Address::ScaleFactor)2, +0x1922861a), r18, true);", // IID713 - "__ exorq(rbx, Address(r11, -0x4716d420), r21, false);", // IID714 - "__ exorq(r8, Address(rdx, r9, (Address::ScaleFactor)2, -0x4cfe39c), r8, false);", // IID715 - "__ exorq(r16, Address(r14, r27, (Address::ScaleFactor)0, +0x7c6654d9), r25, true);", // IID716 - "__ exorq(r29, Address(r15, -0x5efab479), r29, true);", // IID717 - "__ eaddq(r19, Address(r13, r22, (Address::ScaleFactor)2, +0x68b64559), 16777216, false);", // IID718 - "__ eaddq(r16, Address(r13, r31, (Address::ScaleFactor)3, -0x65143af5), 1, true);", // IID719 - "__ eandq(r31, Address(r24, r13, (Address::ScaleFactor)1, -0x25b16a0e), 1, false);", // IID720 - "__ eandq(r11, Address(r28, -0xf6d4b26), 65536, true);", // IID721 - "__ eimulq(rcx, Address(r18, r10, (Address::ScaleFactor)0, +0x46ec6da1), 16777216, false);", // IID722 - "__ eimulq(r15, Address(r9, r10, (Address::ScaleFactor)3, -0x7fc36af3), 16, true);", // IID723 - "__ eorq(r17, Address(r27, r30, (Address::ScaleFactor)0, +0x1b4cda2c), 1, false);", // IID724 - "__ eorq(rdx, Address(r25, r14, (Address::ScaleFactor)2, -0x59aa6b85), 4096, true);", // IID725 - "__ esalq(r17, Address(r26, r21, (Address::ScaleFactor)1, -0x6ab1f15f), 8, false);", // IID726 - "__ esalq(r12, Address(r22, r17, (Address::ScaleFactor)0, -0x43ac14ab), 2, true);", // IID727 - "__ esarq(r29, Address(r18, r16, (Address::ScaleFactor)0, -0x59dc0c61), 4, false);", // IID728 - "__ esarq(r16, Address(r11, -0x7bdd314), 4, true);", // IID729 - "__ eshrq(r26, Address(r23, r27, (Address::ScaleFactor)3, -0x55b92314), 16, false);", // IID730 - "__ eshrq(r23, Address(r16, r29, (Address::ScaleFactor)1, +0x71311a1d), 2, true);", // IID731 - "__ esubq(r25, Address(r9, -0x9532bac), 1048576, false);", // IID732 - "__ esubq(r17, Address(r8, r23, (Address::ScaleFactor)0, +0x55d06ca2), 1048576, true);", // IID733 - "__ exorq(r29, Address(r9, r24, (Address::ScaleFactor)0, -0x2c141c1), 1048576, false);", // IID734 - "__ exorq(r28, Address(r22, r19, (Address::ScaleFactor)1, -0x2d9d9abd), 16, true);", // IID735 - "__ eaddq(r22, r14, 16, false);", // IID736 - "__ eaddq(rax, r12, 16, false);", // IID737 - "__ eaddq(r24, r24, 65536, false);", // IID738 - "__ eaddq(r21, rbx, 65536, true);", // IID739 - "__ eaddq(rax, rbx, 65536, true);", // IID740 - "__ eaddq(r24, r24, 65536, true);", // IID741 - "__ eandq(r21, r27, 16777216, false);", // IID742 - "__ eandq(rax, r27, 16777216, false);", // IID743 - "__ eandq(r24, r24, 65536, false);", // IID744 - "__ eandq(r13, r31, 1048576, true);", // IID745 - "__ eandq(rax, r21, 1048576, true);", // IID746 - "__ eandq(r30, r30, 1048576, true);", // IID747 - "__ eimulq(r8, r13, 268435456, false);", // IID748 - "__ eimulq(rax, r31, 268435456, false);", // IID749 - "__ eimulq(r13, r13, 65536, false);", // IID750 - "__ eimulq(r14, r29, 1048576, true);", // IID751 - "__ eimulq(rax, r22, 1048576, true);", // IID752 - "__ eimulq(r8, r8, 268435456, true);", // IID753 - "__ eorq(r30, r15, 4096, false);", // IID754 - "__ eorq(rax, r28, 4096, false);", // IID755 - "__ eorq(r26, r26, 1048576, false);", // IID756 - "__ eorq(r16, r12, 268435456, true);", // IID757 - "__ eorq(rax, r9, 268435456, true);", // IID758 - "__ eorq(r23, r23, 256, true);", // IID759 - "__ erclq(r15, r9, 16);", // IID760 - "__ erclq(rax, r8, 16);", // IID761 - "__ erclq(r25, r25, 1);", // IID762 - "__ erolq(r9, r17, 16, false);", // IID763 - "__ erolq(rax, r20, 16, false);", // IID764 - "__ erolq(r27, r27, 1, false);", // IID765 - "__ erolq(r20, r31, 1, true);", // IID766 - "__ erolq(rax, r18, 1, true);", // IID767 - "__ erolq(r28, r28, 16, true);", // IID768 - "__ erorq(r26, r18, 16, false);", // IID769 - "__ erorq(rax, r24, 16, false);", // IID770 - "__ erorq(r22, r22, 16, false);", // IID771 - "__ erorq(r27, r29, 1, true);", // IID772 - "__ erorq(rax, r18, 1, true);", // IID773 - "__ erorq(r21, r21, 1, true);", // IID774 - "__ esalq(r12, rcx, 2, false);", // IID775 - "__ esalq(rax, r24, 2, false);", // IID776 - "__ esalq(r22, r22, 8, false);", // IID777 - "__ esalq(r17, r23, 8, true);", // IID778 - "__ esalq(rax, r27, 8, true);", // IID779 - "__ esalq(r23, r23, 1, true);", // IID780 - "__ esarq(r8, r25, 16, false);", // IID781 - "__ esarq(rax, r23, 16, false);", // IID782 - "__ esarq(r9, r9, 4, false);", // IID783 - "__ esarq(r22, r13, 1, true);", // IID784 - "__ esarq(rax, r11, 1, true);", // IID785 - "__ esarq(r12, r12, 2, true);", // IID786 - "__ eshlq(rcx, r30, 8, false);", // IID787 - "__ eshlq(rax, r19, 8, false);", // IID788 - "__ eshlq(r13, r13, 2, false);", // IID789 - "__ eshlq(r18, r11, 8, true);", // IID790 - "__ eshlq(rax, r9, 8, true);", // IID791 - "__ eshlq(rcx, rcx, 16, true);", // IID792 - "__ eshrq(r10, r22, 4, false);", // IID793 - "__ eshrq(rax, r9, 4, false);", // IID794 - "__ eshrq(r12, r12, 2, false);", // IID795 - "__ eshrq(r26, r31, 8, true);", // IID796 - "__ eshrq(rax, r12, 8, true);", // IID797 - "__ eshrq(r28, r28, 1, true);", // IID798 - "__ esubq(r15, r30, 65536, false);", // IID799 - "__ esubq(rax, rcx, 65536, false);", // IID800 - "__ esubq(r26, r26, 16, false);", // IID801 - "__ esubq(r12, r14, 1, true);", // IID802 - "__ esubq(rax, r21, 1, true);", // IID803 - "__ esubq(r20, r20, 1048576, true);", // IID804 - "__ exorq(r11, rbx, 16777216, false);", // IID805 - "__ exorq(rax, r23, 16777216, false);", // IID806 - "__ exorq(r31, r31, 268435456, false);", // IID807 - "__ exorq(r29, r28, 4096, true);", // IID808 - "__ exorq(rax, r19, 4096, true);", // IID809 - "__ exorq(rdx, rdx, 268435456, true);", // IID810 - "__ eorq_imm32(rdx, rdx, 1048576, false);", // IID811 - "__ eorq_imm32(rax, r22, 1048576, false);", // IID812 - "__ eorq_imm32(r29, r29, 1048576, false);", // IID813 - "__ eorq_imm32(r17, rcx, 4194304, false);", // IID814 - "__ eorq_imm32(rax, r25, 4194304, false);", // IID815 - "__ eorq_imm32(r27, r27, 1073741824, false);", // IID816 - "__ esubq_imm32(r16, r19, 4194304, false);", // IID817 - "__ esubq_imm32(rax, r31, 4194304, false);", // IID818 - "__ esubq_imm32(r26, r26, 262144, false);", // IID819 - "__ esubq_imm32(r17, r22, 1073741824, true);", // IID820 - "__ esubq_imm32(rax, r18, 1073741824, true);", // IID821 - "__ esubq_imm32(r23, r23, 268435456, true);", // IID822 - "__ eaddq(r13, r30, Address(r24, r19, (Address::ScaleFactor)1, +0x56ea3a3b), false);", // IID823 - "__ eaddq(r29, r15, Address(r26, r27, (Address::ScaleFactor)3, -0x4b113958), true);", // IID824 - "__ eandq(r12, r30, Address(r31, -0x46103c74), false);", // IID825 - "__ eandq(r27, r10, Address(r22, r25, (Address::ScaleFactor)1, +0x6a1ebee5), true);", // IID826 - "__ eorq(r30, r26, Address(r11, r18, (Address::ScaleFactor)2, -0x2b9fff29), false);", // IID827 - "__ eorq(r9, r12, Address(r18, r17, (Address::ScaleFactor)0, +0xb4859f6), true);", // IID828 - "__ eimulq(rdx, r17, Address(r24, rdx, (Address::ScaleFactor)2, +0x3d284cd8), false);", // IID829 - "__ eimulq(r29, r26, Address(r30, r12, (Address::ScaleFactor)1, +0x6e813124), true);", // IID830 - "__ esubq(rbx, r13, Address(r22, -0x702a289e), false);", // IID831 - "__ esubq(r23, r29, Address(r25, rdx, (Address::ScaleFactor)0, -0x6252a7ed), true);", // IID832 - "__ exorq(r8, r18, Address(r19, r14, (Address::ScaleFactor)2, -0xebfa697), false);", // IID833 - "__ exorq(r10, r28, Address(r26, +0x168381ca), true);", // IID834 - "__ eaddq(rcx, r18, r8, false);", // IID835 - "__ eaddq(rcx, rcx, r14, false);", // IID836 - "__ eaddq(r23, r10, r16, true);", // IID837 - "__ eaddq(r11, r11, r24, true);", // IID838 - "__ eadcxq(r9, r18, rdx);", // IID839 - "__ eadcxq(r8, r8, r15);", // IID840 - "__ eadoxq(r15, r22, r26);", // IID841 - "__ eadoxq(r11, r11, rdx);", // IID842 - "__ eandq(r19, rdx, r22, false);", // IID843 - "__ eandq(r29, r29, r17, false);", // IID844 - "__ eandq(r23, r27, r15, true);", // IID845 - "__ eandq(r9, r9, r13, true);", // IID846 - "__ eimulq(r18, r15, r16, false);", // IID847 - "__ eimulq(rcx, rcx, r17, false);", // IID848 - "__ eimulq(r23, r12, r20, true);", // IID849 - "__ eimulq(r10, r10, r9, true);", // IID850 - "__ eorq(rdx, r19, r14, false);", // IID851 - "__ eorq(rcx, rcx, r13, false);", // IID852 - "__ eorq(r9, r25, r29, true);", // IID853 - "__ eorq(rdx, rdx, r25, true);", // IID854 - "__ esubq(r23, r8, r16, false);", // IID855 - "__ esubq(r13, r13, r13, false);", // IID856 - "__ esubq(r19, r12, r15, true);", // IID857 - "__ esubq(r9, r9, rdx, true);", // IID858 - "__ exorq(r13, r16, r31, false);", // IID859 - "__ exorq(r17, r17, r30, false);", // IID860 - "__ exorq(r19, r30, r20, true);", // IID861 - "__ exorq(r31, r31, r13, true);", // IID862 - "__ eshldq(r22, r10, r13, 4, false);", // IID863 - "__ eshldq(r24, r24, r21, 16, false);", // IID864 - "__ eshldq(r20, r13, r27, 16, true);", // IID865 - "__ eshldq(r31, r31, r19, 2, true);", // IID866 - "__ eshrdq(r30, r20, r11, 8, false);", // IID867 - "__ eshrdq(rdx, rdx, r15, 1, false);", // IID868 - "__ eshrdq(r28, r30, r14, 2, true);", // IID869 - "__ eshrdq(r20, r20, r16, 1, true);", // IID870 - "__ ecmovq (Assembler::Condition::overflow, r21, r17, r28);", // IID871 - "__ ecmovq (Assembler::Condition::overflow, r15, r15, r30);", // IID872 - "__ ecmovq (Assembler::Condition::noOverflow, rcx, r15, r15);", // IID873 - "__ ecmovq (Assembler::Condition::noOverflow, rcx, rcx, r13);", // IID874 - "__ ecmovq (Assembler::Condition::below, rdx, r26, r26);", // IID875 - "__ ecmovq (Assembler::Condition::below, r28, r28, r15);", // IID876 - "__ ecmovq (Assembler::Condition::aboveEqual, r8, rdx, rcx);", // IID877 - "__ ecmovq (Assembler::Condition::aboveEqual, rcx, rcx, rcx);", // IID878 - "__ ecmovq (Assembler::Condition::zero, r10, r13, r9);", // IID879 - "__ ecmovq (Assembler::Condition::zero, r14, r14, r27);", // IID880 - "__ ecmovq (Assembler::Condition::notZero, r11, r23, r9);", // IID881 - "__ ecmovq (Assembler::Condition::notZero, r11, r11, rdx);", // IID882 - "__ ecmovq (Assembler::Condition::belowEqual, r31, r14, r25);", // IID883 - "__ ecmovq (Assembler::Condition::belowEqual, r20, r20, r12);", // IID884 - "__ ecmovq (Assembler::Condition::above, rdx, r10, r28);", // IID885 - "__ ecmovq (Assembler::Condition::above, r8, r8, r17);", // IID886 - "__ ecmovq (Assembler::Condition::negative, rcx, r30, r23);", // IID887 - "__ ecmovq (Assembler::Condition::negative, r26, r26, r18);", // IID888 - "__ ecmovq (Assembler::Condition::positive, rdx, rbx, r18);", // IID889 - "__ ecmovq (Assembler::Condition::positive, r21, r21, r13);", // IID890 - "__ ecmovq (Assembler::Condition::parity, r27, r28, r27);", // IID891 - "__ ecmovq (Assembler::Condition::parity, r11, r11, r30);", // IID892 - "__ ecmovq (Assembler::Condition::noParity, rcx, r21, r18);", // IID893 - "__ ecmovq (Assembler::Condition::noParity, rcx, rcx, r29);", // IID894 - "__ ecmovq (Assembler::Condition::less, rdx, r21, r12);", // IID895 - "__ ecmovq (Assembler::Condition::less, rdx, rdx, r26);", // IID896 - "__ ecmovq (Assembler::Condition::greaterEqual, r17, rbx, r22);", // IID897 - "__ ecmovq (Assembler::Condition::greaterEqual, rdx, rdx, r11);", // IID898 - "__ ecmovq (Assembler::Condition::lessEqual, rdx, r14, r8);", // IID899 - "__ ecmovq (Assembler::Condition::lessEqual, r14, r14, r8);", // IID900 - "__ ecmovq (Assembler::Condition::greater, r25, r29, r21);", // IID901 - "__ ecmovq (Assembler::Condition::greater, r26, r26, r30);", // IID902 - "__ ecmovq (Assembler::Condition::overflow, r24, r21, Address(r13, r11, (Address::ScaleFactor)1, +0x439c521e));", // IID903 - "__ ecmovq (Assembler::Condition::noOverflow, r11, r18, Address(r29, r16, (Address::ScaleFactor)0, +0x632127f));", // IID904 - "__ ecmovq (Assembler::Condition::below, r16, r8, Address(r8, r26, (Address::ScaleFactor)1, +0x10633def));", // IID905 - "__ ecmovq (Assembler::Condition::aboveEqual, r13, r14, Address(r18, -0x54f69e38));", // IID906 - "__ ecmovq (Assembler::Condition::zero, r12, r8, Address(r31, r26, (Address::ScaleFactor)1, -0x7a1e447a));", // IID907 - "__ ecmovq (Assembler::Condition::notZero, r29, r29, Address(r19, r11, (Address::ScaleFactor)2, -0x35d82dd2));", // IID908 - "__ ecmovq (Assembler::Condition::belowEqual, rcx, r18, Address(r25, r28, (Address::ScaleFactor)0, +0x30be64a0));", // IID909 - "__ ecmovq (Assembler::Condition::above, r28, r12, Address(r10, r16, (Address::ScaleFactor)1, -0x22b8fefa));", // IID910 - "__ ecmovq (Assembler::Condition::negative, r11, r8, Address(rbx, r11, (Address::ScaleFactor)3, +0x25cc9e96));", // IID911 - "__ ecmovq (Assembler::Condition::positive, r12, r27, Address(r11, -0xc2d70fe));", // IID912 - "__ ecmovq (Assembler::Condition::parity, r8, r26, Address(r19, rbx, (Address::ScaleFactor)1, -0x486db7ea));", // IID913 - "__ ecmovq (Assembler::Condition::noParity, r30, r10, Address(r14, r18, (Address::ScaleFactor)3, +0x14884884));", // IID914 - "__ ecmovq (Assembler::Condition::less, r27, r8, Address(r29, r14, (Address::ScaleFactor)2, +0x92b7a8));", // IID915 - "__ ecmovq (Assembler::Condition::greaterEqual, r14, r28, Address(r19, rdx, (Address::ScaleFactor)0, +0x9c2d45));", // IID916 - "__ ecmovq (Assembler::Condition::lessEqual, r25, r8, Address(rcx, r18, (Address::ScaleFactor)2, +0x6655c86b));", // IID917 - "__ ecmovq (Assembler::Condition::greater, r19, r21, Address(r10, r25, (Address::ScaleFactor)0, -0x1005430b));", // IID918 + "__ eandl(r30, Address(rbx, rdx, (Address::ScaleFactor)3, -0x463540b4), r28, false);", // IID271 + "__ eandl(r18, Address(r28, r10, (Address::ScaleFactor)3, +0x3523a73b), r18, false);", // IID272 + "__ eandl(r9, Address(r15, r15, (Address::ScaleFactor)1, -0x2a0bdd56), r21, true);", // IID273 + "__ eandl(r16, Address(r23, -0x165064ff), r16, true);", // IID274 + "__ eorl(r28, Address(r30, r11, (Address::ScaleFactor)0, +0x17281e3a), r20, false);", // IID275 + "__ eorl(rdx, Address(rbx, r31, (Address::ScaleFactor)2, +0x2477b5bb), rdx, false);", // IID276 + "__ eorl(r16, Address(r11, rcx, (Address::ScaleFactor)1, -0x3175d1af), r24, true);", // IID277 + "__ eorl(rbx, Address(r11, r20, (Address::ScaleFactor)3, -0x22d67bd3), rbx, true);", // IID278 + "__ eorb(r26, Address(r27, r30, (Address::ScaleFactor)1, -0x3d9bce2e), rdx, false);", // IID279 + "__ eorb(r31, Address(r22, r29, (Address::ScaleFactor)1, +0x14218519), r31, false);", // IID280 + "__ eorb(r21, Address(r9, -0x1050127a), r13, true);", // IID281 + "__ eorb(r31, Address(r9, r8, (Address::ScaleFactor)0, -0xae18961), r31, true);", // IID282 + "__ esubl(r15, Address(r18, +0x5c2bbce5), r12, false);", // IID283 + "__ esubl(r27, Address(r25, r23, (Address::ScaleFactor)0, +0x5c6078b3), r27, false);", // IID284 + "__ esubl(r18, Address(r8, rdx, (Address::ScaleFactor)3, -0x9ed3881), r14, true);", // IID285 + "__ esubl(r9, Address(r15, +0x775acdad), r9, true);", // IID286 + "__ exorl(r21, Address(r18, r26, (Address::ScaleFactor)1, +0x2fe31fd5), r23, false);", // IID287 + "__ exorl(r10, Address(r27, +0xa3150de), r10, false);", // IID288 + "__ exorl(r18, Address(r22, r30, (Address::ScaleFactor)3, +0x1ad4e897), r24, true);", // IID289 + "__ exorl(r8, Address(r16, r20, (Address::ScaleFactor)0, +0x626eae82), r8, true);", // IID290 + "__ exorb(r16, Address(r21, r15, (Address::ScaleFactor)0, -0x1403b60d), r18, false);", // IID291 + "__ exorb(r13, Address(r19, r23, (Address::ScaleFactor)2, +0x237ef1e1), r13, false);", // IID292 + "__ exorb(r29, Address(r18, r14, (Address::ScaleFactor)2, +0x5cc0095b), r14, true);", // IID293 + "__ exorb(r27, Address(r25, r20, (Address::ScaleFactor)3, +0x1cf7b958), r27, true);", // IID294 + "__ eaddl(r16, r24, 16, false);", // IID295 + "__ eaddl(rax, r24, 16, false);", // IID296 + "__ eaddl(r21, r21, 65536, false);", // IID297 + "__ eaddl(r24, r8, 1048576, true);", // IID298 + "__ eaddl(rax, r13, 1048576, true);", // IID299 + "__ eaddl(r29, r29, 16777216, true);", // IID300 + "__ eandl(r12, r12, 16, false);", // IID301 + "__ eandl(rax, r30, 16, false);", // IID302 + "__ eandl(r24, r24, 16, false);", // IID303 + "__ eandl(r8, r12, 1, true);", // IID304 + "__ eandl(rax, r13, 1, true);", // IID305 + "__ eandl(r25, r25, 16, true);", // IID306 + "__ eimull(r18, r23, 65536, false);", // IID307 + "__ eimull(rax, r9, 65536, false);", // IID308 + "__ eimull(r26, r26, 268435456, false);", // IID309 + "__ eimull(r25, r21, 1, true);", // IID310 + "__ eimull(rax, r24, 1, true);", // IID311 + "__ eimull(r24, r24, 16777216, true);", // IID312 + "__ eorl(r30, r26, 1, false);", // IID313 + "__ eorl(rax, r22, 1, false);", // IID314 + "__ eorl(r17, r17, 1048576, false);", // IID315 + "__ eorl(r24, r8, 1, true);", // IID316 + "__ eorl(rax, r27, 1, true);", // IID317 +#endif // _LP64 + "__ eorl(rdx, rdx, 268435456, true);", // IID318 +#ifdef _LP64 + "__ ercll(r22, r22, 8);", // IID319 + "__ ercll(rax, r23, 8);", // IID320 + "__ ercll(r19, r19, 4);", // IID321 + "__ eroll(r30, r24, 2, false);", // IID322 + "__ eroll(rax, r29, 2, false);", // IID323 + "__ eroll(r8, r8, 2, false);", // IID324 + "__ eroll(r18, r24, 16, true);", // IID325 + "__ eroll(rax, r13, 16, true);", // IID326 + "__ eroll(r24, r24, 1, true);", // IID327 + "__ erorl(r28, r17, 16, false);", // IID328 + "__ erorl(rax, r24, 16, false);", // IID329 + "__ erorl(r17, r17, 4, false);", // IID330 + "__ erorl(r24, rcx, 4, true);", // IID331 + "__ erorl(rax, r16, 4, true);", // IID332 + "__ erorl(r15, r15, 2, true);", // IID333 + "__ esall(r14, r27, 4, false);", // IID334 + "__ esall(rax, r23, 4, false);", // IID335 + "__ esall(r30, r30, 4, false);", // IID336 + "__ esall(r27, rdx, 2, true);", // IID337 + "__ esall(rax, r19, 2, true);", // IID338 + "__ esall(r20, r20, 2, true);", // IID339 + "__ esarl(r21, r23, 1, false);", // IID340 + "__ esarl(rax, r30, 1, false);", // IID341 + "__ esarl(r25, r25, 2, false);", // IID342 + "__ esarl(r24, r19, 4, true);", // IID343 + "__ esarl(rax, r14, 4, true);", // IID344 + "__ esarl(r26, r26, 16, true);", // IID345 + "__ eshll(r22, r13, 8, false);", // IID346 + "__ eshll(rax, r24, 8, false);", // IID347 + "__ eshll(r14, r14, 16, false);", // IID348 + "__ eshll(r28, r25, 8, true);", // IID349 + "__ eshll(rax, r10, 8, true);", // IID350 + "__ eshll(r20, r20, 1, true);", // IID351 + "__ eshrl(r12, rbx, 4, false);", // IID352 + "__ eshrl(rax, r23, 4, false);", // IID353 + "__ eshrl(r28, r28, 16, false);", // IID354 + "__ eshrl(r24, r30, 4, true);", // IID355 + "__ eshrl(rax, r31, 4, true);", // IID356 + "__ eshrl(r31, r31, 2, true);", // IID357 + "__ esubl(r20, r10, 256, false);", // IID358 + "__ esubl(rax, r13, 256, false);", // IID359 + "__ esubl(r25, r25, 256, false);", // IID360 + "__ esubl(r23, r12, 268435456, true);", // IID361 + "__ esubl(rax, r16, 268435456, true);", // IID362 + "__ esubl(r31, r31, 1, true);", // IID363 + "__ exorl(r9, r15, 16777216, false);", // IID364 + "__ exorl(rax, r13, 16777216, false);", // IID365 + "__ exorl(r28, r28, 16, false);", // IID366 + "__ exorl(r29, r22, 16, true);", // IID367 +#endif // _LP64 + "__ exorl(rax, rbx, 16, true);", // IID368 +#ifdef _LP64 + "__ exorl(r8, r8, 16, true);", // IID369 + "__ esubl_imm32(r16, r13, 4194304, false);", // IID370 + "__ esubl_imm32(rax, r12, 4194304, false);", // IID371 + "__ esubl_imm32(r17, r17, 67108864, false);", // IID372 + "__ esubl_imm32(r22, r26, 1073741824, true);", // IID373 + "__ esubl_imm32(rax, r10, 1073741824, true);", // IID374 + "__ esubl_imm32(r11, r11, 1073741824, true);", // IID375 + "__ eaddl(r19, r12, Address(r30, r8, (Address::ScaleFactor)0, +0x6a1a0a73), false);", // IID376 + "__ eaddl(r30, r30, Address(r18, r19, (Address::ScaleFactor)2, +0x25f990cf), false);", // IID377 + "__ eaddl(rcx, r25, Address(r19, r16, (Address::ScaleFactor)0, +0x482d5dbc), true);", // IID378 + "__ eaddl(r9, r9, Address(r11, +0x43d5ee01), true);", // IID379 + "__ eandl(rcx, r23, Address(r21, r15, (Address::ScaleFactor)2, +0x2825c2bc), false);", // IID380 + "__ eandl(r27, r27, Address(r13, r15, (Address::ScaleFactor)3, -0x1268b895), false);", // IID381 + "__ eandl(r9, r23, Address(r22, r30, (Address::ScaleFactor)0, -0x715acbb), true);", // IID382 + "__ eandl(rbx, rbx, Address(r28, r16, (Address::ScaleFactor)2, +0xb0223ee), true);", // IID383 + "__ eimull(r15, r29, Address(r15, r28, (Address::ScaleFactor)1, -0x1f297a69), false);", // IID384 + "__ eimull(r17, r17, Address(r23, rbx, (Address::ScaleFactor)1, +0xadc7545), false);", // IID385 + "__ eimull(r27, r9, Address(rdx, r22, (Address::ScaleFactor)2, -0x43d90f61), true);", // IID386 + "__ eimull(rbx, rbx, Address(r28, r22, (Address::ScaleFactor)3, -0x519d9a27), true);", // IID387 + "__ eorl(r17, rcx, Address(r14, +0x10642223), false);", // IID388 + "__ eorl(r26, r26, Address(r31, -0x7a9a83ba), false);", // IID389 + "__ eorl(r15, r22, Address(r12, r12, (Address::ScaleFactor)2, +0x743b6997), true);", // IID390 + "__ eorl(r8, r8, Address(rdx, r22, (Address::ScaleFactor)3, -0x588414dc), true);", // IID391 + "__ esubl(rcx, r28, Address(r30, r13, (Address::ScaleFactor)2, +0xe9310e5), false);", // IID392 + "__ esubl(rcx, rcx, Address(r30, r10, (Address::ScaleFactor)1, -0x1b076ed1), false);", // IID393 + "__ esubl(r9, r21, Address(r30, +0x2f79ffd3), true);", // IID394 + "__ esubl(r16, r16, Address(rdx, r14, (Address::ScaleFactor)2, +0x675d71c1), true);", // IID395 + "__ exorl(r27, r28, Address(rbx, r26, (Address::ScaleFactor)2, -0x78c20b81), false);", // IID396 + "__ exorl(r14, r14, Address(r31, r19, (Address::ScaleFactor)1, -0x4ff251cc), false);", // IID397 + "__ exorl(r20, r18, Address(r13, r16, (Address::ScaleFactor)2, -0x19efc6e2), true);", // IID398 + "__ exorl(r19, r19, Address(r13, r23, (Address::ScaleFactor)1, -0x2d1bd8aa), true);", // IID399 + "__ exorb(r29, r17, Address(rdx, r29, (Address::ScaleFactor)2, +0x66573e84), false);", // IID400 + "__ exorb(r22, r22, Address(r24, r25, (Address::ScaleFactor)3, +0x3a94a93f), false);", // IID401 + "__ exorb(r13, r29, Address(r15, r23, (Address::ScaleFactor)1, +0x76d43532), true);", // IID402 + "__ exorb(r15, r15, Address(r13, r9, (Address::ScaleFactor)0, -0x474e6d1a), true);", // IID403 + "__ exorw(r17, r16, Address(r23, rdx, (Address::ScaleFactor)0, +0x562a291), false);", // IID404 + "__ exorw(r29, r29, Address(r18, r28, (Address::ScaleFactor)3, -0x541967f2), false);", // IID405 + "__ exorw(r27, r11, Address(r10, +0xa911c5a), true);", // IID406 + "__ exorw(r31, r31, Address(r30, r19, (Address::ScaleFactor)2, -0xf6a3da), true);", // IID407 + "__ eaddl(r12, r13, r23, false);", // IID408 + "__ eaddl(r28, r28, r20, false);", // IID409 + "__ eaddl(r20, r24, r20, false);", // IID410 + "__ eaddl(r11, r10, r15, true);", // IID411 + "__ eaddl(r19, r19, r20, true);", // IID412 + "__ eaddl(r23, r15, r23, true);", // IID413 + "__ eandl(r26, r19, r24, false);", // IID414 + "__ eandl(r23, r23, r28, false);", // IID415 + "__ eandl(r11, r13, r11, false);", // IID416 + "__ eandl(r13, rdx, r31, true);", // IID417 + "__ eandl(r23, r23, r23, true);", // IID418 + "__ eandl(r9, r27, r9, true);", // IID419 + "__ eimull(r21, r20, r24, false);", // IID420 + "__ eimull(r21, r21, r29, false);", // IID421 + "__ eimull(rbx, r11, rbx, false);", // IID422 + "__ eimull(r21, rbx, rcx, true);", // IID423 + "__ eimull(r31, r31, r21, true);", // IID424 + "__ eimull(r15, r25, r15, true);", // IID425 + "__ eorw(r30, r23, r25, false);", // IID426 + "__ eorw(r18, r18, rcx, false);", // IID427 + "__ eorw(r10, rcx, r10, false);", // IID428 + "__ eorw(r31, r21, r26, true);", // IID429 + "__ eorw(r21, r21, r19, true);", // IID430 +#endif // _LP64 + "__ eorw(rdx, rbx, rdx, true);", // IID431 +#ifdef _LP64 + "__ eorl(rcx, r24, r22, false);", // IID432 + "__ eorl(rcx, rcx, r19, false);", // IID433 + "__ eorl(r27, r27, r27, false);", // IID434 + "__ eorl(r31, r9, r13, true);", // IID435 + "__ eorl(r31, r31, r23, true);", // IID436 + "__ eorl(r19, r17, r19, true);", // IID437 + "__ eshldl(r20, r16, r24, false);", // IID438 + "__ eshldl(rdx, rdx, r12, false);", // IID439 + "__ eshldl(r29, r9, r31, true);", // IID440 + "__ eshldl(r17, r17, r20, true);", // IID441 + "__ eshrdl(r20, r15, r18, false);", // IID442 + "__ eshrdl(rcx, rcx, r12, false);", // IID443 + "__ eshrdl(r14, r9, r23, true);", // IID444 + "__ eshrdl(r19, r19, r13, true);", // IID445 + "__ esubl(r30, r27, r27, false);", // IID446 + "__ esubl(rdx, rdx, r11, false);", // IID447 + "__ esubl(r15, r11, r24, true);", // IID448 + "__ esubl(r14, r14, r25, true);", // IID449 + "__ exorl(r31, r16, r12, false);", // IID450 + "__ exorl(r20, r20, r14, false);", // IID451 + "__ exorl(r30, r13, r30, false);", // IID452 + "__ exorl(r24, r17, r17, true);", // IID453 + "__ exorl(r26, r26, r21, true);", // IID454 + "__ exorl(r11, r13, r11, true);", // IID455 + "__ eshldl(r27, r25, r21, 4, false);", // IID456 + "__ eshldl(r22, r22, r10, 4, false);", // IID457 + "__ eshldl(r21, r15, r24, 16, true);", // IID458 + "__ eshldl(rdx, rdx, r19, 1, true);", // IID459 + "__ eshrdl(r23, r13, r8, 16, false);", // IID460 + "__ eshrdl(r26, r26, r22, 1, false);", // IID461 + "__ eshrdl(r24, r9, r30, 16, true);", // IID462 + "__ eshrdl(r19, r19, r8, 4, true);", // IID463 + "__ ecmovl (Assembler::Condition::overflow, r30, r26, r17);", // IID464 + "__ ecmovl (Assembler::Condition::overflow, r14, r14, r26);", // IID465 + "__ ecmovl (Assembler::Condition::noOverflow, r24, r19, r29);", // IID466 + "__ ecmovl (Assembler::Condition::noOverflow, r25, r25, r20);", // IID467 + "__ ecmovl (Assembler::Condition::below, r11, r10, r14);", // IID468 + "__ ecmovl (Assembler::Condition::below, r30, r30, r25);", // IID469 + "__ ecmovl (Assembler::Condition::aboveEqual, r13, r22, r27);", // IID470 + "__ ecmovl (Assembler::Condition::aboveEqual, r16, r16, r24);", // IID471 + "__ ecmovl (Assembler::Condition::zero, r28, r13, r30);", // IID472 + "__ ecmovl (Assembler::Condition::zero, r30, r30, r24);", // IID473 + "__ ecmovl (Assembler::Condition::notZero, r21, r20, r31);", // IID474 + "__ ecmovl (Assembler::Condition::notZero, r8, r8, r16);", // IID475 + "__ ecmovl (Assembler::Condition::belowEqual, r15, r26, r22);", // IID476 + "__ ecmovl (Assembler::Condition::belowEqual, r31, r31, rdx);", // IID477 + "__ ecmovl (Assembler::Condition::above, r27, r8, r10);", // IID478 + "__ ecmovl (Assembler::Condition::above, r18, r18, r11);", // IID479 + "__ ecmovl (Assembler::Condition::negative, r27, rbx, r21);", // IID480 + "__ ecmovl (Assembler::Condition::negative, r12, r12, r31);", // IID481 + "__ ecmovl (Assembler::Condition::positive, r12, rdx, r18);", // IID482 + "__ ecmovl (Assembler::Condition::positive, r18, r18, r19);", // IID483 + "__ ecmovl (Assembler::Condition::parity, r16, r20, r23);", // IID484 + "__ ecmovl (Assembler::Condition::parity, r18, r18, r16);", // IID485 + "__ ecmovl (Assembler::Condition::noParity, rbx, r31, r30);", // IID486 + "__ ecmovl (Assembler::Condition::noParity, r31, r31, r29);", // IID487 + "__ ecmovl (Assembler::Condition::less, r28, r25, r10);", // IID488 + "__ ecmovl (Assembler::Condition::less, r24, r24, r20);", // IID489 + "__ ecmovl (Assembler::Condition::greaterEqual, r16, rdx, r26);", // IID490 + "__ ecmovl (Assembler::Condition::greaterEqual, r28, r28, r28);", // IID491 + "__ ecmovl (Assembler::Condition::lessEqual, r9, r20, r24);", // IID492 + "__ ecmovl (Assembler::Condition::lessEqual, r24, r24, r29);", // IID493 + "__ ecmovl (Assembler::Condition::greater, r23, r27, r15);", // IID494 + "__ ecmovl (Assembler::Condition::greater, r12, r12, r18);", // IID495 + "__ ecmovl (Assembler::Condition::overflow, r19, r9, Address(r31, rcx, (Address::ScaleFactor)1, -0x2be98bd));", // IID496 + "__ ecmovl (Assembler::Condition::overflow, r8, r8, Address(r21, r24, (Address::ScaleFactor)1, +0x41e6a0cb));", // IID497 + "__ ecmovl (Assembler::Condition::noOverflow, r23, r15, Address(r19, r30, (Address::ScaleFactor)3, -0x55adfe2d));", // IID498 + "__ ecmovl (Assembler::Condition::noOverflow, rdx, rdx, Address(r27, rdx, (Address::ScaleFactor)0, -0x1aa12735));", // IID499 + "__ ecmovl (Assembler::Condition::below, rbx, r29, Address(r31, r12, (Address::ScaleFactor)0, +0xbd42246));", // IID500 + "__ ecmovl (Assembler::Condition::below, r21, r21, Address(r19, r21, (Address::ScaleFactor)1, -0x41518818));", // IID501 + "__ ecmovl (Assembler::Condition::aboveEqual, r23, r29, Address(r22, r9, (Address::ScaleFactor)2, -0x35addbd8));", // IID502 + "__ ecmovl (Assembler::Condition::aboveEqual, r18, r18, Address(r25, +0x632184c3));", // IID503 + "__ ecmovl (Assembler::Condition::zero, r29, r13, Address(r18, r13, (Address::ScaleFactor)0, -0x3972eac6));", // IID504 + "__ ecmovl (Assembler::Condition::zero, r29, r29, Address(r12, r9, (Address::ScaleFactor)3, -0x668cdfd2));", // IID505 + "__ ecmovl (Assembler::Condition::notZero, r25, r18, Address(r9, r22, (Address::ScaleFactor)2, +0x7f6ac91f));", // IID506 + "__ ecmovl (Assembler::Condition::notZero, r28, r28, Address(r30, +0x562e6594));", // IID507 + "__ ecmovl (Assembler::Condition::belowEqual, r27, r24, Address(r15, r20, (Address::ScaleFactor)2, -0x466538b7));", // IID508 + "__ ecmovl (Assembler::Condition::belowEqual, r25, r25, Address(r26, r11, (Address::ScaleFactor)3, -0x593812a9));", // IID509 + "__ ecmovl (Assembler::Condition::above, rcx, r20, Address(r16, -0x1389a3eb));", // IID510 + "__ ecmovl (Assembler::Condition::above, rbx, rbx, Address(r29, r8, (Address::ScaleFactor)0, +0x1d022615));", // IID511 + "__ ecmovl (Assembler::Condition::negative, rdx, r14, Address(r12, r28, (Address::ScaleFactor)1, -0x51725a91));", // IID512 + "__ ecmovl (Assembler::Condition::negative, r24, r24, Address(r17, r18, (Address::ScaleFactor)1, -0x1725c4e4));", // IID513 + "__ ecmovl (Assembler::Condition::positive, rcx, rcx, Address(r15, r23, (Address::ScaleFactor)2, -0x6bd22ccf));", // IID514 + "__ ecmovl (Assembler::Condition::positive, r24, r24, Address(r15, r10, (Address::ScaleFactor)1, -0x7ffb3d09));", // IID515 + "__ ecmovl (Assembler::Condition::parity, r23, rcx, Address(r11, r23, (Address::ScaleFactor)0, +0x3738c585));", // IID516 + "__ ecmovl (Assembler::Condition::parity, r24, r24, Address(r30, r10, (Address::ScaleFactor)0, +0xfcc15a8));", // IID517 + "__ ecmovl (Assembler::Condition::noParity, r14, r26, Address(r14, r21, (Address::ScaleFactor)1, -0x4430ce9f));", // IID518 + "__ ecmovl (Assembler::Condition::noParity, r10, r10, Address(r28, +0x3d7c59f));", // IID519 + "__ ecmovl (Assembler::Condition::less, r10, r21, Address(r8, r8, (Address::ScaleFactor)3, +0x4a6584b4));", // IID520 + "__ ecmovl (Assembler::Condition::less, r26, r26, Address(r19, r20, (Address::ScaleFactor)3, +0x47c660ef));", // IID521 + "__ ecmovl (Assembler::Condition::greaterEqual, r26, r10, Address(rcx, +0x61977a97));", // IID522 + "__ ecmovl (Assembler::Condition::greaterEqual, r30, r30, Address(r15, r19, (Address::ScaleFactor)3, +0x53c601cb));", // IID523 + "__ ecmovl (Assembler::Condition::lessEqual, r14, r9, Address(r17, -0x566ceee2));", // IID524 + "__ ecmovl (Assembler::Condition::lessEqual, r15, r15, Address(r27, r20, (Address::ScaleFactor)0, +0x76164792));", // IID525 + "__ ecmovl (Assembler::Condition::greater, r27, r14, Address(r9, r13, (Address::ScaleFactor)2, +0xf5752d7));", // IID526 + "__ ecmovl (Assembler::Condition::greater, r12, r12, Address(rbx, rcx, (Address::ScaleFactor)3, -0x5501b4c6));", // IID527 + "__ adcq(r30, r31);", // IID528 + "__ cmpq(r12, rdx);", // IID529 + "__ imulq(r21, r24);", // IID530 + "__ popcntq(r9, r25);", // IID531 + "__ sbbq(r8, r12);", // IID532 + "__ subq(r31, r24);", // IID533 + "__ tzcntq(r10, r16);", // IID534 + "__ lzcntq(r20, r21);", // IID535 + "__ addq(rdx, r17);", // IID536 + "__ andq(r14, r13);", // IID537 + "__ orq(r20, r24);", // IID538 + "__ xorq(r21, r22);", // IID539 + "__ movq(r12, r27);", // IID540 + "__ bsfq(r23, rdx);", // IID541 + "__ bsrq(r31, r28);", // IID542 + "__ btq(r8, r25);", // IID543 + "__ xchgq(r21, rbx);", // IID544 + "__ testq(r23, r23);", // IID545 + "__ addq(Address(r19, -0x180d3ea1), r10);", // IID546 + "__ andq(Address(r11, r17, (Address::ScaleFactor)1, -0x78976be8), r25);", // IID547 + "__ cmpq(Address(rbx, r28, (Address::ScaleFactor)3, +0x35f72102), r13);", // IID548 + "__ orq(Address(r8, -0x34465011), r21);", // IID549 + "__ xorq(Address(r19, -0x404b22dd), r18);", // IID550 + "__ subq(Address(r23, r27, (Address::ScaleFactor)3, -0x428d2646), r14);", // IID551 + "__ movq(Address(r9, rcx, (Address::ScaleFactor)2, -0x72611661), r28);", // IID552 + "__ xaddq(Address(r24, r21, (Address::ScaleFactor)2, +0x3a6be990), rbx);", // IID553 + "__ andq(Address(r22, r10, (Address::ScaleFactor)0, +0x7ef8bdd), 1048576);", // IID554 + "__ addq(Address(r13, r28, (Address::ScaleFactor)0, -0x754789b1), 65536);", // IID555 + "__ cmpq(Address(r10, -0xbd2a8da), 268435456);", // IID556 + "__ sarq(Address(r23, r14, (Address::ScaleFactor)1, +0x6a16d9f5), 4);", // IID557 + "__ salq(Address(rcx, r21, (Address::ScaleFactor)1, +0x5f66ac1e), 8);", // IID558 + "__ sbbq(Address(rcx, r22, (Address::ScaleFactor)3, -0x48c954c), 268435456);", // IID559 + "__ shrq(Address(r21, r30, (Address::ScaleFactor)0, +0xe405b0b), 8);", // IID560 + "__ subq(Address(r19, r29, (Address::ScaleFactor)3, -0x7762044b), 4096);", // IID561 + "__ xorq(Address(r30, r10, (Address::ScaleFactor)1, -0x19798323), 16);", // IID562 + "__ orq(Address(rdx, r24, (Address::ScaleFactor)3, +0x18d9b316), 4096);", // IID563 + "__ movq(Address(rbx, -0x3058074d), 256);", // IID564 + "__ testq(Address(r28, r21, (Address::ScaleFactor)3, +0x65a0fdc4), -268435456);", // IID565 + "__ addq(r23, Address(r11, r18, (Address::ScaleFactor)0, -0x1d1af10c));", // IID566 + "__ andq(r22, Address(r18, r12, (Address::ScaleFactor)1, +0x1a5f1c38));", // IID567 + "__ cmpq(r23, Address(r30, r19, (Address::ScaleFactor)0, -0x3e912f7f));", // IID568 + "__ lzcntq(r29, Address(rcx, +0x12e3fbe4));", // IID569 + "__ orq(r14, Address(r21, r21, (Address::ScaleFactor)2, +0xd73042));", // IID570 + "__ adcq(r31, Address(r17, r31, (Address::ScaleFactor)2, +0xabde912));", // IID571 + "__ imulq(r20, Address(r13, r27, (Address::ScaleFactor)0, -0x58dbfc1f));", // IID572 + "__ popcntq(rbx, Address(r22, -0x72c66c23));", // IID573 + "__ sbbq(r26, Address(r9, +0x334aba09));", // IID574 + "__ subq(r9, Address(r9, r30, (Address::ScaleFactor)3, -0x219a6102));", // IID575 + "__ tzcntq(r25, Address(r20, -0x2131bab1));", // IID576 + "__ xorq(r16, Address(r28, r16, (Address::ScaleFactor)1, +0x48c483b9));", // IID577 + "__ movq(r30, Address(r9, r16, (Address::ScaleFactor)0, -0x88ce84f));", // IID578 + "__ leaq(r11, Address(r30, r29, (Address::ScaleFactor)2, +0x3eeb8fd0));", // IID579 + "__ cvttsd2siq(r26, Address(r29, r10, (Address::ScaleFactor)3, +0x3ef4822e));", // IID580 + "__ xchgq(r29, Address(r19, r20, (Address::ScaleFactor)2, -0x3f0f3db9));", // IID581 + "__ testq(r8, Address(r30, r20, (Address::ScaleFactor)0, +0x15b56a17));", // IID582 + "__ addq(r26, 4096);", // IID583 + "__ andq(r20, 16);", // IID584 + "__ adcq(r23, 1048576);", // IID585 + "__ cmpq(r12, 4096);", // IID586 + "__ rclq(rcx, 4);", // IID587 + "__ rcrq(r14, 1);", // IID588 + "__ rolq(r23, 2);", // IID589 + "__ rorq(r12, 4);", // IID590 + "__ sarq(r10, 4);", // IID591 + "__ salq(r20, 4);", // IID592 + "__ sbbq(rcx, 1048576);", // IID593 + "__ shlq(r23, 16);", // IID594 + "__ shrq(r27, 2);", // IID595 + "__ subq(rcx, 65536);", // IID596 + "__ xorq(r9, 1048576);", // IID597 + "__ movq(r16, 65536);", // IID598 + "__ mov64(r24, 4503599627370496);", // IID599 + "__ btq(r18, 64);", // IID600 + "__ testq(r29, -4096);", // IID601 + "__ orq_imm32(r30, 67108864);", // IID602 + "__ subq_imm32(r25, 268435456);", // IID603 + "__ cmovq(Assembler::Condition::overflow, r30, Address(r17, r31, (Address::ScaleFactor)2, +0x47ff92f0));", // IID604 + "__ cmovq(Assembler::Condition::noOverflow, r9, Address(r24, r28, (Address::ScaleFactor)1, +0x384904c0));", // IID605 + "__ cmovq(Assembler::Condition::below, r23, Address(r23, r24, (Address::ScaleFactor)3, -0x197f1266));", // IID606 + "__ cmovq(Assembler::Condition::aboveEqual, r9, Address(r29, r30, (Address::ScaleFactor)0, +0x2b5d49c8));", // IID607 + "__ cmovq(Assembler::Condition::zero, r16, Address(rbx, r15, (Address::ScaleFactor)1, +0x22379381));", // IID608 + "__ cmovq(Assembler::Condition::notZero, r8, Address(r11, +0x49d67a0));", // IID609 + "__ cmovq(Assembler::Condition::belowEqual, r28, Address(r16, r16, (Address::ScaleFactor)2, -0x5e941da9));", // IID610 + "__ cmovq(Assembler::Condition::above, r19, Address(r18, r8, (Address::ScaleFactor)0, -0xa5e55ec));", // IID611 + "__ cmovq(Assembler::Condition::negative, r28, Address(r17, r28, (Address::ScaleFactor)1, -0x3264220c));", // IID612 + "__ cmovq(Assembler::Condition::positive, r31, Address(r14, r31, (Address::ScaleFactor)1, +0x5001bc5a));", // IID613 + "__ cmovq(Assembler::Condition::parity, rbx, Address(r18, r17, (Address::ScaleFactor)2, -0x286f2379));", // IID614 + "__ cmovq(Assembler::Condition::noParity, r17, Address(r20, -0x5549f838));", // IID615 + "__ cmovq(Assembler::Condition::less, r30, Address(r9, r28, (Address::ScaleFactor)1, -0x25b00cf3));", // IID616 + "__ cmovq(Assembler::Condition::greaterEqual, r19, Address(r9, -0x2aabf22c));", // IID617 + "__ cmovq(Assembler::Condition::lessEqual, rbx, Address(rcx, r12, (Address::ScaleFactor)1, -0x432d68cc));", // IID618 + "__ cmovq(Assembler::Condition::greater, rbx, Address(r15, r17, (Address::ScaleFactor)3, -0x2b97565e));", // IID619 + "__ call(r24);", // IID620 + "__ divq(r9);", // IID621 + "__ idivq(r28);", // IID622 + "__ imulq(rdx);", // IID623 + "__ mulq(r31);", // IID624 + "__ negq(r12);", // IID625 + "__ notq(r12);", // IID626 + "__ rolq(r24);", // IID627 + "__ rorq(r28);", // IID628 + "__ sarq(r11);", // IID629 + "__ salq(r27);", // IID630 + "__ shlq(r23);", // IID631 + "__ shrq(r17);", // IID632 + "__ incrementq(r16);", // IID633 + "__ decrementq(r12);", // IID634 + "__ pushp(r23);", // IID635 + "__ popp(r24);", // IID636 + "__ call(Address(r18, r14, (Address::ScaleFactor)0, -0x66639d32));", // IID637 + "__ mulq(Address(r24, -0x660a2421));", // IID638 + "__ negq(Address(r14, r18, (Address::ScaleFactor)0, +0x40f3936e));", // IID639 + "__ sarq(Address(r10, r13, (Address::ScaleFactor)0, +0x7d04cb72));", // IID640 + "__ salq(Address(r18, r11, (Address::ScaleFactor)3, -0x2176b4dc));", // IID641 + "__ shrq(Address(r13, rcx, (Address::ScaleFactor)1, +0x7996aa80));", // IID642 + "__ incrementq(Address(r14, +0x67c2d02a));", // IID643 + "__ decrementq(Address(r22, r26, (Address::ScaleFactor)0, +0x224f62c0));", // IID644 + "__ imulq(rdx, Address(r31, rbx, (Address::ScaleFactor)1, +0x2b00bb10), 16777216);", // IID645 + "__ imulq(r21, r31, 4096);", // IID646 + "__ shldq(rbx, r19, 1);", // IID647 + "__ shrdq(r11, r23, 4);", // IID648 + "__ pop2(r16, r30);", // IID649 + "__ pop2p(r17, rbx);", // IID650 + "__ push2(r20, r30);", // IID651 + "__ push2p(r8, r31);", // IID652 + "__ movzbq(r28, Address(r8, r14, (Address::ScaleFactor)0, +0x469ae67a));", // IID653 + "__ movzwq(r14, Address(r8, r18, (Address::ScaleFactor)2, -0x48699e02));", // IID654 + "__ movsbq(r21, Address(rbx, -0x64dae06b));", // IID655 + "__ movswq(r19, Address(r31, rbx, (Address::ScaleFactor)2, +0x60318819));", // IID656 + "__ movzbq(r30, r13);", // IID657 + "__ movzwq(r30, r18);", // IID658 + "__ movsbq(r19, r15);", // IID659 + "__ movswq(r20, r16);", // IID660 + "__ cmpxchgq(r28, Address(r11, rbx, (Address::ScaleFactor)3, +0xfc3479d));", // IID661 + "__ eidivq(r20, false);", // IID662 + "__ eidivq(r30, true);", // IID663 + "__ edivq(r22, false);", // IID664 + "__ edivq(r11, true);", // IID665 + "__ eimulq(rcx, false);", // IID666 + "__ eimulq(r28, true);", // IID667 + "__ emulq(r21, false);", // IID668 + "__ emulq(r13, true);", // IID669 + "__ emulq(Address(r26, r15, (Address::ScaleFactor)2, +0x70a1ce6e), false);", // IID670 + "__ emulq(Address(r24, r19, (Address::ScaleFactor)1, -0x1670855c), true);", // IID671 + "__ eimulq(r10, r27, false);", // IID672 + "__ eimulq(r17, r17, false);", // IID673 + "__ eimulq(rdx, r22, true);", // IID674 + "__ eimulq(rbx, rbx, true);", // IID675 + "__ elzcntq(r28, r15, false);", // IID676 + "__ elzcntq(r15, r15, false);", // IID677 + "__ elzcntq(rbx, r12, true);", // IID678 + "__ elzcntq(rbx, rbx, true);", // IID679 + "__ enegq(r26, r11, false);", // IID680 + "__ enegq(r17, r17, false);", // IID681 + "__ enegq(rdx, r31, true);", // IID682 + "__ enegq(r27, r27, true);", // IID683 + "__ enotq(r31, r15);", // IID684 + "__ enotq(r21, r21);", // IID685 + "__ epopcntq(rbx, r24, false);", // IID686 + "__ epopcntq(r28, r28, false);", // IID687 + "__ epopcntq(r23, r27, true);", // IID688 + "__ epopcntq(r13, r13, true);", // IID689 + "__ erolq(r25, r28, false);", // IID690 + "__ erolq(r31, r31, false);", // IID691 + "__ erolq(r25, r23, true);", // IID692 + "__ erolq(rcx, rcx, true);", // IID693 + "__ erorq(r22, r14, false);", // IID694 + "__ erorq(r15, r15, false);", // IID695 + "__ erorq(r11, r30, true);", // IID696 + "__ erorq(r24, r24, true);", // IID697 + "__ esalq(r10, r20, false);", // IID698 + "__ esalq(r19, r19, false);", // IID699 + "__ esalq(r17, r25, true);", // IID700 + "__ esalq(r13, r13, true);", // IID701 + "__ esarq(r31, r30, false);", // IID702 + "__ esarq(r18, r18, false);", // IID703 + "__ esarq(r25, r25, true);", // IID704 + "__ esarq(r28, r28, true);", // IID705 + "__ edecq(r22, r27, false);", // IID706 + "__ edecq(r12, r12, false);", // IID707 + "__ edecq(r18, r11, true);", // IID708 + "__ edecq(r10, r10, true);", // IID709 + "__ eincq(r20, r24, false);", // IID710 + "__ eincq(r18, r18, false);", // IID711 + "__ eincq(rbx, r11, true);", // IID712 + "__ eincq(r26, r26, true);", // IID713 + "__ eshlq(r21, r8, false);", // IID714 + "__ eshlq(rbx, rbx, false);", // IID715 + "__ eshlq(r22, r21, true);", // IID716 + "__ eshlq(r27, r27, true);", // IID717 + "__ eshrq(r12, r16, false);", // IID718 + "__ eshrq(r8, r8, false);", // IID719 + "__ eshrq(rdx, r9, true);", // IID720 + "__ eshrq(r20, r20, true);", // IID721 + "__ etzcntq(r31, r21, false);", // IID722 + "__ etzcntq(r20, r20, false);", // IID723 + "__ etzcntq(rcx, r16, true);", // IID724 + "__ etzcntq(r14, r14, true);", // IID725 + "__ eimulq(r27, Address(r25, r9, (Address::ScaleFactor)1, +0x445a2393), false);", // IID726 + "__ eimulq(r23, Address(rcx, r9, (Address::ScaleFactor)1, -0x1480ef0c), true);", // IID727 + "__ elzcntq(r13, Address(r22, r17, (Address::ScaleFactor)1, -0x750c1996), false);", // IID728 + "__ elzcntq(r13, Address(r31, -0x342b6259), true);", // IID729 + "__ enegq(r31, Address(r24, r13, (Address::ScaleFactor)1, -0x25b16a0e), false);", // IID730 + "__ enegq(r13, Address(r11, r28, (Address::ScaleFactor)3, +0x5c0013ab), true);", // IID731 + "__ epopcntq(rdx, Address(r18, rcx, (Address::ScaleFactor)2, -0x6113eaaf), false);", // IID732 + "__ epopcntq(r9, Address(r10, -0x5ca7d588), true);", // IID733 + "__ esalq(r17, Address(r27, r30, (Address::ScaleFactor)0, +0x1b4cda2c), false);", // IID734 + "__ esalq(r25, Address(r12, rdx, (Address::ScaleFactor)1, +0x62823bce), true);", // IID735 + "__ esarq(r9, Address(r10, r18, (Address::ScaleFactor)2, -0x264a7a48), false);", // IID736 + "__ esarq(rbx, Address(r14, r27, (Address::ScaleFactor)0, +0x20291e00), true);", // IID737 + "__ edecq(r12, Address(r15, r14, (Address::ScaleFactor)2, -0x20f7dabb), false);", // IID738 + "__ edecq(r9, Address(r10, r25, (Address::ScaleFactor)1, +0x21411d84), true);", // IID739 + "__ eincq(r20, Address(rbx, r25, (Address::ScaleFactor)3, +0x2f0329e), false);", // IID740 + "__ eincq(r10, Address(r12, r31, (Address::ScaleFactor)0, -0x37505c8c), true);", // IID741 + "__ eshrq(r24, Address(r23, r14, (Address::ScaleFactor)3, -0x71e75ab0), false);", // IID742 + "__ eshrq(r25, Address(r19, r10, (Address::ScaleFactor)1, +0x507b0a88), true);", // IID743 + "__ etzcntq(r31, Address(rbx, r16, (Address::ScaleFactor)0, +0x19d5192a), false);", // IID744 + "__ etzcntq(r9, Address(r22, r28, (Address::ScaleFactor)2, +0x211007cd), true);", // IID745 + "__ eaddq(r16, Address(r21, rbx, (Address::ScaleFactor)3, -0x823fa1e), r28, false);", // IID746 + "__ eaddq(r15, Address(rdx, r8, (Address::ScaleFactor)3, -0x34b9a058), r15, false);", // IID747 + "__ eaddq(r24, Address(r14, r24, (Address::ScaleFactor)3, +0x6cdc59d2), r13, true);", // IID748 + "__ eaddq(rbx, Address(r27, r14, (Address::ScaleFactor)3, +0x36c5e8de), rbx, true);", // IID749 + "__ eandq(r21, Address(r27, r27, (Address::ScaleFactor)1, -0x2c023b13), r27, false);", // IID750 + "__ eandq(r31, Address(r21, r15, (Address::ScaleFactor)2, +0x6ef2c74a), r31, false);", // IID751 + "__ eandq(r13, Address(r31, r25, (Address::ScaleFactor)1, +0x734fe9ab), r27, true);", // IID752 + "__ eandq(r15, Address(r14, r29, (Address::ScaleFactor)3, -0x6e68556), r15, true);", // IID753 + "__ eorq(r12, Address(r30, r15, (Address::ScaleFactor)3, +0x3ba33f9e), r28, false);", // IID754 + "__ eorq(r16, Address(r12, r9, (Address::ScaleFactor)0, -0x28e03b33), r16, false);", // IID755 + "__ eorq(r8, Address(r8, r25, (Address::ScaleFactor)3, -0x1e42bd95), r27, true);", // IID756 + "__ eorq(rcx, Address(r27, rbx, (Address::ScaleFactor)2, +0x7be4bcad), rcx, true);", // IID757 + "__ esubq(r24, Address(r23, r22, (Address::ScaleFactor)2, +0x6f8827d7), rdx, false);", // IID758 + "__ esubq(r21, Address(r10, -0x635b8c8), r21, false);", // IID759 + "__ esubq(r23, Address(r27, r26, (Address::ScaleFactor)3, +0x922bcc0), rbx, true);", // IID760 + "__ esubq(r25, Address(r23, r15, (Address::ScaleFactor)0, -0x38f494ac), r25, true);", // IID761 + "__ exorq(r11, Address(r12, r19, (Address::ScaleFactor)2, -0x5b71ec17), rcx, false);", // IID762 + "__ exorq(r28, Address(r19, r18, (Address::ScaleFactor)0, +0x716b9b7e), r28, false);", // IID763 + "__ exorq(r21, Address(rcx, r29, (Address::ScaleFactor)0, -0x5af0441e), r16, true);", // IID764 + "__ exorq(r12, Address(r20, r26, (Address::ScaleFactor)0, +0xe0b7fb1), r12, true);", // IID765 + "__ eaddq(r30, Address(rcx, +0x2d3b7b4f), 1048576, false);", // IID766 + "__ eaddq(r14, Address(r21, r15, (Address::ScaleFactor)2, -0x1222aee8), 4096, true);", // IID767 + "__ eandq(r23, Address(r20, r31, (Address::ScaleFactor)0, -0x96e4d6a), 16, false);", // IID768 + "__ eandq(r10, Address(rdx, rdx, (Address::ScaleFactor)3, +0x3875f17c), 1, true);", // IID769 + "__ eimulq(r17, Address(rcx, r25, (Address::ScaleFactor)2, +0x32c71076), 4096, false);", // IID770 + "__ eimulq(r19, Address(r31, rbx, (Address::ScaleFactor)2, +0x7bada60d), 1048576, true);", // IID771 + "__ eorq(r25, Address(r18, r23, (Address::ScaleFactor)1, +0x48147444), 16777216, false);", // IID772 + "__ eorq(r29, Address(r26, r27, (Address::ScaleFactor)1, -0x4b113958), 1048576, true);", // IID773 + "__ esalq(r31, Address(r18, -0x46103c74), 2, false);", // IID774 + "__ esalq(r25, Address(r10, r15, (Address::ScaleFactor)0, +0x48925da4), 16, true);", // IID775 + "__ esarq(r26, Address(r18, -0x5ea1c542), 8, false);", // IID776 + "__ esarq(r12, Address(r10, r22, (Address::ScaleFactor)2, +0x5d958264), 8, true);", // IID777 + "__ eshrq(rdx, Address(r17, r20, (Address::ScaleFactor)2, +0x295add23), 16, false);", // IID778 + "__ eshrq(rbx, Address(r22, r28, (Address::ScaleFactor)1, +0x782929cb), 2, true);", // IID779 + "__ esubq(r19, Address(r23, -0x49811d72), 1, false);", // IID780 + "__ esubq(r8, Address(r19, r14, (Address::ScaleFactor)2, -0x1b2bae9a), 1048576, true);", // IID781 + "__ exorq(r19, Address(rcx, r10, (Address::ScaleFactor)0, +0x45a66ee9), 1048576, false);", // IID782 + "__ exorq(r28, Address(r9, r29, (Address::ScaleFactor)0, -0x28a19314), 16, true);", // IID783 + "__ eaddq(r8, rcx, 16777216, false);", // IID784 + "__ eaddq(rax, r14, 16777216, false);", // IID785 + "__ eaddq(r16, r16, 256, false);", // IID786 + "__ eaddq(r24, r9, 4096, true);", // IID787 + "__ eaddq(rax, r18, 4096, true);", // IID788 + "__ eaddq(r8, r8, 1, true);", // IID789 + "__ eandq(r15, r22, 1048576, false);", // IID790 + "__ eandq(rax, r26, 1048576, false);", // IID791 + "__ eandq(rdx, rdx, 4096, false);", // IID792 + "__ eandq(rdx, r22, 268435456, true);", // IID793 + "__ eandq(rax, r29, 268435456, true);", // IID794 + "__ eandq(r23, r23, 16777216, true);", // IID795 + "__ eimulq(r9, r13, 1048576, false);", // IID796 + "__ eimulq(rax, r18, 1048576, false);", // IID797 + "__ eimulq(r16, r16, 1048576, false);", // IID798 + "__ eimulq(r17, r23, 1, true);", // IID799 + "__ eimulq(rax, r12, 1, true);", // IID800 + "__ eimulq(r10, r10, 268435456, true);", // IID801 + "__ eorq(rdx, r19, 256, false);", // IID802 + "__ eorq(rax, r14, 256, false);", // IID803 + "__ eorq(r13, r13, 1, false);", // IID804 + "__ eorq(r25, r29, 256, true);", // IID805 + "__ eorq(rax, rdx, 256, true);", // IID806 + "__ eorq(r16, r16, 16, true);", // IID807 + "__ erclq(r13, r19, 4);", // IID808 + "__ erclq(rax, r12, 4);", // IID809 + "__ erclq(r9, r9, 4);", // IID810 + "__ erolq(r13, r16, 1, false);", // IID811 + "__ erolq(rax, r31, 1, false);", // IID812 + "__ erolq(r30, r30, 8, false);", // IID813 + "__ erolq(r30, r20, 8, true);", // IID814 + "__ erolq(rax, r31, 8, true);", // IID815 + "__ erolq(r31, r31, 4, true);", // IID816 + "__ erorq(r22, r10, 4, false);", // IID817 + "__ erorq(rax, r13, 4, false);", // IID818 + "__ erorq(r24, r24, 16, false);", // IID819 + "__ erorq(r29, r22, 16, true);", // IID820 + "__ erorq(rax, r20, 16, true);", // IID821 + "__ erorq(r27, r27, 4, true);", // IID822 + "__ esalq(r31, r19, 2, false);", // IID823 + "__ esalq(rax, r20, 2, false);", // IID824 + "__ esalq(r11, r11, 8, false);", // IID825 + "__ esalq(rdx, r15, 1, true);", // IID826 + "__ esalq(rax, r10, 1, true);", // IID827 + "__ esalq(r29, r29, 4, true);", // IID828 + "__ esarq(r20, r16, 1, false);", // IID829 + "__ esarq(rax, r21, 1, false);", // IID830 + "__ esarq(r28, r28, 8, false);", // IID831 + "__ esarq(r30, rcx, 4, true);", // IID832 + "__ esarq(rax, r15, 4, true);", // IID833 + "__ esarq(rcx, rcx, 4, true);", // IID834 + "__ eshlq(rdx, r26, 4, false);", // IID835 + "__ eshlq(rax, r26, 4, false);", // IID836 + "__ eshlq(r8, r8, 4, false);", // IID837 + "__ eshlq(rcx, rcx, 1, true);", // IID838 + "__ eshlq(rax, rcx, 1, true);", // IID839 + "__ eshlq(r13, r13, 2, true);", // IID840 + "__ eshrq(r14, r27, 2, false);", // IID841 + "__ eshrq(rax, r11, 2, false);", // IID842 + "__ eshrq(r9, r9, 16, false);", // IID843 + "__ eshrq(rdx, r31, 2, true);", // IID844 + "__ eshrq(rax, r14, 2, true);", // IID845 + "__ eshrq(r12, r12, 8, true);", // IID846 + "__ esubq(r10, r28, 1, false);", // IID847 + "__ esubq(rax, r8, 1, false);", // IID848 + "__ esubq(rcx, rcx, 16777216, false);", // IID849 + "__ esubq(rdx, rbx, 16777216, true);", // IID850 + "__ esubq(rax, r18, 16777216, true);", // IID851 + "__ esubq(r27, r27, 65536, true);", // IID852 + "__ exorq(r30, rcx, 4096, false);", // IID853 + "__ exorq(rax, r21, 4096, false);", // IID854 + "__ exorq(rcx, rcx, 16777216, false);", // IID855 + "__ exorq(r21, r12, 1, true);", // IID856 + "__ exorq(rax, rdx, 1, true);", // IID857 + "__ exorq(rbx, rbx, 16777216, true);", // IID858 + "__ eorq_imm32(r11, rdx, 65536, false);", // IID859 + "__ eorq_imm32(rax, r14, 65536, false);", // IID860 + "__ eorq_imm32(r14, r14, 262144, false);", // IID861 + "__ eorq_imm32(r25, r29, 262144, false);", // IID862 + "__ eorq_imm32(rax, r21, 262144, false);", // IID863 + "__ eorq_imm32(r11, r11, 16777216, false);", // IID864 + "__ esubq_imm32(r29, r19, 67108864, false);", // IID865 + "__ esubq_imm32(rax, r11, 67108864, false);", // IID866 + "__ esubq_imm32(r18, r18, 67108864, false);", // IID867 + "__ esubq_imm32(r28, r23, 4194304, true);", // IID868 + "__ esubq_imm32(rax, r21, 4194304, true);", // IID869 + "__ esubq_imm32(r16, r16, 16777216, true);", // IID870 + "__ eaddq(r8, r25, Address(r26, r8, (Address::ScaleFactor)1, +0x10633def), false);", // IID871 + "__ eaddq(r13, r13, Address(r18, r16, (Address::ScaleFactor)1, -0x74204508), false);", // IID872 + "__ eaddq(r17, r26, Address(r12, +0x23a80abf), true);", // IID873 + "__ eaddq(r9, r9, Address(r29, r19, (Address::ScaleFactor)0, -0x29e9e52), true);", // IID874 + "__ eandq(r9, r28, Address(rcx, r25, (Address::ScaleFactor)2, +0x4261ffaa), false);", // IID875 + "__ eandq(r27, r27, Address(rdx, r28, (Address::ScaleFactor)0, -0x26bdc9c1), false);", // IID876 + "__ eandq(r14, r11, Address(r16, +0x63ba0ddf), true);", // IID877 + "__ eandq(r8, r8, Address(r22, r25, (Address::ScaleFactor)1, -0x43b6ab44), true);", // IID878 + "__ eorq(r19, rcx, Address(r27, rcx, (Address::ScaleFactor)2, -0x7f687fc6), false);", // IID879 + "__ eorq(r19, r19, Address(rbx, r26, (Address::ScaleFactor)1, -0x486db7ea), false);", // IID880 + "__ eorq(r30, r10, Address(r14, r18, (Address::ScaleFactor)3, +0x14884884), true);", // IID881 + "__ eorq(r27, r27, Address(r29, +0x20337180), true);", // IID882 + "__ eimulq(rcx, r21, Address(r21, rbx, (Address::ScaleFactor)0, -0x3303888e), false);", // IID883 + "__ eimulq(rdx, rdx, Address(r28, r9, (Address::ScaleFactor)3, -0x7ad8f741), false);", // IID884 + "__ eimulq(r8, r29, Address(r17, r12, (Address::ScaleFactor)0, +0x6e85396a), true);", // IID885 + "__ eimulq(r16, r16, Address(r19, r10, (Address::ScaleFactor)3, -0x49599300), true);", // IID886 + "__ esubq(r20, r17, Address(r13, r22, (Address::ScaleFactor)0, +0x1d219a4f), false);", // IID887 + "__ esubq(r25, r25, Address(r21, r21, (Address::ScaleFactor)3, -0x6868a8c7), false);", // IID888 + "__ esubq(r20, r24, Address(rbx, r20, (Address::ScaleFactor)2, +0x32c59da6), true);", // IID889 + "__ esubq(r8, r8, Address(r12, r17, (Address::ScaleFactor)0, -0x26be2dcf), true);", // IID890 + "__ exorq(rdx, r19, Address(r9, +0x7d903b91), false);", // IID891 + "__ exorq(r28, r28, Address(r29, r27, (Address::ScaleFactor)2, +0x53091f6f), false);", // IID892 + "__ exorq(r17, r16, Address(r27, +0x7c6e9207), true);", // IID893 + "__ exorq(r15, r15, Address(r13, r24, (Address::ScaleFactor)3, -0x75c87960), true);", // IID894 + "__ eaddq(r16, rbx, r18, false);", // IID895 + "__ eaddq(r24, r24, r18, false);", // IID896 + "__ eaddq(r9, r15, r9, false);", // IID897 + "__ eaddq(r19, r26, r13, true);", // IID898 + "__ eaddq(r28, r28, r22, true);", // IID899 + "__ eaddq(r22, r11, r22, true);", // IID900 + "__ eadcxq(rcx, r12, r13);", // IID901 + "__ eadcxq(r30, r30, r12);", // IID902 + "__ eadoxq(r28, r14, r18);", // IID903 + "__ eadoxq(r30, r30, r19);", // IID904 + "__ eandq(r20, r14, r14, false);", // IID905 + "__ eandq(r17, r17, r23, false);", // IID906 + "__ eandq(r17, r14, r17, false);", // IID907 + "__ eandq(r19, r20, r15, true);", // IID908 + "__ eandq(rbx, rbx, r13, true);", // IID909 + "__ eandq(r22, r30, r22, true);", // IID910 + "__ eimulq(r17, r24, rcx, false);", // IID911 + "__ eimulq(r21, r21, r8, false);", // IID912 + "__ eimulq(r29, r21, r29, false);", // IID913 + "__ eimulq(r27, r13, r23, true);", // IID914 + "__ eimulq(r26, r26, r8, true);", // IID915 + "__ eimulq(r22, r13, r22, true);", // IID916 + "__ eorq(r11, rdx, r29, false);", // IID917 + "__ eorq(rdx, rdx, r31, false);", // IID918 + "__ eorq(r10, r29, r10, false);", // IID919 + "__ eorq(r27, r28, rcx, true);", // IID920 + "__ eorq(r25, r25, r9, true);", // IID921 + "__ eorq(rcx, r8, rcx, true);", // IID922 + "__ esubq(rcx, r10, r16, false);", // IID923 + "__ esubq(r17, r17, rcx, false);", // IID924 + "__ esubq(r13, r21, r24, true);", // IID925 + "__ esubq(r31, r31, r28, true);", // IID926 + "__ exorq(r23, r28, r23, false);", // IID927 + "__ exorq(r10, r10, r11, false);", // IID928 + "__ exorq(r19, r18, r19, false);", // IID929 + "__ exorq(r31, r9, rdx, true);", // IID930 + "__ exorq(r13, r13, r9, true);", // IID931 + "__ exorq(rcx, r10, rcx, true);", // IID932 + "__ eshldq(r12, r24, r22, 8, false);", // IID933 + "__ eshldq(r25, r25, r25, 8, false);", // IID934 + "__ eshldq(r21, r20, r15, 8, true);", // IID935 + "__ eshldq(r21, r21, r10, 8, true);", // IID936 + "__ eshrdq(r18, r18, r8, 2, false);", // IID937 + "__ eshrdq(r26, r26, r29, 8, false);", // IID938 + "__ eshrdq(r29, r26, r19, 2, true);", // IID939 + "__ eshrdq(r12, r12, rcx, 4, true);", // IID940 + "__ ecmovq (Assembler::Condition::overflow, r21, r22, r23);", // IID941 + "__ ecmovq (Assembler::Condition::overflow, r9, r9, r13);", // IID942 + "__ ecmovq (Assembler::Condition::noOverflow, rcx, r23, r24);", // IID943 + "__ ecmovq (Assembler::Condition::noOverflow, r28, r28, rdx);", // IID944 + "__ ecmovq (Assembler::Condition::below, r14, r31, r23);", // IID945 + "__ ecmovq (Assembler::Condition::below, r30, r30, r23);", // IID946 + "__ ecmovq (Assembler::Condition::aboveEqual, r10, r29, r22);", // IID947 + "__ ecmovq (Assembler::Condition::aboveEqual, rbx, rbx, r26);", // IID948 + "__ ecmovq (Assembler::Condition::zero, r23, r21, r13);", // IID949 + "__ ecmovq (Assembler::Condition::zero, r10, r10, r20);", // IID950 + "__ ecmovq (Assembler::Condition::notZero, rbx, r9, r29);", // IID951 + "__ ecmovq (Assembler::Condition::notZero, r16, r16, r30);", // IID952 + "__ ecmovq (Assembler::Condition::belowEqual, r13, rcx, r29);", // IID953 + "__ ecmovq (Assembler::Condition::belowEqual, r31, r31, r13);", // IID954 + "__ ecmovq (Assembler::Condition::above, r27, r9, r30);", // IID955 + "__ ecmovq (Assembler::Condition::above, r26, r26, r20);", // IID956 + "__ ecmovq (Assembler::Condition::negative, r8, r12, r22);", // IID957 + "__ ecmovq (Assembler::Condition::negative, r31, r31, r17);", // IID958 + "__ ecmovq (Assembler::Condition::positive, r29, rcx, r25);", // IID959 + "__ ecmovq (Assembler::Condition::positive, r22, r22, r14);", // IID960 + "__ ecmovq (Assembler::Condition::parity, rcx, r27, r9);", // IID961 + "__ ecmovq (Assembler::Condition::parity, r22, r22, r11);", // IID962 + "__ ecmovq (Assembler::Condition::noParity, r14, r19, r24);", // IID963 + "__ ecmovq (Assembler::Condition::noParity, r24, r24, r17);", // IID964 + "__ ecmovq (Assembler::Condition::less, r17, r19, r30);", // IID965 + "__ ecmovq (Assembler::Condition::less, r19, r19, r14);", // IID966 + "__ ecmovq (Assembler::Condition::greaterEqual, r25, r11, r29);", // IID967 + "__ ecmovq (Assembler::Condition::greaterEqual, r12, r12, r26);", // IID968 + "__ ecmovq (Assembler::Condition::lessEqual, r11, rbx, r10);", // IID969 + "__ ecmovq (Assembler::Condition::lessEqual, rdx, rdx, r22);", // IID970 + "__ ecmovq (Assembler::Condition::greater, r14, r15, r23);", // IID971 + "__ ecmovq (Assembler::Condition::greater, r8, r8, r24);", // IID972 + "__ ecmovq (Assembler::Condition::overflow, rbx, r31, Address(r10, r8, (Address::ScaleFactor)3, -0x313f60e0));", // IID973 + "__ ecmovq (Assembler::Condition::overflow, r23, r23, Address(rcx, r24, (Address::ScaleFactor)2, +0x17f41d9c));", // IID974 + "__ ecmovq (Assembler::Condition::noOverflow, r31, r11, Address(r16, +0x2c018942));", // IID975 + "__ ecmovq (Assembler::Condition::noOverflow, r11, r11, Address(r16, r20, (Address::ScaleFactor)3, +0x674b6a55));", // IID976 + "__ ecmovq (Assembler::Condition::below, r9, r13, Address(r9, rcx, (Address::ScaleFactor)0, +0x394a11df));", // IID977 + "__ ecmovq (Assembler::Condition::below, r30, r30, Address(rdx, r22, (Address::ScaleFactor)1, -0x6c362b88));", // IID978 + "__ ecmovq (Assembler::Condition::aboveEqual, r13, rcx, Address(r24, rcx, (Address::ScaleFactor)3, +0x46500b66));", // IID979 + "__ ecmovq (Assembler::Condition::aboveEqual, r24, r24, Address(r18, r25, (Address::ScaleFactor)1, +0x53283b7c));", // IID980 + "__ ecmovq (Assembler::Condition::zero, r23, r25, Address(r15, r9, (Address::ScaleFactor)0, -0x5f03031e));", // IID981 + "__ ecmovq (Assembler::Condition::zero, r25, r25, Address(r28, r16, (Address::ScaleFactor)1, -0x53cef514));", // IID982 + "__ ecmovq (Assembler::Condition::notZero, rbx, r25, Address(r24, r25, (Address::ScaleFactor)2, -0x66caac87));", // IID983 + "__ ecmovq (Assembler::Condition::notZero, r16, r16, Address(r27, r30, (Address::ScaleFactor)3, +0x797f455d));", // IID984 + "__ ecmovq (Assembler::Condition::belowEqual, r25, r30, Address(r18, r18, (Address::ScaleFactor)1, +0x1c9daacd));", // IID985 + "__ ecmovq (Assembler::Condition::belowEqual, r22, r22, Address(rcx, r25, (Address::ScaleFactor)1, -0x3dcbfaa9));", // IID986 + "__ ecmovq (Assembler::Condition::above, r24, r26, Address(r25, +0x747060b5));", // IID987 + "__ ecmovq (Assembler::Condition::above, r8, r8, Address(r24, r20, (Address::ScaleFactor)3, +0x47d285f6));", // IID988 + "__ ecmovq (Assembler::Condition::negative, r12, r16, Address(r13, r10, (Address::ScaleFactor)2, +0x34e5b214));", // IID989 + "__ ecmovq (Assembler::Condition::negative, rdx, rdx, Address(r15, r19, (Address::ScaleFactor)0, -0x405138b1));", // IID990 + "__ ecmovq (Assembler::Condition::positive, r18, r21, Address(rbx, r13, (Address::ScaleFactor)2, +0x51b19197));", // IID991 + "__ ecmovq (Assembler::Condition::positive, r24, r24, Address(r11, r31, (Address::ScaleFactor)3, +0x3e01520a));", // IID992 + "__ ecmovq (Assembler::Condition::parity, r29, r26, Address(r10, r25, (Address::ScaleFactor)3, -0x5f7c3872));", // IID993 + "__ ecmovq (Assembler::Condition::parity, r11, r11, Address(r22, r10, (Address::ScaleFactor)3, -0x68731453));", // IID994 + "__ ecmovq (Assembler::Condition::noParity, r20, r15, Address(r9, r25, (Address::ScaleFactor)0, +0x4a37edaa));", // IID995 + "__ ecmovq (Assembler::Condition::noParity, r31, r31, Address(r9, r20, (Address::ScaleFactor)0, +0x4f999f86));", // IID996 + "__ ecmovq (Assembler::Condition::less, r18, r23, Address(r9, r27, (Address::ScaleFactor)0, -0x3410441d));", // IID997 + "__ ecmovq (Assembler::Condition::less, r16, r16, Address(r24, r10, (Address::ScaleFactor)3, +0x52ed66ee));", // IID998 + "__ ecmovq (Assembler::Condition::greaterEqual, r11, r18, Address(rcx, +0x1de09163));", // IID999 + "__ ecmovq (Assembler::Condition::greaterEqual, r14, r14, Address(r24, r23, (Address::ScaleFactor)1, +0x5df3b4da));", // IID1000 + "__ ecmovq (Assembler::Condition::lessEqual, r15, r14, Address(r30, r20, (Address::ScaleFactor)1, +0x5c9ab976));", // IID1001 + "__ ecmovq (Assembler::Condition::lessEqual, r26, r26, Address(r18, r27, (Address::ScaleFactor)2, -0xd8c329));", // IID1002 + "__ ecmovq (Assembler::Condition::greater, r29, r9, Address(r30, r20, (Address::ScaleFactor)3, -0x37a9cf8d));", // IID1003 + "__ ecmovq (Assembler::Condition::greater, r20, r20, Address(r8, rbx, (Address::ScaleFactor)1, +0x1bdc7def));", // IID1004 #endif // _LP64 }; // END Generated code -- do not edit diff -Nru openjdk-25-25.0.1+8/test/hotspot/gtest/x86/x86-asmtest.py openjdk-25-25.0.2+10/test/hotspot/gtest/x86/x86-asmtest.py --- openjdk-25-25.0.1+8/test/hotspot/gtest/x86/x86-asmtest.py 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/gtest/x86/x86-asmtest.py 2025-12-18 08:04:02.000000000 +0000 @@ -92,6 +92,8 @@ 'r31': {64: 'r31', 32: 'r31d', 16: 'r31w', 8: 'r31b'}, } +commutative_instrs = ['imul', 'add', 'and', 'xor', 'or'] + class Operand(object): def generate(self): return self @@ -400,6 +402,15 @@ self.mem = Address().generate(mem_base, mem_idx, width) self.reg2 = Register().generate(reg2, width) self.generate_operands(self.reg1, self.mem, self.reg2) + self.demote = True + + def astr(self): + if self.demote: + ops = [op.cstr() for op in self.operands] + # imul does not support RegMemReg + if self._aname in commutative_instrs[1:] and ops[0] == ops[2] and (not self.no_flag): + return f'{self._aname} ' + ', '.join([op.astr() for op in self.operands[:2]]) + return super().astr() class RegRegImmNddInstruction(NFInstruction): def __init__(self, name, aname, width, no_flag, reg1, reg2, imm): @@ -448,6 +459,9 @@ ops = [op.cstr() for op in self.operands] if ops[0] == ops[1] and (not self.no_flag): return hdr + f'{self._aname} ' + ', '.join([op.astr() for op in self.operands[1:]]) + if self._aname in commutative_instrs and ops[0] == ops[2] and (not self.no_flag): + return hdr + f'{self._aname} ' + ', '.join([op.astr() for op in self.operands[:2]]) + return hdr + super().astr() class RegRegRegImmNddInstruction(NFInstruction): @@ -574,6 +588,18 @@ lp64_flag = handle_lp64_flag(lp64_flag, print_lp64_flag, test_reg1, test_reg2, test_reg3) instr = RegOp(*op, reg1=test_reg1, reg2=test_reg2, reg3=test_reg3) print_instruction(instr, lp64_flag, print_lp64_flag) + + demote = True if TEST_DEMOTION else False + commute = True if op[1] in commutative_instrs else False + if RegOp in [RegRegRegNddInstruction] and demote and commute : + for i in range(len(test_regs) if full_set else 1): + test_reg1 = test_regs[i] if full_set else random.choice(test_regs) + test_reg2 = test_regs[(i + 2) % len(test_regs)] if full_set else random.choice(test_regs) + test_reg3 = test_reg1 + + lp64_flag = handle_lp64_flag(lp64_flag, print_lp64_flag, test_reg1, test_reg2, test_reg3) + instr = RegOp(*op, reg1=test_reg1, reg2=test_reg2, reg3=test_reg3) + print_instruction(instr, lp64_flag, print_lp64_flag) elif RegOp in [MemRegInstruction, RegMemInstruction, MoveRegMemInstruction, CmpxchgInstruction, CondRegMemInstruction, RegMemNddInstruction]: if full_set: @@ -699,7 +725,7 @@ print_instruction(instr, lp64_flag, print_lp64_flag) elif RegOp in [RegMemRegNddInstruction, RegRegMemNddInstruction, CondRegRegMemInstruction]: - demote_options = [False] if TEST_DEMOTION and RegOp not in [RegMemRegNddInstruction] else [False, True] + demote_options = [False, True] for demote in demote_options: for i in range(len(test_regs) if full_set else 1): test_reg1 = test_regs[i] if full_set else random.choice(test_regs) @@ -1023,6 +1049,8 @@ RegMemRegNddInstruction: [ ('eaddl', 'add', 32, False), ('eaddl', 'add', 32, True), + ('eandl', 'and', 32, False), + ('eandl', 'and', 32, True), ('eorl', 'or', 32, False), ('eorl', 'or', 32, True), ('eorb', 'or', 8, False), diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/ProblemList.txt openjdk-25-25.0.2+10/test/hotspot/jtreg/ProblemList.txt --- openjdk-25-25.0.1+8/test/hotspot/jtreg/ProblemList.txt 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/ProblemList.txt 2025-12-18 08:04:02.000000000 +0000 @@ -98,6 +98,7 @@ # :hotspot_runtime +runtime/cds/DeterministicDump.java 8363986 macosx-x64,macosx-aarch64 runtime/jni/terminatedThread/TestTerminatedThread.java 8317789 aix-ppc64 runtime/Monitor/SyncOnValueBasedClassTest.java 8340995 linux-s390x runtime/os/TestTracePageSizes.java#no-options 8267460 linux-aarch64 @@ -182,3 +183,13 @@ vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi005/TestDescription.java 8076494 windows-x64 vmTestbase/nsk/monitoring/ThreadMXBean/findMonitorDeadlockedThreads/find006/TestDescription.java 8310144 macosx-aarch64 + +# Mechanically added: +runtime/Thread/TestThreadDumpMonitorContention.java 8361370 windows-x64 +runtime/Thread/StopAtExit.java 8365835 linux-x64 +runtime/Thread/SetPriorityAtExit.java 8365835 linux-x64 +runtime/Thread/SuspendAtExit.java 8365835 linux-x64 +runtime/Thread/SetNameAtExit.java 8365835 linux-x64 +runtime/8176717/TestInheritFD.java 8347001 linux-x64 +vmTestbase/nsk/jdi/stress/serial/mixed002/TestDescription.java 8291514 macosx-aarch64 +serviceability/jvmti/RedefineClasses/ClassVersionAfterRedefine.java 8369953 linux-aarch64,linux-x64,macosx-aarch64,windows-x64 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/TEST.ROOT openjdk-25-25.0.2+10/test/hotspot/jtreg/TEST.ROOT --- openjdk-25-25.0.1+8/test/hotspot/jtreg/TEST.ROOT 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/TEST.ROOT 2025-12-18 08:04:02.000000000 +0000 @@ -79,6 +79,8 @@ vm.rtm.cpu \ vm.rtm.compiler \ vm.cds \ + vm.cds.default.archive.available \ + vm.cds.nocoops.archive.available \ vm.cds.custom.loaders \ vm.cds.supports.aot.class.linking \ vm.cds.supports.aot.code.caching \ @@ -102,7 +104,7 @@ jdk.static # Minimum jtreg version -requiredVersion=7.5.1+1 +requiredVersion=8+2 # Path to libraries in the topmost test directory. This is needed so @library # does not need ../../../ notation to reach them diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/TEST.groups openjdk-25-25.0.2+10/test/hotspot/jtreg/TEST.groups --- openjdk-25-25.0.1+8/test/hotspot/jtreg/TEST.groups 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/TEST.groups 2025-12-18 08:04:02.000000000 +0000 @@ -417,6 +417,7 @@ -runtime/cds/appcds/aotClassLinking \ -runtime/cds/appcds/aotCode \ -runtime/cds/appcds/aotFlags \ + -runtime/cds/appcds/aotProfile \ -runtime/cds/appcds/applications \ -runtime/cds/appcds/cacheObject \ -runtime/cds/appcds/complexURI \ @@ -511,14 +512,17 @@ runtime/cds/appcds/jigsaw \ runtime/cds/appcds/loaderConstraints -# Run CDS tests with -XX:+AOTClassLinking. This should include most CDS tests, except for +# Run "old" CDS tests with -XX:+AOTClassLinking. This should include most CDS tests, except for # those that rely on redefining classes that are already archived. +# Note that appcds/aotXXX directories are excluded -- those tests already specifically +# test AOT class linking, so there's no need to run them again with -XX:+AOTClassLinking. hotspot_aot_classlinking = \ runtime/cds \ -runtime/cds/appcds/aotCache \ -runtime/cds/appcds/aotClassLinking \ -runtime/cds/appcds/aotCode \ -runtime/cds/appcds/aotFlags \ + -runtime/cds/appcds/aotProfile \ -runtime/cds/appcds/BadBSM.java \ -runtime/cds/appcds/cacheObject/ArchivedIntegerCacheTest.java \ -runtime/cds/appcds/cacheObject/ArchivedModuleCompareTest.java \ diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/applications/jcstress/README openjdk-25-25.0.2+10/test/hotspot/jtreg/applications/jcstress/README --- openjdk-25-25.0.1+8/test/hotspot/jtreg/applications/jcstress/README 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/applications/jcstress/README 2025-12-18 08:04:02.000000000 +0000 @@ -1,4 +1,4 @@ -Copyright (c) 2017, 2022, 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 @@ -24,10 +24,13 @@ Stress test suite[1] (a.k.a. jcstress). This suite aims to verify the correctness of concurrency support in the JDK. -All the tests are run through the test driver class -- JcstressRunner, which -downloads the specified build of org.openjdk.jcstress:jcstress-tests-all, +All the tests are run through the test driver class -- JcstressRunner, spawns a new JVM to run one jcstress test and checks that it finishes -successfully. +successfully. These tests require a build of org.openjdk.jcstress:jcstress-tests-all. +If this artifact could not be found automatically, you can build it using jcstress +guide[1], and then pass the JAR location with JDK option such as +-Djdk.test.lib.artifacts.jcstress-tests-all=jcstress-tests-all.jar, +either with explicit -javaoption: or TEST_VM_OPTS test variable. When the used version of org.openjdk.jcstress:jcstress-tests-all needs to be changed, one should make corresponding changes to the artifact description in diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/arraycopy/TestIllegalArrayCopyBeforeInfiniteLoop.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/arraycopy/TestIllegalArrayCopyBeforeInfiniteLoop.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/arraycopy/TestIllegalArrayCopyBeforeInfiniteLoop.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/arraycopy/TestIllegalArrayCopyBeforeInfiniteLoop.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/arraycopy/TestNegArrayLengthAsIndex1.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/arraycopy/TestNegArrayLengthAsIndex1.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/arraycopy/TestNegArrayLengthAsIndex1.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/arraycopy/TestNegArrayLengthAsIndex1.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/arraycopy/TestNegArrayLengthAsIndex2.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/arraycopy/TestNegArrayLengthAsIndex2.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/arraycopy/TestNegArrayLengthAsIndex2.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/arraycopy/TestNegArrayLengthAsIndex2.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/arraycopy/TestNegativeArrayCopyAfterLoop.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/arraycopy/TestNegativeArrayCopyAfterLoop.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/arraycopy/TestNegativeArrayCopyAfterLoop.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/arraycopy/TestNegativeArrayCopyAfterLoop.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c1/TestRangeCheckEliminated.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c1/TestRangeCheckEliminated.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c1/TestRangeCheckEliminated.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c1/TestRangeCheckEliminated.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. All rights reserved. * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/Test7046096.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/Test7046096.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/Test7046096.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/Test7046096.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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,18 @@ * compiler.c2.Test7046096 */ + +/* + * @test id=stringConcatInline + * @bug 7046096 8357822 + * @summary The same test with an updated compile directive that produces + * StringBuilder-backed string concatenations. + * + * @compile -XDstringConcat=inline Test7046096.java + * @run main/othervm -Xbatch compiler.c2.Test7046096 + */ + + package compiler.c2; public class Test7046096 { diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/Test7179138_2.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/Test7179138_2.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/Test7179138_2.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/Test7179138_2.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,4 +1,5 @@ /* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. * Copyright 2012 Skip Balk. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -32,6 +33,18 @@ * @author Skip Balk */ + +/* + * @test id=stringConcatInline + * @bug 7179138 + * @summary The same test with an updated compile directive that produces + * StringBuilder-backed string concatenations. + * + * @compile -XDstringConcat=inline Test7179138_2.java + * @run main/othervm -Xbatch -XX:-TieredCompilation compiler.c2.Test7179138_2 + */ + + package compiler.c2; public class Test7179138_2 { diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/TestBit.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/TestBit.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/TestBit.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/TestBit.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 @@ -33,7 +33,7 @@ * @library /test/lib / * * @requires vm.flagless - * @requires os.arch=="aarch64" | os.arch=="amd64" | os.arch == "ppc64le" | os.arch == "riscv64" + * @requires os.arch=="aarch64" | os.arch=="amd64" | os.arch == "ppc64" | os.arch == "ppc64le" | os.arch == "riscv64" * @requires vm.debug == true & vm.compiler2.enabled * * @run driver compiler.c2.TestBit diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/TestDuplicateSimpleLoopBackedge.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/TestDuplicateSimpleLoopBackedge.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/TestDuplicateSimpleLoopBackedge.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/TestDuplicateSimpleLoopBackedge.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (c) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/TestMergeStores.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/TestMergeStores.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/TestMergeStores.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/TestMergeStores.java 2025-12-18 08:04:02.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 @@ -611,7 +611,7 @@ } @Test - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test1a(byte[] a) { a[0] = (byte)0xbe; @@ -626,7 +626,7 @@ } @Test - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test1b(byte[] a) { // Add custom null check, to ensure the unsafe access always recognizes its type as an array store @@ -636,7 +636,7 @@ } @Test - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test1c(byte[] a) { storeLongLE(a, 0, 0xdeadbeefbaadbabeL); @@ -644,7 +644,7 @@ } @Test - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test1d(byte[] a) { storeIntLE(a, 0, 0xbaadbabe); @@ -653,7 +653,7 @@ } @Test - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test1e(byte[] a) { storeShortLE(a, 0, (short)0xbabe); @@ -664,7 +664,7 @@ } @Test - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test1f(byte[] a) { UNSAFE.putByte(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 0, (byte)0xbe); @@ -680,8 +680,8 @@ @Test // Do not optimize these, just to be sure we do not mess with store ordering. - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "8"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test1g(byte[] a) { UNSAFE.putByteRelease(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 0, (byte)0xbe); @@ -697,8 +697,8 @@ @Test // Do not optimize these, just to be sure we do not mess with store ordering. - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "8"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test1h(byte[] a) { UNSAFE.putByteVolatile(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 0, (byte)0xbe); @@ -714,8 +714,8 @@ @Test // Do not optimize these, just to be sure we do not mess with store ordering. - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "8"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test1i(byte[] a) { UNSAFE.putByteOpaque(a, UNSAFE.ARRAY_BYTE_BASE_OFFSET + 0, (byte)0xbe); @@ -743,13 +743,13 @@ } @Test - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"little-endian", "true"}) - @IR(counts = { IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", + @IR(counts = { IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", IRNode.REVERSE_BYTES_L, "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) @@ -766,7 +766,7 @@ } @Test - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test2b(byte[] a, int offset, long v) { // Add custom null check, to ensure the unsafe access always recognizes its type as an array store @@ -776,13 +776,13 @@ } @Test - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"little-endian", "true"}) - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", IRNode.REVERSE_BYTES_L, "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) @@ -823,14 +823,14 @@ } @Test - @IR(counts = { IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", + @IR(counts = { IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", IRNode.REVERSE_BYTES_L, "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatformAnd = {"little-endian", "true", "riscv64", "false"}) // Exclude riscv64 where ReverseBytes is only conditionally supported - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) static Object[] test2aBE(byte[] a, int offset, long v) { @@ -846,7 +846,7 @@ } @Test - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test2bBE(byte[] a, int offset, long v) { // Add custom null check, to ensure the unsafe access always recognizes its type as an array store @@ -856,14 +856,14 @@ } @Test - @IR(counts = { IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", + @IR(counts = { IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", IRNode.REVERSE_BYTES_L, "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatformAnd = {"little-endian", "true", "riscv64", "false"}) // Exclude riscv64 where ReverseBytes is only conditionally supported - @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) static Object[] test2cBE(byte[] a, int offset, long v) { @@ -903,16 +903,16 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "2", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"little-endian", "true"}) - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "2", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", IRNode.REVERSE_BYTES_I, "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) @@ -942,14 +942,14 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "2", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", IRNode.REVERSE_BYTES_I, "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatformAnd = {"little-endian", "true", "riscv64", "false"}) // Exclude riscv64 where ReverseBytes is only conditionally supported - @IR(counts = {IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2"}, + @IR(counts = {IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "2"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) static Object[] test3aBE(byte[] a, int offset, long v) { @@ -987,16 +987,16 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "4", // 3 (+ 1 for uncommon trap) - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "4", // 3 (+ 1 for uncommon trap) + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "3", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "2", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"little-endian", "true"}) - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "4", // Unmerged stores: offset + (2,3,16) , and 1 for uncommon trap - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3", // 1([+0,+1]) for platform order and 2([+4,+5], [+14,+15]) for reverse order - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2", // 1([+6,+9]) for platform order and 1([+10,+13]) for reverse order - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "4", // Unmerged stores: offset + (2,3,16) , and 1 for uncommon trap + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "3", // 1([+0,+1]) for platform order and 2([+4,+5], [+14,+15]) for reverse order + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "2", // 1([+6,+9]) for platform order and 1([+10,+13]) for reverse order + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", IRNode.REVERSE_BYTES_I, "1", IRNode.REVERSE_BYTES_S, "2"}, applyIf = {"UseUnalignedAccesses", "true"}, @@ -1045,18 +1045,18 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "4", // Unmerged stores: offset + (2,3,16) , and 1 for uncommon trap - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3", // 1([+0,+1]) for platform order and 2([+4,+5], [+14,+15]) for reverse order - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2", // 1([+6,+9]) for platform order and 1([+10,+13]) for reverse order - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "4", // Unmerged stores: offset + (2,3,16) , and 1 for uncommon trap + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "3", // 1([+0,+1]) for platform order and 2([+4,+5], [+14,+15]) for reverse order + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "2", // 1([+6,+9]) for platform order and 1([+10,+13]) for reverse order + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", IRNode.REVERSE_BYTES_I, "1", IRNode.REVERSE_BYTES_S, "2"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatformAnd = {"little-endian", "true", "riscv64", "false"}) // Exclude riscv64 where ReverseBytes is only conditionally supported - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "4", // 3 (+ 1 for uncommon trap) - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "4", // 3 (+ 1 for uncommon trap) + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "3", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "2", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) static Object[] test4aBE(byte[] a, int offset, long v1, int v2, short v3, byte v4) { @@ -1101,10 +1101,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test5a(byte[] a, int offset) { a[offset + 0] = (byte)0x01; @@ -1139,10 +1139,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "8", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}) static Object[] test6a(byte[] a, byte[] b, int offset1, int offset2) { a[offset1 + 1] = (byte)0x02; a[offset1 + 3] = (byte)0x04; @@ -1164,10 +1164,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "3", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}) static Object[] test7a(byte[] a, int offset1, int v1) { a[offset1 + 1] = (byte)(v1 >> 8); a[offset1 + 2] = (byte)(v1 >> 16); @@ -1184,10 +1184,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "3", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}) static Object[] test7aBE(byte[] a, int offset1, int v1) { a[offset1 + 1] = (byte)(v1 >> 24); a[offset1 + 2] = (byte)(v1 >> 16); @@ -1211,10 +1211,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8", // no merge - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "8", // no merge + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}) static Object[] test10a(byte[] a) { // We have 11 summands: 10x zero variable + 1x array base. // Parsing only allows 10 summands -> does not merge the stores. @@ -1232,10 +1232,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // 1 left in uncommon trap path of RangeCheck - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, // all merged + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", // 1 left in uncommon trap path of RangeCheck + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, // all merged applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test10b(byte[] a) { int zero = zero0 + zero1 + zero2 + zero3 + zero4 @@ -1254,10 +1254,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // 1 left in uncommon trap path of RangeCheck - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, // all merged + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", // 1 left in uncommon trap path of RangeCheck + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, // all merged applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test10c(byte[] a) { int zero = 7 * zero0 + 7 * zero1 + 7 * zero2 + 7 * zero3 + 7 * zero4 @@ -1277,10 +1277,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, // all merged + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, // all merged applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test10d(byte[] a) { // Summand is subtracted from itself -> scale = 0 -> should be removed from list. @@ -1296,10 +1296,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, // all merged + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, // all merged applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test10e(byte[] a) { // Summand is subtracted from itself -> scale = 0 -> should be removed from list. Thus equal to if not present at all. @@ -1315,10 +1315,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8", // no merge - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "8", // no merge + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}) static Object[] test10f(byte[] a) { int big = 1 << 29; // Adding up the scales overflows -> no merge. @@ -1355,10 +1355,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_I_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_L_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_I_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_L_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "3"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test100a(short[] a, int offset) { a[offset + 0] = (short)0x0100; // stays unchanged -> both used for RC and Return path @@ -1399,10 +1399,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // only for RC - IRNode.STORE_I_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_L_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", // only for RC + IRNode.STORE_I_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_L_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "3"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test101a(short[] a, int offset) { a[offset + 0] = (short)0x0100; // I plus kept unchanged for RC @@ -1445,16 +1445,16 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "4", // 3 (+1 that goes into RC) - IRNode.STORE_I_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3", - IRNode.STORE_L_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "4", // 3 (+1 that goes into RC) + IRNode.STORE_I_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "3", + IRNode.STORE_L_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "2"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"little-endian", "true"}) - @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "12", - IRNode.STORE_I_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // Stores of constants can be merged - IRNode.STORE_L_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "12", + IRNode.STORE_I_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", // Stores of constants can be merged + IRNode.STORE_L_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) static Object[] test102a(short[] a, int offset, long v1, int v2, short v3) { @@ -1501,16 +1501,16 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "12", - IRNode.STORE_I_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // Stores of constants can be merged - IRNode.STORE_L_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "12", + IRNode.STORE_I_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", // Stores of constants can be merged + IRNode.STORE_L_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"little-endian", "true"}) - @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "4", // 3 (+1 that goes into RC) - IRNode.STORE_I_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "3", - IRNode.STORE_L_OF_CLASS, "short\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "4", // 3 (+1 that goes into RC) + IRNode.STORE_I_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "3", + IRNode.STORE_L_OF_CLASS, "short\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "2"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) static Object[] test102aBE(short[] a, int offset, long v1, int v2, short v3) { @@ -1555,10 +1555,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "7"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_L_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "7"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test200a(int[] a, int offset) { a[offset + 0] = 0x01001236; // stays unchanged -> both used for RC and Return path @@ -1599,10 +1599,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // only for RC - IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "7"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", // only for RC + IRNode.STORE_L_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "7"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test201a(int[] a, int offset) { a[offset + 0] = 0x01001236; // L and also kept unchanged for RC @@ -1645,16 +1645,16 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "6", // 5 (+1 that goes into RC) - IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "6"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "6", // 5 (+1 that goes into RC) + IRNode.STORE_L_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "6"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"little-endian", "true"}) - @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "10", - IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "4"}, // Stores of constants can be merged + @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "10", + IRNode.STORE_L_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "4"}, // Stores of constants can be merged applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) static Object[] test202a(int[] a, int offset, long v1, int v2) { @@ -1701,16 +1701,16 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "10", - IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "4"}, // Stores of constants can be merged + @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "10", + IRNode.STORE_L_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "4"}, // Stores of constants can be merged applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"little-endian", "true"}) - @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "6", // 5 (+1 that goes into RC) - IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "6"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "6", // 5 (+1 that goes into RC) + IRNode.STORE_L_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "6"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) static Object[] test202aBE(int[] a, int offset, long v1, int v2) { @@ -1745,7 +1745,7 @@ } @Test - @IR(counts = {IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2"}, + @IR(counts = {IRNode.STORE_L_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "2"}, applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test300a(int[] a) { a[2] = 42; @@ -1771,10 +1771,10 @@ @Test // All constants are known, and AddI can be converted to AddL safely, hence the stores can be merged. - @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, // all merged + @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, // all merged applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test400a(int[] a) { UNSAFE.putByte(a, UNSAFE.ARRAY_INT_BASE_OFFSET + 0, (byte)0xbe); @@ -1818,16 +1818,16 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // for RangeCheck trap - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, // expect merged + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", // for RangeCheck trap + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, // expect merged applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"little-endian", "true"}) - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // for RangeCheck trap - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // expect merged + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", // for RangeCheck trap + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", // expect merged IRNode.REVERSE_BYTES_L, "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) @@ -1855,10 +1855,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8", // No optimization because of too many RangeChecks - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "8", // No optimization because of too many RangeChecks + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}) static Object[] test501a(byte[] a, int offset, long v) { int idx = 0; try { @@ -1883,10 +1883,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8", // No optimization because of too many RangeChecks - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "8", // No optimization because of too many RangeChecks + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}) static Object[] test502a(byte[] a, int offset, long v) { int idx = 0; try { @@ -1940,17 +1940,17 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // for RangeCheck trap - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // expect merged + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", // for RangeCheck trap + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", // expect merged IRNode.REVERSE_BYTES_L, "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatformAnd = {"little-endian", "true", "riscv64", "false"}) // Exclude riscv64 where ReverseBytes is only conditionally supported - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", // for RangeCheck trap - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, // expect merged + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", // for RangeCheck trap + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, // expect merged applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) static Object[] test500aBE(byte[] a, int offset, long v) { @@ -1977,17 +1977,17 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "7", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "7", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", IRNode.REVERSE_BYTES_S, "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatformAnd = {"little-endian", "true", "riscv64", "false"}) // Exclude riscv64 where ReverseBytes is only conditionally supported - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "7", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "7", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) static Object[] test501aBE(byte[] a, int offset, long v) { @@ -2014,17 +2014,17 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "7", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "7", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", IRNode.REVERSE_BYTES_S, "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatformAnd = {"little-endian", "true", "riscv64", "false"}) // Exclude riscv64 where ReverseBytes is only conditionally supported - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "7", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "7", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) static Object[] test502aBE(byte[] a, int offset, long v) { @@ -2073,10 +2073,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "bottom\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "bottom\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "bottom\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "bottom\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, // all merged + @IR(counts = {IRNode.STORE_B_OF_CLASS, "bottom\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "bottom\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "bottom\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "bottom\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, // all merged applyIf = {"UseUnalignedAccesses", "true"}) static Object[] test600a(byte[] aB, int[] aI, int i) { Object a = null; @@ -2123,15 +2123,15 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "bottom\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "8", // nothing merged - IRNode.STORE_C_OF_CLASS, "bottom\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "bottom\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "bottom\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "bottom\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "8", // nothing merged + IRNode.STORE_C_OF_CLASS, "bottom\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "bottom\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "bottom\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}, applyIfPlatform = {"64-bit", "true"}) - @IR(counts = {IRNode.STORE_B_OF_CLASS, "bottom\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "bottom\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "bottom\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "bottom\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1"}, // all merged + @IR(counts = {IRNode.STORE_B_OF_CLASS, "bottom\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "bottom\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "bottom\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "bottom\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1"}, // all merged applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"32-bit", "true"}) static Object[] test601a(byte[] aB, int[] aI, int i, int offset1) { @@ -2165,10 +2165,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_C_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2", - IRNode.STORE_L_OF_CLASS, "int\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + @IR(counts = {IRNode.STORE_B_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_C_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "2", + IRNode.STORE_L_OF_CLASS, "int\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}) static Object[] test700a(int[] a, long v1) { // Negative shift: cannot optimize a[0] = (int)(v1 >> -1); @@ -2188,10 +2188,10 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "6", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}) + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "6", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}) static Object[] test800a(byte[] a, int offset, long v) { // Merge attempts begin at the lowest store in the Memory chain. // Candidates are found following the chain. The list is trimmed to a @@ -2217,17 +2217,17 @@ } @Test - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "2", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", IRNode.REVERSE_BYTES_I, "1"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatformAnd = {"little-endian", "true", "riscv64", "false"}) // Exclude riscv64 where ReverseBytes is only conditionally supported - @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "2", - IRNode.STORE_C_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0", - IRNode.STORE_I_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "1", - IRNode.STORE_L_OF_CLASS, "byte\\\\[int:>=0] \\\\(java/lang/Cloneable,java/io/Serializable\\\\)", "0"}, + @IR(counts = {IRNode.STORE_B_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "2", + IRNode.STORE_C_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0", + IRNode.STORE_I_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "1", + IRNode.STORE_L_OF_CLASS, "byte\\[int:>=0] \\(java/lang/Cloneable,java/io/Serializable\\)", "0"}, applyIf = {"UseUnalignedAccesses", "true"}, applyIfPlatform = {"big-endian", "true"}) static Object[] test800aBE(byte[] a, int offset, long v) { diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/cr6865031/Test.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/cr6865031/Test.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/cr6865031/Test.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/cr6865031/Test.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright 2009 Goldman Sachs International. All Rights Reserved. - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/irTests/TestAutoVectorization2DArray.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/irTests/TestAutoVectorization2DArray.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/irTests/TestAutoVectorization2DArray.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/irTests/TestAutoVectorization2DArray.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/irTests/TestIfMinMax.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/irTests/TestIfMinMax.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/c2/irTests/TestIfMinMax.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/c2/irTests/TestIfMinMax.java 2025-12-18 08:04:02.000000000 +0000 @@ -296,7 +296,11 @@ @Test @IR(applyIf = { "SuperWordReductions", "true" }, - applyIfCPUFeatureOr = { "avx512", "true", "rvv", "true" }, + applyIfCPUFeature = { "avx512", "true" }, + counts = { IRNode.MAX_REDUCTION_V, "> 0" }) + @IR(applyIfPlatform = {"riscv64", "true"}, + applyIfAnd = { "SuperWordReductions", "true", "MaxVectorSize", ">=32" }, + applyIfCPUFeature = { "rvv", "true" }, counts = { IRNode.MAX_REDUCTION_V, "> 0" }) @Arguments(setup = "setupLongArrays") public Object[] testMaxLongReduction(long[] a, long[] b) { @@ -331,7 +335,11 @@ @Test @IR(applyIf = { "SuperWordReductions", "true" }, - applyIfCPUFeatureOr = { "avx512", "true", "rvv", "true" }, + applyIfCPUFeature = { "avx512", "true" }, + counts = { IRNode.MIN_REDUCTION_V, "> 0" }) + @IR(applyIfPlatform = {"riscv64", "true"}, + applyIfAnd = { "SuperWordReductions", "true", "MaxVectorSize", ">=32" }, + applyIfCPUFeature = { "rvv", "true" }, counts = { IRNode.MIN_REDUCTION_V, "> 0" }) @Arguments(setup = "setupLongArrays") public Object[] testMinLongReduction(long[] a, long[] b) { diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/compilercontrol/TestConflictInlineCommands.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/compilercontrol/TestConflictInlineCommands.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/compilercontrol/TestConflictInlineCommands.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/compilercontrol/TestConflictInlineCommands.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/debug/TraceIterativeGVN.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/debug/TraceIterativeGVN.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/debug/TraceIterativeGVN.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/debug/TraceIterativeGVN.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/gcbarriers/TestG1BarrierGeneration.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/gcbarriers/TestG1BarrierGeneration.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/gcbarriers/TestG1BarrierGeneration.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/gcbarriers/TestG1BarrierGeneration.java 2025-12-18 08:04:02.000000000 +0000 @@ -884,6 +884,16 @@ 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(); + o.f = oldVal; Object newVal = new Object(); boolean b = testCompareAndSwap(o, oldVal, newVal); Asserts.assertTrue(b); @@ -891,6 +901,16 @@ } { 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(); o.f = oldVal; Object newVal = new Object(); diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/intrinsics/float16/Binary16ConversionNaN_2.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/float16/Binary16ConversionNaN_2.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/intrinsics/float16/Binary16ConversionNaN_2.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/float16/Binary16ConversionNaN_2.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,178 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2025, Rivos Inc. 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 8365206 + * @summary Verify NaN sign and significand bits are preserved across conversions, + * float -> float16 -> float + * @requires (os.arch == "riscv64" & vm.cpu.features ~= ".*zfh.*") + * @requires vm.compiler1.enabled & vm.compiler2.enabled + * @requires vm.compMode != "Xcomp" + * @library /test/lib / + * + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI + * -Xmixed -XX:-BackgroundCompilation -XX:-UseOnStackReplacement + * -XX:CompileThresholdScaling=1000.0 Binary16ConversionNaN_2 + */ + +/* + * The behavior tested below is an implementation property not + * required by the specification. It would be acceptable for this + * information to not be preserved (as long as a NaN is returned) if, + * say, a intrinsified version using native hardware instructions + * behaved differently. + * + * If that is the case, this test should be modified to disable + * intrinsics or to otherwise not run on platforms with an differently + * behaving intrinsic. + */ + +import compiler.whitebox.CompilerWhiteBoxTest; +import jdk.test.whitebox.WhiteBox; +import java.lang.reflect.Method; +import java.util.Random; + +public class Binary16ConversionNaN_2 { + + private static final WhiteBox WHITE_BOX = WhiteBox.getWhiteBox(); + + /* + * Put all 16-bit NaN values through a conversion loop and make + * sure the significand, sign, and exponent are all preserved. + */ + public static void main(String... argv) throws NoSuchMethodException { + int errors = 0; + final int NAN_EXPONENT = 0x7f80_0000; + final int SIGN_BIT = 0x8000_0000; + + // First, run with Interpreter only to collect "gold" data. + // Glags -Xmixed -XX:CompileThresholdScaling=1000.0 are used + // to prevent compilation during this phase. + float[] pVal = new float[1024]; + float[] pRes = new float[1024]; + float[] nVal = new float[1024]; + float[] nRes = new float[1024]; + + Random rand = new Random(); + + // A NaN has a nonzero significand + for (int i = 1; i <= 0x3ff; i++) { + int shift = rand.nextInt(13+1); + int binaryNaN = (NAN_EXPONENT | (i << shift)); + assert isNaN(binaryNaN); + // the payloads of non-canonical NaNs are preserved. + float f1 = Float.intBitsToFloat(binaryNaN); + float f2 = testRoundTrip(f1); + errors += verify(f1, f2); + pVal[i] = f1; + pRes[i] = f2; + + int binaryNegNaN = (SIGN_BIT | binaryNaN); + float f3 = Float.intBitsToFloat(binaryNegNaN); + float f4 = testRoundTrip(f3); + errors += verify(f3, f4); + nVal[i] = f3; + nRes[i] = f4; + } + if (errors > 0) { // Exit if Interpreter failed + throw new RuntimeException(errors + " errors"); + } + + Method test_method = Binary16ConversionNaN_2.class.getDeclaredMethod("testRoundTrip", float.class); + + // Compile with C1 and compare results + WHITE_BOX.enqueueMethodForCompilation(test_method, CompilerWhiteBoxTest.COMP_LEVEL_SIMPLE); + if (!WHITE_BOX.isMethodCompiled(test_method)) { + throw new RuntimeException("test is not compiled by C1"); + } + for (int i = 1; i <= 0x3ff; i++) { + float f1 = testRoundTrip(pVal[i]); + errors += verifyCompiler(pRes[i], f1, "C1"); + float f2 = testRoundTrip(nVal[i]); + errors += verifyCompiler(nRes[i], f2, "C1"); + } + + WHITE_BOX.deoptimizeMethod(test_method); + + // Compile with C2 and compare results + WHITE_BOX.enqueueMethodForCompilation(test_method, CompilerWhiteBoxTest.COMP_LEVEL_FULL_OPTIMIZATION); + if (!WHITE_BOX.isMethodCompiled(test_method)) { + throw new RuntimeException("test is not compiled by C2"); + } + for (int i = 1; i <= 0x3ff; i++) { + float f1 = testRoundTrip(pVal[i]); + errors += verifyCompiler(pRes[i], f1, "C2"); + float f2 = testRoundTrip(nVal[i]); + errors += verifyCompiler(nRes[i], f2, "C2"); + } + + if (errors > 0) { + throw new RuntimeException(errors + " errors"); + } + } + + private static boolean isNaN(int binary) { + return ((binary & 0x7f80_0000) == 0x7f80_0000) // Max exponent and... + && ((binary & 0x007f_ffff) != 0 ); // significand nonzero. + } + + private static float testRoundTrip(float f) { + short s = Float.floatToFloat16(f); + return Float.float16ToFloat(s); + } + + private static int verify(float f1, float f2) { + int errors = 0; + int i1 = Float.floatToRawIntBits(f1); + int i2 = Float.floatToRawIntBits(f2); + assert Float.isNaN(f1); + if (!Float.isNaN(f2) || + ((i1 & 0x8000_0000) != (i2 & 0x8000_0000))) { + errors++; + System.out.println("Roundtrip failure on NaN value " + + Integer.toHexString(i1) + + "\t got back " + Integer.toHexString(i2)); + } + return errors; + } + + private static int verifyCompiler(float f1, float f2, String name) { + int errors = 0; + int i1 = Float.floatToRawIntBits(f1); + int i2 = Float.floatToRawIntBits(f2); + assert Float.isNaN(f1); + if (!Float.isNaN(f2) || + ((i1 & 0x8000_0000) != (i2 & 0x8000_0000))) { + errors++; + System.out.println("Roundtrip failure on NaN value " + + Integer.toHexString(i1) + + "\t got back " + Integer.toHexString(i2) + + "\t from " + name + " code"); + } + return errors; + } +} diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/intrinsics/math/TestPow0Dot5Opt.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/math/TestPow0Dot5Opt.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/intrinsics/math/TestPow0Dot5Opt.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/math/TestPow0Dot5Opt.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/intrinsics/math/TestPow2Opt.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/math/TestPow2Opt.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/intrinsics/math/TestPow2Opt.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/math/TestPow2Opt.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnSupportedCPU.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnSupportedCPU.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnSupportedCPU.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnSupportedCPU.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2020, Huawei Technologies Co., Ltd. All rights reserved. - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnUnsupportedCPU.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnUnsupportedCPU.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnUnsupportedCPU.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/intrinsics/sha/cli/TestUseSHA3IntrinsicsOptionOnUnsupportedCPU.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2020, Huawei Technologies Co., Ltd. All rights reserved. - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/jvmci/errors/TestInvalidTieredStopAtLevel.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jvmci/errors/TestInvalidTieredStopAtLevel.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/jvmci/errors/TestInvalidTieredStopAtLevel.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/jvmci/errors/TestInvalidTieredStopAtLevel.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2020, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/lib/compile_framework/Compile.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/lib/compile_framework/Compile.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/lib/compile_framework/Compile.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/lib/compile_framework/Compile.java 2025-12-18 08:04:02.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 @@ -40,6 +40,7 @@ */ class Compile { private static final int COMPILE_TIMEOUT = 60; + private static final float timeoutFactor = Float.parseFloat(System.getProperty("test.timeout.factor", "1.0")); private static final String JAVA_PATH = JDKToolFinder.getJDKTool("java"); private static final String JAVAC_PATH = JDKToolFinder.getJDKTool("javac"); @@ -182,7 +183,8 @@ int exitCode; try { Process process = builder.start(); - boolean exited = process.waitFor(COMPILE_TIMEOUT, TimeUnit.SECONDS); + long timeout = COMPILE_TIMEOUT * (long)timeoutFactor; + boolean exited = process.waitFor(timeout, TimeUnit.SECONDS); if (!exited) { process.destroyForcibly(); System.out.println("Timeout: compile command: " + String.join(" ", command)); diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/irrule/checkattribute/parsing/RawIRNode.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/irrule/checkattribute/parsing/RawIRNode.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/irrule/checkattribute/parsing/RawIRNode.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/lib/ir_framework/driver/irmatching/irrule/checkattribute/parsing/RawIRNode.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 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,8 @@ import compiler.lib.ir_framework.driver.irmatching.parser.VMInfo; import compiler.lib.ir_framework.driver.SuccessOnlyConstraintException; +import java.util.regex.Matcher; + /** * This class represents a "raw IR node" as read from a check attribute. It has a node part that either represents an * {@link IRNode} placeholder string or a user defined regex. In the former case, we could additionally have a user @@ -62,7 +64,7 @@ if (IRNode.isVectorIRNode(node)) { nodeRegex = regexForVectorIRNode(nodeRegex, vmInfo, bound); } else if (userPostfix.isValid()) { - nodeRegex = nodeRegex.replaceAll(IRNode.IS_REPLACED, userPostfix.value()); + nodeRegex = nodeRegex.replaceAll(IRNode.IS_REPLACED, Matcher.quoteReplacement(userPostfix.value())); } } return nodeRegex; diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/LoopReductionHasControlOrBadInput.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/LoopReductionHasControlOrBadInput.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/LoopReductionHasControlOrBadInput.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/LoopReductionHasControlOrBadInput.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * 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 8350576 + * @summary Optimization bails out and hits an assert: + * assert(false) failed: reduction has ctrl or bad vector_input + * @run main/othervm -Xbatch -XX:-TieredCompilation + * -XX:CompileCommand=compileonly,compiler.loopopts.LoopReductionHasControlOrBadInput::* + * compiler.loopopts.LoopReductionHasControlOrBadInput + * @run main compiler.loopopts.LoopReductionHasControlOrBadInput + * + */ + +package compiler.loopopts; + +public class LoopReductionHasControlOrBadInput { + static long lFld; + static long lArr[] = new long[400]; + + static void test() { + int i = 1; + do { + long x = -1; + lArr[i] = i; + lFld += i | x; + } while (++i < 355); + } + + public static void main(String[] strArr) { + for (int i = 0; i < 100; i++) { + test(); + } + } +} diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/TestLoopEndNodeEliminate.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/TestLoopEndNodeEliminate.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/TestLoopEndNodeEliminate.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/TestLoopEndNodeEliminate.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/TestLoopPredicateDep.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/TestLoopPredicateDep.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/TestLoopPredicateDep.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/TestLoopPredicateDep.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/TestSkeletonPredicateNegation.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/TestSkeletonPredicateNegation.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/TestSkeletonPredicateNegation.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/TestSkeletonPredicateNegation.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. All rights reserved. * Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/superword/RedTest_long.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/RedTest_long.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/superword/RedTest_long.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/RedTest_long.java 2025-12-18 08:04:02.000000000 +0000 @@ -140,7 +140,7 @@ counts = {IRNode.ADD_REDUCTION_VL, ">= 1", IRNode.ADD_REDUCTION_VL, "<= 2"}) // one for main-loop, one for vector-post-loop @IR(applyIfPlatform = {"riscv64", "true"}, applyIfCPUFeature = {"rvv", "true"}, - applyIfAnd = {"SuperWordReductions", "true", "LoopMaxUnroll", ">= 8"}, + applyIfAnd = {"SuperWordReductions", "true", "LoopMaxUnroll", ">= 8", "MaxVectorSize", ">=32"}, counts = {IRNode.ADD_REDUCTION_VL, ">= 1", IRNode.ADD_REDUCTION_VL, "<= 2"}) // one for main-loop, one for vector-post-loop public static long sumReductionImplement( long[] a, @@ -162,7 +162,7 @@ counts = {IRNode.OR_REDUCTION_V, ">= 1", IRNode.OR_REDUCTION_V, "<= 2"}) // one for main-loop, one for vector-post-loop @IR(applyIfPlatform = {"riscv64", "true"}, applyIfCPUFeature = {"rvv", "true"}, - applyIfAnd = {"SuperWordReductions", "true", "LoopMaxUnroll", ">= 8"}, + applyIfAnd = {"SuperWordReductions", "true", "LoopMaxUnroll", ">= 8", "MaxVectorSize", ">=32"}, counts = {IRNode.OR_REDUCTION_V, ">= 1", IRNode.OR_REDUCTION_V, "<= 2"}) // one for main-loop, one for vector-post-loop public static long orReductionImplement( long[] a, @@ -184,7 +184,7 @@ counts = {IRNode.AND_REDUCTION_V, ">= 1", IRNode.AND_REDUCTION_V, "<= 2"}) // one for main-loop, one for vector-post-loop @IR(applyIfPlatform = {"riscv64", "true"}, applyIfCPUFeature = {"rvv", "true"}, - applyIfAnd = {"SuperWordReductions", "true", "LoopMaxUnroll", ">= 8"}, + applyIfAnd = {"SuperWordReductions", "true", "LoopMaxUnroll", ">= 8", "MaxVectorSize", ">=32"}, counts = {IRNode.AND_REDUCTION_V, ">= 1", IRNode.AND_REDUCTION_V, "<= 2"}) // one for main-loop, one for vector-post-loop public static long andReductionImplement( long[] a, @@ -206,7 +206,7 @@ counts = {IRNode.XOR_REDUCTION_V, ">= 1", IRNode.XOR_REDUCTION_V, "<= 2"}) // one for main-loop, one for vector-post-loop @IR(applyIfPlatform = {"riscv64", "true"}, applyIfCPUFeature = {"rvv", "true"}, - applyIfAnd = {"SuperWordReductions", "true", "LoopMaxUnroll", ">= 8"}, + applyIfAnd = {"SuperWordReductions", "true", "LoopMaxUnroll", ">= 8", "MaxVectorSize", ">=32"}, counts = {IRNode.XOR_REDUCTION_V, ">= 1", IRNode.XOR_REDUCTION_V, "<= 2"}) // one for main-loop, one for vector-post-loop public static long xorReductionImplement( long[] a, @@ -228,7 +228,7 @@ counts = {IRNode.MUL_REDUCTION_VL, ">= 1", IRNode.MUL_REDUCTION_VL, "<= 2"}) // one for main-loop, one for vector-post-loop @IR(applyIfPlatform = {"riscv64", "true"}, applyIfCPUFeature = {"rvv", "true"}, - applyIfAnd = {"SuperWordReductions", "true", "LoopMaxUnroll", ">= 8"}, + applyIfAnd = {"SuperWordReductions", "true", "LoopMaxUnroll", ">= 8", "MaxVectorSize", ">=32"}, counts = {IRNode.MUL_REDUCTION_VL, ">= 1", IRNode.MUL_REDUCTION_VL, "<= 2"}) // one for main-loop, one for vector-post-loop public static long mulReductionImplement( long[] a, diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/superword/SumRed_Long.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/SumRed_Long.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/superword/SumRed_Long.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/SumRed_Long.java 2025-12-18 08:04:02.000000000 +0000 @@ -98,7 +98,7 @@ counts = {IRNode.ADD_REDUCTION_VL, ">= 1", IRNode.ADD_REDUCTION_VL, "<= 2"}) // one for main-loop, one for vector-post-loop @IR(applyIfPlatform = {"riscv64", "true"}, applyIfCPUFeature = {"rvv", "true"}, - applyIfAnd = {"SuperWordReductions", "true", "LoopMaxUnroll", ">= 8"}, + applyIfAnd = {"SuperWordReductions", "true", "LoopMaxUnroll", ">= 8", "MaxVectorSize", ">=32"}, counts = {IRNode.ADD_REDUCTION_VL, ">= 1", IRNode.ADD_REDUCTION_VL, "<= 2"}) // one for main-loop, one for vector-post-loop public static long sumReductionImplement( long[] a, diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/superword/TestAlignVector.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/TestAlignVector.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/superword/TestAlignVector.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/TestAlignVector.java 2025-12-18 08:04:02.000000000 +0000 @@ -1063,8 +1063,16 @@ IRNode.ADD_VL, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfPlatform = {"64-bit", "true"}, - applyIfCPUFeatureOr = {"avx2", "true", "rvv", "true"}) + applyIfCPUFeature = {"avx2", "true"}) // require avx to ensure vectors are larger than what unrolling produces + @IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", + IRNode.LOAD_VECTOR_L, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", + IRNode.ADD_VI, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", + IRNode.ADD_VL, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", + IRNode.STORE_VECTOR, "> 0"}, + applyIfPlatform = {"riscv64", "true"}, + applyIfCPUFeature = {"rvv", "true"}, + applyIf = {"MaxVectorSize", ">=32"}) static Object[] test13aIL(int[] a, long[] b) { for (int i = 0; i < RANGE; i++) { a[i]++; @@ -1175,8 +1183,16 @@ IRNode.ADD_VL, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", IRNode.STORE_VECTOR, "> 0"}, applyIfPlatform = {"64-bit", "true"}, - applyIfCPUFeatureOr = {"avx2", "true", "rvv", "true"}) + applyIfCPUFeature = {"avx2", "true"}) // require avx to ensure vectors are larger than what unrolling produces + @IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", + IRNode.LOAD_VECTOR_L, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", + IRNode.ADD_VI, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", + IRNode.ADD_VL, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", + IRNode.STORE_VECTOR, "> 0"}, + applyIfPlatform = {"riscv64", "true"}, + applyIfCPUFeature = {"rvv", "true"}, + applyIf = {"MaxVectorSize", ">=32"}) static Object[] test13bIL(int[] a, long[] b) { for (int i = 1; i < RANGE; i++) { a[i]++; diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/superword/TestGeneralizedReductions.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/TestGeneralizedReductions.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/superword/TestGeneralizedReductions.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/TestGeneralizedReductions.java 2025-12-18 08:04:02.000000000 +0000 @@ -81,10 +81,14 @@ } @Test - @IR(applyIfCPUFeatureOr = {"avx2", "true", "rvv", "true"}, + @IR(applyIfCPUFeature = {"avx2", "true"}, applyIf = {"SuperWordReductions", "true"}, applyIfPlatform = {"64-bit", "true"}, counts = {IRNode.ADD_REDUCTION_VI, ">= 1"}) + @IR(applyIfPlatform = {"riscv64", "true"}, + applyIfCPUFeature = {"rvv", "true"}, + applyIfAnd = {"SuperWordReductions", "true", "MaxVectorSize", ">=32"}, + counts = {IRNode.ADD_REDUCTION_VI, ">= 1"}) private static long testReductionOnGlobalAccumulator(long[] array) { acc = 0; for (int i = 0; i < array.length; i++) { @@ -94,10 +98,14 @@ } @Test - @IR(applyIfCPUFeatureOr = {"avx2", "true", "rvv", "true"}, + @IR(applyIfCPUFeature = {"avx2", "true"}, applyIf = {"SuperWordReductions", "true"}, applyIfPlatform = {"64-bit", "true"}, counts = {IRNode.ADD_REDUCTION_VI, ">= 1"}) + @IR(applyIfPlatform = {"riscv64", "true"}, + applyIfCPUFeature = {"rvv", "true"}, + applyIfAnd = {"SuperWordReductions", "true", "MaxVectorSize", ">=32"}, + counts = {IRNode.ADD_REDUCTION_VI, ">= 1"}) private static long testReductionOnPartiallyUnrolledLoop(long[] array) { int sum = 0; for (int i = 0; i < array.length / 2; i++) { @@ -108,10 +116,14 @@ } @Test - @IR(applyIfCPUFeatureOr = {"avx2", "true", "rvv", "true"}, + @IR(applyIfCPUFeature = {"avx2", "true"}, applyIf = {"SuperWordReductions", "true"}, applyIfPlatform = {"64-bit", "true"}, counts = {IRNode.ADD_REDUCTION_VI, ">= 1"}) + @IR(applyIfPlatform = {"riscv64", "true"}, + applyIfCPUFeature = {"rvv", "true"}, + applyIfAnd = {"SuperWordReductions", "true", "MaxVectorSize", ">=32"}, + counts = {IRNode.ADD_REDUCTION_VI, ">= 1"}) private static long testReductionOnLargePartiallyUnrolledLoop(long[] array) { int sum = 0; for (int i = 0; i < array.length / 8; i++) { @@ -148,13 +160,13 @@ @Test @IR(applyIfCPUFeatureOr = {"avx2", "true"}, - applyIfAnd = {"SuperWordReductions", "true","UsePopCountInstruction", "true"}, + applyIfAnd = {"SuperWordReductions", "true", "UsePopCountInstruction", "true"}, applyIfPlatform = {"64-bit", "true"}, counts = {IRNode.ADD_REDUCTION_VI, ">= 1", IRNode.POPCOUNT_VL, ">= 1"}) @IR(applyIfPlatform = {"riscv64", "true"}, applyIfCPUFeatureOr = {"zvbb", "true"}, - applyIfAnd = {"SuperWordReductions", "true","UsePopCountInstruction", "true"}, + applyIfAnd = {"SuperWordReductions", "true", "UsePopCountInstruction", "true", "MaxVectorSize", ">=32"}, counts = {IRNode.ADD_REDUCTION_VI, ">= 1", IRNode.POPCOUNT_VL, ">= 1"}) private static long testMapReductionOnGlobalAccumulator(long[] array) { diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/superword/TestUnorderedReductionPartialVectorization.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/TestUnorderedReductionPartialVectorization.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/loopopts/superword/TestUnorderedReductionPartialVectorization.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/loopopts/superword/TestUnorderedReductionPartialVectorization.java 2025-12-18 08:04:02.000000000 +0000 @@ -66,7 +66,19 @@ IRNode.OR_REDUCTION_V, "> 0",}, applyIfOr = {"AlignVector", "false", "UseCompactObjectHeaders", "false"}, applyIfPlatform = {"64-bit", "true"}, - applyIfCPUFeatureOr = {"avx2", "true", "rvv", "true"}) + applyIfCPUFeature = {"avx2", "true"}) + @IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", + IRNode.VECTOR_CAST_I2L, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", + IRNode.OR_REDUCTION_V, "> 0",}, + applyIfAnd = {"AlignVector", "false", "MaxVectorSize", ">=32"}, + applyIfPlatform = {"riscv64", "true"}, + applyIfCPUFeature = {"rvv", "true"}) + @IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", + IRNode.VECTOR_CAST_I2L, IRNode.VECTOR_SIZE + "min(max_int, max_long)", "> 0", + IRNode.OR_REDUCTION_V, "> 0",}, + applyIfAnd = {"UseCompactObjectHeaders", "false", "MaxVectorSize", ">=32"}, + applyIfPlatform = {"riscv64", "true"}, + applyIfCPUFeature = {"rvv", "true"}) static long test1(int[] data, long sum) { for (int i = 0; i < data.length; i+=2) { // Mixing int and long ops means we only end up allowing half of the int diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/oracle/TestInvalidCompileCommand.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/oracle/TestInvalidCompileCommand.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/oracle/TestInvalidCompileCommand.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/oracle/TestInvalidCompileCommand.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/print/TestTraceOptoParse.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/print/TestTraceOptoParse.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/print/TestTraceOptoParse.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/print/TestTraceOptoParse.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (c) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java 2025-12-18 08:04:02.000000000 +0000 @@ -28,7 +28,8 @@ * @summary Test range check hoisting for some scaled iv at array index * @library /test/lib / * @requires vm.flagless - * @requires vm.debug & vm.compiler2.enabled & (os.simpleArch == "x64" | os.arch == "aarch64" | os.arch == "riscv64") + * @requires vm.debug & vm.compiler2.enabled + * @requires os.simpleArch == "x64" | os.arch == "aarch64" | (os.arch == "riscv64" & vm.cpu.features ~= ".*rvv.*") * @modules jdk.incubator.vector * @run main/othervm compiler.rangechecks.TestRangeCheckHoistingScaledIV */ diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/regalloc/TestGCMRecalcPressureNodes.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/regalloc/TestGCMRecalcPressureNodes.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/regalloc/TestGCMRecalcPressureNodes.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/regalloc/TestGCMRecalcPressureNodes.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 @@ -50,4 +50,3 @@ } } } - diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/unsafe/TestMisalignedUnsafeAccess.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/unsafe/TestMisalignedUnsafeAccess.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/unsafe/TestMisalignedUnsafeAccess.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/unsafe/TestMisalignedUnsafeAccess.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2020, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/vectorapi/TestIntrinsicBailOut.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorapi/TestIntrinsicBailOut.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/vectorapi/TestIntrinsicBailOut.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorapi/TestIntrinsicBailOut.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021, 2022, THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, 2022, Tencent. All rights reserved. * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/vectorapi/TestVectorErgonomics.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorapi/TestVectorErgonomics.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/vectorapi/TestVectorErgonomics.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorapi/TestVectorErgonomics.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/vectorapi/TestVectorMathLib.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorapi/TestVectorMathLib.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/vectorapi/TestVectorMathLib.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorapi/TestVectorMathLib.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,131 @@ +/* + * 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.vectorapi; + +import jdk.incubator.vector.FloatVector; +import jdk.incubator.vector.VectorOperators; +import jdk.incubator.vector.VectorSpecies; + +/* + * @test + * @bug 8367333 + * @requires vm.compiler2.enabled + * @modules jdk.incubator.vector + * @library /test/lib + * + * @run main/othervm -Xbatch -XX:-TieredCompilation + * -XX:+UnlockDiagnosticVMOptions -XX:+StressIncrementalInlining + * -XX:CompileCommand=quiet + * -XX:CompileCommand=compileonly,compiler.vectorapi.TestVectorMathLib::test* + * compiler.vectorapi.TestVectorMathLib + */ + +public class TestVectorMathLib { + private static final VectorSpecies SPECIES = FloatVector.SPECIES_PREFERRED; + + static FloatVector testTAN(FloatVector fv) { + return fv.lanewise(VectorOperators.TAN); + } + static FloatVector testTANH(FloatVector fv) { + return fv.lanewise(VectorOperators.TANH); + } + static FloatVector testSIN(FloatVector fv) { + return fv.lanewise(VectorOperators.SIN); + } + static FloatVector testSINH(FloatVector fv) { + return fv.lanewise(VectorOperators.SINH); + } + static FloatVector testCOS(FloatVector fv) { + return fv.lanewise(VectorOperators.COS); + } + static FloatVector testCOSH(FloatVector fv) { + return fv.lanewise(VectorOperators.COSH); + } + static FloatVector testASIN(FloatVector fv) { + return fv.lanewise(VectorOperators.ASIN); + } + static FloatVector testACOS(FloatVector fv) { + return fv.lanewise(VectorOperators.ACOS); + } + static FloatVector testATAN(FloatVector fv) { + return fv.lanewise(VectorOperators.ATAN); + } + static FloatVector testATAN2(FloatVector fv) { + return fv.lanewise(VectorOperators.ATAN2, fv); + } + static FloatVector testCBRT(FloatVector fv) { + return fv.lanewise(VectorOperators.CBRT); + } + static FloatVector testLOG(FloatVector fv) { + return fv.lanewise(VectorOperators.LOG); + } + static FloatVector testLOG10(FloatVector fv) { + return fv.lanewise(VectorOperators.LOG10); + } + static FloatVector testLOG1P(FloatVector fv) { + return fv.lanewise(VectorOperators.LOG1P); + } + static FloatVector testPOW(FloatVector fv) { + return fv.lanewise(VectorOperators.POW, fv); + } + static FloatVector testEXP(FloatVector fv) { + return fv.lanewise(VectorOperators.EXP); + } + static FloatVector testEXPM1(FloatVector fv) { + return fv.lanewise(VectorOperators.EXPM1); + } + static FloatVector testHYPOT(FloatVector fv) { + return fv.lanewise(VectorOperators.HYPOT, fv); + } + + public static void main(String[] args) { + FloatVector z = FloatVector.zero(SPECIES); + for (int i = 0; i < 20_000; i++) { + z.neg(); // unary + z.add(z); // binary + + testTAN(z); + testTANH(z); + testSIN(z); + testSINH(z); + testCOS(z); + testCOSH(z); + testASIN(z); + testACOS(z); + testATAN(z); + testATAN2(z); + testCBRT(z); + testLOG(z); + testLOG10(z); + testLOG1P(z); + testPOW(z); + testEXP(z); + testEXPM1(z); + testHYPOT(z); + } + + System.out.println("TEST PASSED"); + } +} + diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/vectorapi/VectorReinterpretTest.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorapi/VectorReinterpretTest.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/vectorapi/VectorReinterpretTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorapi/VectorReinterpretTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/vectorization/TestFloatConversionsVectorNaN.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorization/TestFloatConversionsVectorNaN.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/vectorization/TestFloatConversionsVectorNaN.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorization/TestFloatConversionsVectorNaN.java 2025-12-18 08:04:02.000000000 +0000 @@ -23,6 +23,7 @@ /** * @test + * @key randomness * @bug 8320646 * @summary Auto-vectorize Float.floatToFloat16, Float.float16ToFloat APIs, with NaN * @requires vm.compiler2.enabled @@ -37,9 +38,11 @@ package compiler.vectorization; import java.util.HexFormat; +import java.util.Random; import compiler.lib.ir_framework.*; import jdk.test.lib.Asserts; +import jdk.test.lib.Utils; public class TestFloatConversionsVectorNaN { private static final int ARRLEN = 1024; @@ -79,14 +82,16 @@ @Run(test = {"test_float_float16"}, mode = RunMode.STANDALONE) public void kernel_test_float_float16() { + Random rand = Utils.getRandomInstance(); int errno = 0; finp = new float[ARRLEN]; sout = new short[ARRLEN]; // Setup for (int i = 0; i < ARRLEN; i++) { - if (i%39 == 0) { - int x = 0x7f800000 + ((i/39) << 13); + if (i%3 == 0) { + int shift = rand.nextInt(13+1); + int x = 0x7f800000 + ((i/39) << shift); x = (i%2 == 0) ? x : (x | 0x80000000); finp[i] = Float.intBitsToFloat(x); } else { @@ -128,7 +133,8 @@ static int assertEquals(int idx, float f, short expected, short actual) { HexFormat hf = HexFormat.of(); - String msg = "floatToFloat16 wrong result: idx: " + idx + ", \t" + f + + String msg = "floatToFloat16 wrong result: idx: " + idx + + ", \t" + f + ", hex: " + Integer.toHexString(Float.floatToRawIntBits(f)) + ",\t expected: " + hf.toHexDigits(expected) + ",\t actual: " + hf.toHexDigits(actual); if ((expected & 0x7c00) != 0x7c00) { @@ -167,7 +173,7 @@ // Setup for (int i = 0; i < ARRLEN; i++) { - if (i%39 == 0) { + if (i%3 == 0) { int x = 0x7c00 + i; x = (i%2 == 0) ? x : (x | 0x8000); sinp[i] = (short)x; diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/vectorization/runner/LoopReductionOpTest.java openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorization/runner/LoopReductionOpTest.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/compiler/vectorization/runner/LoopReductionOpTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/compiler/vectorization/runner/LoopReductionOpTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -177,7 +177,11 @@ @Test @IR(applyIfCPUFeatureOr = {"asimd", "true", "sse2", "true", "rvv", "true"}, counts = {IRNode.STORE_VECTOR, ">0"}) - @IR(applyIfCPUFeatureOr = {"avx2", "true", "rvv", "true"}, + @IR(applyIfCPUFeature = {"avx2", "true"}, + counts = {IRNode.ADD_REDUCTION_V, ">0"}) + @IR(applyIfPlatform = {"riscv64", "true"}, + applyIfCPUFeature = {"rvv", "true"}, + applyIf = {"MaxVectorSize", ">=32" }, counts = {IRNode.ADD_REDUCTION_V, ">0"}) public long reductionWithNonReductionDifferentSizes() { long res = 0L; diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/DockerBasicTest.java openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/DockerBasicTest.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/DockerBasicTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/DockerBasicTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,6 +26,7 @@ * @test * @summary Basic (sanity) test for JDK-under-test inside a docker image. * @requires container.support + * @requires !vm.asan * @library /test/lib * @modules java.base/jdk.internal.misc * java.management diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/ShareTmpDir.java openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/ShareTmpDir.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/ShareTmpDir.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/ShareTmpDir.java 2025-12-18 08:04:02.000000000 +0000 @@ -28,6 +28,7 @@ * @key cgroups * @summary Test for hsperfdata file name conflict when two containers share the same /tmp directory * @requires container.support + * @requires !vm.asan * @library /test/lib * @build WaitForFlagFile * @run driver ShareTmpDir diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestCPUAwareness.java openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestCPUAwareness.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestCPUAwareness.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestCPUAwareness.java 2025-12-18 08:04:02.000000000 +0000 @@ -27,6 +27,7 @@ * @key cgroups * @summary Test JVM's CPU resource awareness when running inside docker container * @requires container.support + * @requires !vm.asan * @library /test/lib * @modules java.base/jdk.internal.misc * java.base/jdk.internal.platform diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestCPUSets.java openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestCPUSets.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestCPUSets.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestCPUSets.java 2025-12-18 08:04:02.000000000 +0000 @@ -27,6 +27,7 @@ * @key cgroups * @summary Test JVM's awareness of cpu sets (cpus and mems) * @requires container.support + * @requires !vm.asan * @requires (os.arch != "s390x") * @library /test/lib * @modules java.base/jdk.internal.misc diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestContainerInfo.java openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestContainerInfo.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestContainerInfo.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestContainerInfo.java 2025-12-18 08:04:02.000000000 +0000 @@ -28,6 +28,7 @@ * @summary Test container info for cgroup v2 * @key cgroups * @requires container.support + * @requires !vm.asan * @library /test/lib * @modules java.base/jdk.internal.misc * java.management diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestJFREvents.java openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJFREvents.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestJFREvents.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJFREvents.java 2025-12-18 08:04:02.000000000 +0000 @@ -30,6 +30,7 @@ * Also make sure that PIDs are based on value provided by container, * not by the host system. * @requires (container.support & os.maxMemory >= 2g) + * @requires !vm.asan * @modules java.base/jdk.internal.platform * @library /test/lib * @modules java.base/jdk.internal.misc diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestJFRNetworkEvents.java openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJFRNetworkEvents.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestJFRNetworkEvents.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJFRNetworkEvents.java 2025-12-18 08:04:02.000000000 +0000 @@ -28,6 +28,7 @@ * the reported host ip and host name are correctly reported within * the container. * @requires container.support + * @requires !vm.asan * @library /test/lib * @modules java.base/jdk.internal.misc * java.management diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestJFRWithJMX.java openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJFRWithJMX.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestJFRWithJMX.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJFRWithJMX.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,6 +26,7 @@ * @test * @summary Test JFR recording controlled via JMX across container boundary. * @requires container.support + * @requires !vm.asan * @library /test/lib * @modules java.base/jdk.internal.misc * java.management diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestJcmdWithSideCar.java openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJcmdWithSideCar.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestJcmdWithSideCar.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestJcmdWithSideCar.java 2025-12-18 08:04:02.000000000 +0000 @@ -31,6 +31,7 @@ * namespace such as PID namespace, specific sub-directories, IPC and more. * @requires container.support * @requires vm.flagless + * @requires !vm.asan * @modules java.base/jdk.internal.misc * java.management * jdk.jartool/sun.tools.jar diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestLimitsUpdating.java openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestLimitsUpdating.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestLimitsUpdating.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestLimitsUpdating.java 2025-12-18 08:04:02.000000000 +0000 @@ -30,6 +30,7 @@ * @key cgroups * @summary Test container limits updating as they get updated at runtime without restart * @requires container.support + * @requires !vm.asan * @library /test/lib * @build jdk.test.whitebox.WhiteBox LimitUpdateChecker * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar whitebox.jar jdk.test.whitebox.WhiteBox diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestMemoryWithCgroupV1.java openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMemoryWithCgroupV1.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestMemoryWithCgroupV1.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMemoryWithCgroupV1.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 @@ -32,6 +32,7 @@ * @test * @key cgroups * @requires os.family == "linux" + * @requires !vm.asan * @modules java.base/jdk.internal.platform * @library /test/lib * @build jdk.test.whitebox.WhiteBox PrintContainerInfo CheckOperatingSystemMXBean diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMemoryWithSubgroups.java 2025-12-18 08:04:02.000000000 +0000 @@ -36,6 +36,7 @@ * @test * @bug 8343191 * @requires os.family == "linux" + * @requires !vm.asan * @modules java.base/jdk.internal.platform * @library /test/lib * @build jdk.test.whitebox.WhiteBox diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestMisc.java openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMisc.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestMisc.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestMisc.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,6 +26,7 @@ * @test * @summary Test miscellanous functionality related to JVM running in docker container * @requires container.support + * @requires !vm.asan * @library /test/lib * @modules java.base/jdk.internal.misc * java.management diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestPids.java openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestPids.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/containers/docker/TestPids.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/containers/docker/TestPids.java 2025-12-18 08:04:02.000000000 +0000 @@ -28,6 +28,7 @@ * @key cgroups * @summary Test JVM's awareness of pids controller * @requires container.support + * @requires !vm.asan * @library /test/lib * @modules java.base/jdk.internal.misc * java.management diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/TestAlwaysPreTouchBehavior.java openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/TestAlwaysPreTouchBehavior.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/TestAlwaysPreTouchBehavior.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/TestAlwaysPreTouchBehavior.java 2025-12-18 08:04:02.000000000 +0000 @@ -155,7 +155,7 @@ } if (available > requiredAvailable) { Asserts.assertGreaterThan(rss, minRequiredRss, "RSS of this process(" + rss + "b) should be bigger " + - "than or equal to heap size(" + heapSize + "b) (available memory: " + available + ")"); + "than or equal to heap size(" + heapSize + "b) (available memory: " + available + "). On Linux Kernel < 4.14 RSS can be inaccurate"); } } } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/TestTransparentHugePagesHeap.java openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/TestTransparentHugePagesHeap.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/TestTransparentHugePagesHeap.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/TestTransparentHugePagesHeap.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,181 @@ +/* + * 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 id=G1 + * @summary Run tests with G1 + * @library /test/lib + * @build jdk.test.lib.Platform + * @requires os.family == "linux" + * @requires vm.gc.G1 + * @run driver TestTransparentHugePagesHeap G1 +*/ +/* + * @test id=Parallel + * @summary Run tests with Parallel + * @library /test/lib + * @build jdk.test.lib.Platform + * @requires os.family == "linux" + * @requires vm.gc.Parallel + * @run driver TestTransparentHugePagesHeap Parallel +*/ +/* + * @test id=Serial + * @summary Run tests with Serial + * @library /test/lib + * @build jdk.test.lib.Platform + * @requires os.family == "linux" + * @requires vm.gc.Serial + * @run driver TestTransparentHugePagesHeap Serial +*/ + +import java.math.BigInteger; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.Scanner; + +import jdk.test.lib.os.linux.HugePageConfiguration; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; +import jdk.test.lib.Platform; + +import jtreg.SkippedException; + +// We verify that the heap can be backed by THP by looking at the +// THPeligible field for the heap section in /proc/self/smaps. This +// field indicates if a mapping can use THP. +// THP mode 'always': this field is 1 whenever huge pages can be used +// THP mode 'madvise': this field is 1 if the mapping has been madvised +// as MADV_HUGEPAGE. In the JVM that should happen when the flag +// -XX:+UseTransparentHugePages is specified. +// +// Note: we don't verify if the heap is backed by huge pages because we +// can't know if the underlying system have any available. +public class TestTransparentHugePagesHeap { + + public static void main(String args[]) throws Exception { + // To be able to detect large page use (esp. THP) somewhat reliably, we + // need at least kernel 3.8 to get the "VmFlags" tag in smaps. + // (Note: its still good we started the VM at least since this serves as a nice + // test for all manners of large page options). + if (Platform.getOsVersionMajor() < 3 || + (Platform.getOsVersionMajor() == 3 && Platform.getOsVersionMinor() < 8)) { + throw new SkippedException("Kernel older than 3.8 - skipping this test."); + } + + final HugePageConfiguration hugePageConfiguration = HugePageConfiguration.readFromOS(); + if (!hugePageConfiguration.supportsTHP()) { + throw new SkippedException("THP is turned off"); + } + + OutputAnalyzer oa = ProcessTools.executeTestJava("-XX:+Use" + args[0] + "GC", "-Xmx128m", "-Xms128m", "-Xlog:pagesize:thp-%p.log", "-XX:+UseTransparentHugePages", VerifyTHPEnabledForHeap.class.getName()); + oa.shouldHaveExitValue(0); + } + + class VerifyTHPEnabledForHeap { + + public static void main(String args[]) throws Exception { + // Extract the heap start from pagesize logging + BigInteger heapStart = extractHeapStartFromLog(); + + Path smaps = makeSmapsCopy(); + + final Pattern addressRangePattern = Pattern.compile("([0-9a-f]*?)-([0-9a-f]*?) .*"); + final Pattern thpEligiblePattern = Pattern.compile("THPeligible:\\s+(\\d)\\s*"); + + Scanner smapsFile = new Scanner(smaps); + while (smapsFile.hasNextLine()) { + Matcher addressRangeMatcher = addressRangePattern.matcher(smapsFile.nextLine()); + if (!addressRangeMatcher.matches()) { + continue; + } + + // Found an address range line in the smaps file + + BigInteger addressStart = new BigInteger(addressRangeMatcher.group(1), 16); + BigInteger addressEnd = new BigInteger(addressRangeMatcher.group(2), 16); + + // Linux sometimes merges adjacent VMAs so we can't search for a range that + // exactly matches the heap range. Instead we look for the first range that + // contains the start of the heap and verify that that range is THP eligible. + + if (addressStart.compareTo(heapStart) > 0 || heapStart.compareTo(addressEnd) >= 0) { + continue; + } + + // Found a range that contains the start of the heap, verify that it is THP eligible. + + while (smapsFile.hasNextLine()) { + Matcher m = thpEligiblePattern.matcher(smapsFile.nextLine()); + if (!m.matches()) { + continue; + } + + // Found the THPeligible line + + if (m.group(1).equals("1")) { + // Success - THPeligible is 1, heap can be backed by huge pages + return; + } + + throw new RuntimeException("The address range 0x" + addressStart.toString(16) + + "-0x" + addressEnd.toString(16) + + " that contains the heap start" + heapStart + + " is not THPeligible"); + } + + throw new RuntimeException("Couldn't find THPeligible in the smaps file"); + } + + throw new RuntimeException("Could not find an address range containing the heap start " + heapStart + " in the smaps file"); + } + + private static BigInteger extractHeapStartFromLog() throws Exception { + // [0.041s][info][pagesize] Heap: min=128M max=128M base=0x0000ffff5c600000 size=128M page_size=2M + final Pattern heapAddress = Pattern.compile(".* Heap: .*base=0x([0-9A-Fa-f]*).*"); + + Scanner logFile = new Scanner(Paths.get("thp-" + ProcessHandle.current().pid() + ".log")); + while (logFile.hasNextLine()) { + String line = logFile.nextLine(); + + Matcher m = heapAddress.matcher(line); + if (m.matches()) { + return new BigInteger(m.group(1), 16); + } + } + + throw new RuntimeException("Failed to find heap start"); + } + + private static Path makeSmapsCopy() throws Exception { + Path src = Paths.get("/proc/self/smaps"); + Path dest = Paths.get("smaps-copy-" + ProcessHandle.current().pid() + ".txt"); + Files.copy(src, dest, StandardCopyOption.REPLACE_EXISTING); + return dest; + } + } +} diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/arguments/TestG1CompressedOops.java openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/arguments/TestG1CompressedOops.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/arguments/TestG1CompressedOops.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/arguments/TestG1CompressedOops.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. - * Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2025, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/g1/TestCodeCacheUnloadDuringConcCycle.java openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/g1/TestCodeCacheUnloadDuringConcCycle.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/g1/TestCodeCacheUnloadDuringConcCycle.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/g1/TestCodeCacheUnloadDuringConcCycle.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,206 @@ +/* + * 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.g1; + +/* + * @test TestCodeCacheUnloadDuringConcCycle + * @bug 8350621 + * @summary Test to make sure that code cache unloading does not hang when receiving + * a request to unload code cache during concurrent mark. + * We do that by triggering a code cache gc request (by triggering compilations) + * during concurrent mark, and verify that after the concurrent cycle additional code + * cache gc requests start more concurrent cycles. + * @requires vm.gc.G1 + * @library /test/lib /testlibrary / + * @modules java.base/jdk.internal.misc + * java.management + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run main/othervm -Xmx20M -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. gc.g1.TestCodeCacheUnloadDuringConcCycle + */ + +import java.lang.management.ManagementFactory; +import java.lang.management.MemoryPoolMXBean; +import java.lang.management.MemoryUsage; +import java.lang.reflect.Field; + +import java.net.URL; +import java.net.URLClassLoader; + +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import jdk.test.lib.Asserts; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; +import static jdk.test.lib.Asserts.*; +import jdk.test.whitebox.WhiteBox; + +public class TestCodeCacheUnloadDuringConcCycle { + public static final String AFTER_FIRST_CYCLE_MARKER = "Marker for this test"; + + private static final WhiteBox WB = WhiteBox.getWhiteBox(); + + private static OutputAnalyzer runTest(String concPhase) throws Exception { + OutputAnalyzer output = ProcessTools.executeLimitedTestJava("-XX:+UseG1GC", + "-Xmx20M", + "-XX:+UnlockDiagnosticVMOptions", + "-Xbootclasspath/a:.", + "-Xlog:gc=trace,codecache", + "-XX:+WhiteBoxAPI", + "-XX:ReservedCodeCacheSize=8M", + "-XX:StartAggressiveSweepingAt=50", + "-XX:CompileCommand=compileonly,gc.g1.SomeClass::*", + TestCodeCacheUnloadDuringConcCycleRunner.class.getName(), + concPhase); + return output; + } + + private static void runAndCheckTest(String test) throws Exception { + OutputAnalyzer output; + + output = runTest(test); + output.shouldHaveExitValue(0); + System.out.println(output.getStdout()); + + String[] parts = output.getStdout().split(AFTER_FIRST_CYCLE_MARKER); + + // Either "Threshold" or "Aggressive" CodeCache GC are fine for the test. + final String codecacheGCStart = "Pause Young (Concurrent Start) (CodeCache GC "; + + boolean success = parts.length == 2 && parts[1].indexOf(codecacheGCStart) != -1; + Asserts.assertTrue(success, "Could not find a CodeCache GC Threshold GC after finishing the concurrent cycle"); + } + + private static void allTests() throws Exception { + runAndCheckTest(WB.BEFORE_MARKING_COMPLETED); + runAndCheckTest(WB.G1_BEFORE_REBUILD_COMPLETED); + runAndCheckTest(WB.G1_BEFORE_CLEANUP_COMPLETED); + } + + public static void main(String[] args) throws Exception { + allTests(); + } +} + +class TestCodeCacheUnloadDuringConcCycleRunner { + private static final WhiteBox WB = WhiteBox.getWhiteBox(); + + private static void refClass(Class clazz) throws Exception { + Field name = clazz.getDeclaredField("NAME"); + name.setAccessible(true); + name.get(null); + } + + private static class MyClassLoader extends URLClassLoader { + public MyClassLoader(URL url) { + super(new URL[]{url}, null); + } + protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException { + try { + return super.loadClass(name, resolve); + } catch (ClassNotFoundException e) { + return Class.forName(name, resolve, TestCodeCacheUnloadDuringConcCycleRunner.class.getClassLoader()); + } + } + } + + private static void triggerCodeCacheGC() throws Exception { + URL url = TestCodeCacheUnloadDuringConcCycleRunner.class.getProtectionDomain().getCodeSource().getLocation(); + + try { + int i = 0; + do { + ClassLoader cl = new MyClassLoader(url); + refClass(cl.loadClass("gc.g1.SomeClass")); + + if (i % 20 == 0) { + System.out.println("Compiled " + i + " classes"); + } + i++; + } while (i < 200); + System.out.println("Compilation done, compiled " + i + " classes"); + } catch (Throwable t) { + } + } + + public static void main(String[] args) throws Exception { + System.out.println("Running to breakpoint: " + args[0]); + try { + WB.concurrentGCAcquireControl(); + WB.concurrentGCRunTo(args[0]); + + System.out.println("Try to trigger code cache GC"); + + triggerCodeCacheGC(); + + WB.concurrentGCRunToIdle(); + } finally { + // Make sure that the marker we use to find the expected log message is printed + // before we release whitebox control, i.e. before the expected garbage collection + // can start. + System.out.println(TestCodeCacheUnloadDuringConcCycle.AFTER_FIRST_CYCLE_MARKER); + WB.concurrentGCReleaseControl(); + } + Thread.sleep(1000); + triggerCodeCacheGC(); + } +} + +abstract class Foo { + public abstract int foo(); +} + +class Foo1 extends Foo { + private int a; + public int foo() { return a; } +} + +class Foo2 extends Foo { + private int a; + public int foo() { return a; } +} + +class Foo3 extends Foo { + private int a; + public int foo() { return a; } +} + +class Foo4 extends Foo { + private int a; + public int foo() { return a; } +} + +class SomeClass { + static final String NAME = "name"; + + static { + int res =0; + Foo[] foos = new Foo[] { new Foo1(), new Foo2(), new Foo3(), new Foo4() }; + for (int i = 0; i < 100000; i++) { + res = foos[i % foos.length].foo(); + } + } +} diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/g1/plab/TestPLABEvacuationFailure.java openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/g1/plab/TestPLABEvacuationFailure.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/g1/plab/TestPLABEvacuationFailure.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/g1/plab/TestPLABEvacuationFailure.java 2025-12-18 08:04:02.000000000 +0000 @@ -99,7 +99,6 @@ // Set up test GC and PLAB options List testOptions = new ArrayList<>(); Collections.addAll(testOptions, COMMON_OPTIONS); - Collections.addAll(testOptions, Utils.getTestJavaOpts()); Collections.addAll(testOptions, "-XX:ParallelGCThreads=" + parGCThreads, "-XX:ParallelGCBufferWastePct=" + wastePct, diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/g1/plab/lib/PLABUtils.java openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/g1/plab/lib/PLABUtils.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/g1/plab/lib/PLABUtils.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/g1/plab/lib/PLABUtils.java 2025-12-18 08:04:02.000000000 +0000 @@ -72,14 +72,12 @@ if (options == null) { throw new IllegalArgumentException("Options cannot be null"); } - List executionOtions = new ArrayList<>( - Arrays.asList(Utils.getTestJavaOpts()) - ); - Collections.addAll(executionOtions, WB_DIAGNOSTIC_OPTIONS); - Collections.addAll(executionOtions, G1_PLAB_LOGGING_OPTIONS); - Collections.addAll(executionOtions, GC_TUNE_OPTIONS); - executionOtions.addAll(options); - return executionOtions; + List executionOptions = new ArrayList<>(); + Collections.addAll(executionOptions, WB_DIAGNOSTIC_OPTIONS); + Collections.addAll(executionOptions, G1_PLAB_LOGGING_OPTIONS); + Collections.addAll(executionOptions, GC_TUNE_OPTIONS); + executionOptions.addAll(options); + return executionOptions; } /** diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/shenandoah/compiler/TestLinkToNativeRBP.java openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/shenandoah/compiler/TestLinkToNativeRBP.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/shenandoah/compiler/TestLinkToNativeRBP.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/shenandoah/compiler/TestLinkToNativeRBP.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2022, Red Hat, Inc. All rights reserved. + * Copyright (c) 2021, 2025, Red Hat, Inc. 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 @@ -27,7 +27,7 @@ * @summary guarantee(loc != NULL) failed: missing saved register with native invoke * * @requires vm.flavor == "server" - * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "ppc64le" + * @requires ((os.arch == "amd64" | os.arch == "x86_64") & sun.arch.data.model == "64") | os.arch == "aarch64" | os.arch == "ppc64" | os.arch == "ppc64le" * @requires vm.gc.Shenandoah * * @run main/othervm --enable-native-access=ALL-UNNAMED -XX:+UnlockDiagnosticVMOptions diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/z/TestCommitFailure.java openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/z/TestCommitFailure.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/z/TestCommitFailure.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/z/TestCommitFailure.java 2025-12-18 08:04:02.000000000 +0000 @@ -24,6 +24,14 @@ package gc.z; /* + * @test id=Normal + * @requires vm.gc.Z & vm.debug + * @summary Test ZGC graceful failure when a commit fails + * @library / /test/lib + * @run driver gc.z.TestCommitFailure + */ + +/* * @test id=ZFakeNUMA * @requires vm.gc.Z & vm.debug * @library / /test/lib diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/z/TestUncommit.java openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/z/TestUncommit.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/gc/z/TestUncommit.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/gc/z/TestUncommit.java 2025-12-18 08:04:02.000000000 +0000 @@ -108,7 +108,16 @@ throw new Exception("Uncommitted too fast"); } + // In typical conditions (system not over-provisioned or slow), + // uncommitting is expected to complete within 3 * ZUncommitDelay after + // the last commit. To accommodate less ideal environments, only + // durations exceeding 5 * ZUncommitDelay are flagged as errors. + if (actualDelay > delay * 3) { + log(" *** Uncommit slower than expected. ***"); + } + + if (actualDelay > delay * 5) { throw new Exception("Uncommitted too slow"); } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/gtest/GTestWrapper.java openjdk-25-25.0.2+10/test/hotspot/jtreg/gtest/GTestWrapper.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/gtest/GTestWrapper.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/gtest/GTestWrapper.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2021, 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 @@ -82,6 +82,7 @@ command.add(execPath.toAbsolutePath().toString()); command.add("-jdk"); command.add(Utils.TEST_JDK); + command.add("-Xmx200m"); command.add("--gtest_output=xml:" + resultFile); command.add("--gtest_catch_exceptions=0"); for (String a : args) { diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/CompressedOops/CompressedCPUSpecificClassSpaceReservation.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/CompressedOops/CompressedCPUSpecificClassSpaceReservation.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/CompressedOops/CompressedCPUSpecificClassSpaceReservation.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/CompressedOops/CompressedCPUSpecificClassSpaceReservation.java 2025-12-18 08:04:02.000000000 +0000 @@ -28,6 +28,7 @@ * @requires vm.bits == 64 & !vm.graal.enabled & vm.debug == true * @requires vm.flagless * @requires vm.cds + * @requires vm.cds.default.archive.available * @requires (os.family != "windows") & (os.family != "aix") * @library /test/lib * @modules java.base/jdk.internal.misc diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/CompressedOops/UseCompressedOops.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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,8 @@ * @modules java.base/jdk.internal.misc * java.management * @build jdk.test.whitebox.WhiteBox + * @comment Asan changes memory layout and we get a different coops mode + * @requires !vm.asan * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox * @run main/othervm/timeout=480 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. UseCompressedOops */ diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/ErrorHandling/CreateCoredumpOnCrash.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/ErrorHandling/CreateCoredumpOnCrash.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/ErrorHandling/CreateCoredumpOnCrash.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/ErrorHandling/CreateCoredumpOnCrash.java 2025-12-18 08:04:02.000000000 +0000 @@ -30,6 +30,7 @@ * jdk.internal.jvmstat/sun.jvmstat.monitor * @run driver CreateCoredumpOnCrash * @requires vm.flagless + * @requires !vm.asan */ import jdk.test.lib.process.ProcessTools; diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/AsyncExceptionOnMonitorEnter.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 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,7 +26,7 @@ * @bug 8283044 * @summary Stress delivery of asynchronous exceptions while target is at monitorenter * @library /test/hotspot/jtreg/testlibrary - * @run main/othervm AsyncExceptionOnMonitorEnter 0 + * @run main/othervm/native AsyncExceptionOnMonitorEnter 0 * @run main/othervm/native -agentlib:AsyncExceptionOnMonitorEnter AsyncExceptionOnMonitorEnter 1 */ diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -27,13 +27,14 @@ * @requires vm.compiler1.enabled | vm.compiler2.enabled * @summary Stress delivery of asynchronous exceptions. * @library /test/hotspot/jtreg/testlibrary - * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+StressCompiledExceptionHandlers + * @run main/othervm/native + * -XX:+IgnoreUnrecognizedVMOptions -XX:+StressCompiledExceptionHandlers * -Xcomp -XX:TieredStopAtLevel=3 * -XX:CompileCommand=dontinline,AsyncExceptionTest::internalRun2 * -XX:CompileCommand=compileonly,AsyncExceptionTest::internalRun1 * -XX:CompileCommand=compileonly,AsyncExceptionTest::internalRun2 * AsyncExceptionTest - * @run main/othervm -Xcomp + * @run main/othervm/native -Xcomp * -XX:CompileCommand=dontinline,AsyncExceptionTest::internalRun2 * -XX:CompileCommand=compileonly,AsyncExceptionTest::internalRun1 * -XX:CompileCommand=compileonly,AsyncExceptionTest::internalRun2 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/Thread/TestBreakSignalThreadDump.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/TestBreakSignalThreadDump.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/Thread/TestBreakSignalThreadDump.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/TestBreakSignalThreadDump.java 2025-12-18 08:04:02.000000000 +0000 @@ -28,7 +28,7 @@ * @summary Check that Ctrl-\ or Ctrl-Break (on Windows) causes HotSpot VM to print a full thread dump. * @library /vmTestbase * /test/lib - * @run driver TestBreakSignalThreadDump + * @run main/native TestBreakSignalThreadDump */ /* @@ -42,7 +42,7 @@ * @requires !vm.asan * @library /vmTestbase * /test/lib - * @run driver TestBreakSignalThreadDump load_libjsig + * @run main/native TestBreakSignalThreadDump load_libjsig */ import java.nio.file.Files; diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/Thread/ThreadCountLimit.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/ThreadCountLimit.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/Thread/ThreadCountLimit.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/ThreadCountLimit.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 @@ -73,14 +73,27 @@ if (Platform.isLinux()) { // On Linux this test sometimes hits the limit for the maximum number of memory mappings, // which leads to various other failure modes. Run this test with a limit on how many - // threads the process is allowed to create, so we hit that limit first. - - final String ULIMIT_CMD = "ulimit -u 4096"; + // threads the process is allowed to create, so we hit that limit first. What we want is + // for another "limit" processes to be available, but ulimit doesn't work that way and + // if there are already many running processes we could fail to even start the JVM properly. + // So we loop increasing the limit until we get a successful run. This is not foolproof. + int pLimit = 4096; + final String ULIMIT_CMD = "ulimit -u "; ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(ThreadCountLimit.class.getName()); String javaCmd = ProcessTools.getCommandLine(pb); - // Relaunch the test with args.length > 0, and the ulimit set - ProcessTools.executeCommand("bash", "-c", ULIMIT_CMD + " && " + javaCmd + " dummy") - .shouldHaveExitValue(0); + for (int i = 1; i <= 10; i++) { + // Relaunch the test with args.length > 0, and the ulimit set + String cmd = ULIMIT_CMD + Integer.toString(pLimit * i) + " && " + javaCmd + " dummy"; + System.out.println("Trying: bash -c " + cmd); + OutputAnalyzer oa = ProcessTools.executeCommand("bash", "-c", cmd); + int exitValue = oa.getExitValue(); + switch (exitValue) { + case 0: System.out.println("Success!"); return; + case 1: System.out.println("Retry ..."); continue; + default: oa.shouldHaveExitValue(0); // generate error report + } + } + throw new Error("Failed to perform a successful run!"); } else { // Not Linux so run directly. test(); diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/Thread/TooSmallStackSize.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/TooSmallStackSize.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/Thread/TooSmallStackSize.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/Thread/TooSmallStackSize.java 2025-12-18 08:04:02.000000000 +0000 @@ -28,6 +28,7 @@ * VMThreadStackSize values should result in an error message that shows * the minimum stack size value for each thread type. * @library /test/lib + * @requires vm.flagless * @modules java.base/jdk.internal.misc * java.management * @run driver TooSmallStackSize diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/TestDefaultArchiveLoading.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,6 +26,7 @@ * @test id=nocoops_nocoh * @summary Test Loading of default archives in all configurations * @requires vm.cds + * @requires vm.cds.default.archive.available * @requires vm.cds.write.archived.java.heap * @requires vm.bits == 64 * @library /test/lib @@ -38,6 +39,7 @@ * @test id=nocoops_coh * @summary Test Loading of default archives in all configurations (requires --enable-cds-archive-coh) * @requires vm.cds + * @requires vm.cds.default.archive.available * @requires vm.cds.write.archived.java.heap * @requires vm.bits == 64 * @library /test/lib @@ -50,6 +52,7 @@ * @test id=coops_nocoh * @summary Test Loading of default archives in all configurations * @requires vm.cds + * @requires vm.cds.default.archive.available * @requires vm.cds.write.archived.java.heap * @requires vm.bits == 64 * @library /test/lib @@ -62,6 +65,7 @@ * @test id=coops_coh * @summary Test Loading of default archives in all configurations (requires --enable-cds-archive-coh) * @requires vm.cds + * @requires vm.cds.default.archive.available * @requires vm.cds.write.archived.java.heap * @requires vm.bits == 64 * @library /test/lib @@ -90,8 +94,8 @@ "server", archiveName(archiveSuffix)); } - private static boolean isCOHArchiveAvailable(char coops, char coh, - String archiveSuffix) throws Exception { + private static boolean isArchiveAvailable(char coops, char coh, + String archiveSuffix) throws Exception { Path archive= archivePath(archiveSuffix); return Files.exists(archive); } @@ -109,12 +113,16 @@ case "nocoops_nocoh": coh = coops = '-'; archiveSuffix = "_nocoops"; + if (!isArchiveAvailable(coops, coh, archiveSuffix)) { + throw new SkippedException("Skipping test due to " + + archivePath(archiveSuffix).toString() + " not available"); + } break; case "nocoops_coh": coops = '-'; coh = '+'; archiveSuffix = "_nocoops_coh"; - if (!isCOHArchiveAvailable(coops, coh, archiveSuffix)) { + if (!isArchiveAvailable(coops, coh, archiveSuffix)) { throw new SkippedException("Skipping test due to " + archivePath(archiveSuffix).toString() + " not available"); } @@ -123,11 +131,15 @@ coops = '+'; coh = '-'; archiveSuffix = ""; + if (!isArchiveAvailable(coops, coh, archiveSuffix)) { + throw new SkippedException("Skipping test due to " + + archivePath(archiveSuffix).toString() + " not available"); + } break; case "coops_coh": coh = coops = '+'; archiveSuffix = "_coh"; - if (!isCOHArchiveAvailable(coops, coh, archiveSuffix)) { + if (!isArchiveAvailable(coops, coh, archiveSuffix)) { throw new SkippedException("Skipping test due to " + archivePath(archiveSuffix).toString() + " not available"); } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/ArchiveRelocationTest.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/ArchiveRelocationTest.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/ArchiveRelocationTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/ArchiveRelocationTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -67,6 +67,8 @@ String logArg = "-Xlog:cds=debug,cds+reloc=debug,aot+heap"; String unlockArg = "-XX:+UnlockDiagnosticVMOptions"; String nmtArg = "-XX:NativeMemoryTracking=detail"; + String relocMsg1 = "ArchiveRelocationMode == 1: always map archive(s) at an alternative address"; + String relocMsg2 = "Try to map archive(s) at an alternative address"; OutputAnalyzer out = TestCommon.dump(appJar, TestCommon.list(mainClass), @@ -76,8 +78,10 @@ TestCommon.run("-cp", appJar, unlockArg, runRelocArg, logArg, mainClass) .assertNormalExit(output -> { if (run_reloc) { - output.shouldContain("ArchiveRelocationMode == 1: always map archive(s) at an alternative address") - .shouldContain("Try to map archive(s) at an alternative address"); + if (!output.contains(relocMsg1) && !output.contains(relocMsg2)) { + throw new RuntimeException("Relocation messages \"" + relocMsg1 + + "\" and \"" + relocMsg2 + "\" are missing from the output"); + } } else { output.shouldContain("ArchiveRelocationMode: 0"); } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/FillerObjectLoadTest.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/FillerObjectLoadTest.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/FillerObjectLoadTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/FillerObjectLoadTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/LotsOfSyntheticClasses.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/LotsOfSyntheticClasses.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/LotsOfSyntheticClasses.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/LotsOfSyntheticClasses.java 2025-12-18 08:04:02.000000000 +0000 @@ -120,9 +120,9 @@ OutputAnalyzer output = TestCommon.createArchive( APP_JAR.toString(), listAppClasses(), - MAIN_CLASS_NAME, // Verification for lots of classes slows down the test. "-XX:+IgnoreUnrecognizedVMOptions", + "-XX:+UnlockDiagnosticVMOptions", "-XX:-VerifyDependencies", "-XX:-VerifyBeforeExit" ); @@ -134,6 +134,7 @@ TestCommon.run( // Verification for lots of classes slows down the test. "-XX:+IgnoreUnrecognizedVMOptions", + "-XX:+UnlockDiagnosticVMOptions", "-XX:-VerifyDependencies", "-XX:-VerifyBeforeExit", "-cp", APP_JAR.toString(), diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/TestCommon.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -427,8 +427,6 @@ cmd.add(opts.appJar); } - CDSTestUtils.addVerifyArchivedFields(cmd); - for (String s : opts.suffix) cmd.add(s); if (RUN_WITH_JFR) { diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/TestDumpClassListSource.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/TestDumpClassListSource.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/TestDumpClassListSource.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/TestDumpClassListSource.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 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,6 +28,7 @@ * @summary test dynamic dump meanwhile output loaded class list * @bug 8279009 8275084 * @requires vm.cds + * @requires vm.cds.default.archive.available * @requires vm.cds.custom.loaders * @requires vm.flagless * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/TransformInterfaceOfLambda.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/TransformInterfaceOfLambda.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/TransformInterfaceOfLambda.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/TransformInterfaceOfLambda.java 2025-12-18 08:04:02.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,6 +28,7 @@ * @summary Transforming an interface of an archived lambda proxy class should not * crash the VM. The lambda proxy class should be regenerated during runtime. * @requires vm.cds + * @requires vm.cds.default.archive.available * @requires vm.jvmti * @requires vm.flagless * @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds/test-classes diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/aotCache/AOTLoggingTag.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/AOTLoggingTag.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/aotCache/AOTLoggingTag.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/AOTLoggingTag.java 2025-12-18 08:04:02.000000000 +0000 @@ -34,7 +34,6 @@ * @run driver AOTLoggingTag */ -import java.io.File; import jdk.test.lib.cds.CDSTestUtils; import jdk.test.lib.helpers.ClassFileInstaller; import jdk.test.lib.process.OutputAnalyzer; @@ -59,7 +58,7 @@ "-cp", appJar, helloClass); out = CDSTestUtils.executeAndLog(pb, "train"); - out.shouldContain("[info][aot] Writing binary AOTConfiguration file:"); + out.shouldContain("[aot] Writing binary AOTConfiguration file:"); out.shouldHaveExitValue(0); //---------------------------------------------------------------------- @@ -71,7 +70,7 @@ "-Xlog:aot", "-cp", appJar); out = CDSTestUtils.executeAndLog(pb, "asm"); - out.shouldContain("[info][aot] Opened AOT configuration file hello.aotconfig"); + out.shouldContain("[aot] Opened AOT configuration file hello.aotconfig"); out.shouldHaveExitValue(0); //---------------------------------------------------------------------- @@ -81,7 +80,7 @@ "-Xlog:aot", "-cp", appJar, helloClass); out = CDSTestUtils.executeAndLog(pb, "prod"); - out.shouldContain("[info][aot] Opened AOT cache hello.aot"); + out.shouldContain("[aot] Opened AOT cache hello.aot"); out.shouldHaveExitValue(0); //---------------------------------------------------------------------- @@ -92,7 +91,7 @@ "-cp", appJar, helloClass); out = CDSTestUtils.executeAndLog(pb, "prod"); out.shouldNotContain("No tag set matches selection: aot+heap"); - out.shouldContain("[info][aot,heap] resolve subgraph java.lang.Integer$IntegerCache"); + out.shouldContain("[aot,heap] resolve subgraph java.lang.Integer$IntegerCache"); out.shouldHaveExitValue(0); //---------------------------------------------------------------------- @@ -102,7 +101,7 @@ "-XX:AOTMode=on", "-cp", appJar, helloClass); out = CDSTestUtils.executeAndLog(pb, "prod"); - out.shouldContain("[error][aot] An error has occurred while processing the AOT cache. Run with -Xlog:aot for details."); + out.shouldContain("[aot] An error has occurred while processing the AOT cache. Run with -Xlog:aot for details."); out.shouldNotHaveExitValue(0); } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/aotCache/ExcludedClasses.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/ExcludedClasses.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/aotCache/ExcludedClasses.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotCache/ExcludedClasses.java 2025-12-18 08:04:02.000000000 +0000 @@ -36,6 +36,8 @@ * TestApp$Foo * TestApp$Foo$Bar * TestApp$Foo$ShouldBeExcluded + * TestApp$Foo$ShouldBeExcludedChild + * TestApp$Foo$Taz * TestApp$MyInvocationHandler * @run driver jdk.test.lib.helpers.ClassFileInstaller -jar cust.jar * CustyWithLoop @@ -63,7 +65,7 @@ public static void main(String[] args) throws Exception { Tester tester = new Tester(); - tester.runAOTWorkflow(); + tester.runAOTWorkflow("AOT", "--two-step-training"); } static class Tester extends CDSAppTester { @@ -79,7 +81,11 @@ @Override public String[] vmArgs(RunMode runMode) { return new String[] { - "-Xlog:cds+resolve=trace", + "-Xlog:aot=debug", + "-Xlog:aot+class=debug", + "-Xlog:aot+resolve=trace", + "-Xlog:aot+verification=trace", + "-Xlog:class+load", }; } @@ -92,8 +98,13 @@ @Override public void checkExecution(OutputAnalyzer out, RunMode runMode) { - if (isDumping(runMode)) { - out.shouldNotMatch("cds,resolve.*archived field.*TestApp.Foo => TestApp.Foo.ShouldBeExcluded.f:I"); + if (runMode == RunMode.ASSEMBLY) { + out.shouldNotMatch("aot,resolve.*archived field.*TestApp.Foo => TestApp.Foo.ShouldBeExcluded.f:I"); + } else if (runMode == RunMode.PRODUCTION) { + out.shouldContain("check_verification_constraint: TestApp$Foo$Taz: TestApp$Foo$ShouldBeExcludedChild must be subclass of TestApp$Foo$ShouldBeExcluded"); + out.shouldContain("jdk.jfr.Event source: jrt:/jdk.jfr"); + out.shouldMatch("TestApp[$]Foo[$]ShouldBeExcluded source: .*/app.jar"); + out.shouldMatch("TestApp[$]Foo[$]ShouldBeExcludedChild source: .*/app.jar"); } } } @@ -104,8 +115,8 @@ static volatile Object custArrayInstance; public static void main(String args[]) throws Exception { - // In new workflow, classes from custom loaders are passed from the preimage - // to the final image. See ClassPrelinker::record_unregistered_klasses(). + // In AOT workflow, classes from custom loaders are passed from the preimage + // to the final image. See FinalImageRecipes::record_all_classes(). custInstance = initFromCustomLoader(); custArrayInstance = Array.newInstance(custInstance.getClass(), 0); System.out.println(custArrayInstance); @@ -159,6 +170,7 @@ lambdaHotSpot(); s.hotSpot2(); b.hotSpot3(); + Taz.hotSpot4(); // In JDK mainline, generated proxy classes are excluded from the AOT cache. // In Leyden/premain, generated proxy classes included. The following code should @@ -167,7 +179,7 @@ counter += i.intValue(); if (custInstance != null) { - // Classes loaded by custom loaders are included included in the AOT cache + // Classes loaded by custom loaders are included in the AOT cache // but their array classes are excluded. counter += custInstance.equals(null) ? 1 : 2; } @@ -218,6 +230,16 @@ f(); } } + int func() { + return 1; + } + } + + static class ShouldBeExcludedChild extends ShouldBeExcluded { + @Override + int func() { + return 2; + } } static class Bar { @@ -230,6 +252,29 @@ long start = System.currentTimeMillis(); while (System.currentTimeMillis() - start < 20) { for (int i = 0; i < 50000; i++) { + counter += i; + } + f(); + } + } + } + + static class Taz { + static ShouldBeExcluded m() { + // When verifying this method, we need to check the constraint that + // ShouldBeExcluded must be a supertype of ShouldBeExcludedChild. This information + // is checked by SystemDictionaryShared::check_verification_constraints() when the Taz + // class is linked during the production run. + // + // Because ShouldBeExcluded is excluded from the AOT archive, it must be loaded + // dynamically from app.jar inside SystemDictionaryShared::check_verification_constraints(). + // This must happen after the app class loader has been fully restored from the AOT cache. + return new ShouldBeExcludedChild(); + } + static void hotSpot4() { + long start = System.currentTimeMillis(); + while (System.currentTimeMillis() - start < 20) { + for (int i = 0; i < 50000; i++) { counter += i; } f(); diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/BulkLoaderTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -78,6 +78,7 @@ import java.lang.StackWalker.StackFrame; import java.net.URL; import java.net.URLClassLoader; +import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -318,12 +319,15 @@ } } + static ArrayList savedLoaders = new ArrayList<>(); + static Object initFromCustomLoader() throws Exception { String path = "cust.jar"; URL url = new File(path).toURI().toURL(); URL[] urls = new URL[] {url}; URLClassLoader urlClassLoader = new URLClassLoader("MyLoader", urls, null); + savedLoaders.add(urlClassLoader); Class c = Class.forName("SimpleCusty", true, urlClassLoader); return c.newInstance(); } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/aotFlags/AOTFlags.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotFlags/AOTFlags.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/aotFlags/AOTFlags.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/aotFlags/AOTFlags.java 2025-12-18 08:04:02.000000000 +0000 @@ -257,6 +257,16 @@ out.shouldContain("AOTCache creation is complete: hello.aot"); out.shouldMatch("Picked up JAVA_TOOL_OPTIONS:.* -Dmy.prop=My' 'string' '-Xshare:off' 'here"); out.shouldHaveExitValue(0); + + // Training run with -XX:+PrintTieredEvents (see JDK-8362530). + printTestCase("Training run with -XX:+PrintTieredEvents"); + pb = ProcessTools.createLimitedTestJavaProcessBuilder( + "-XX:AOTMode=record", + "-XX:+PrintTieredEvents", + "-XX:AOTConfiguration=" + aotConfigFile, + "-cp", appJar, helloClass); + out = CDSTestUtils.executeAndLog(pb, "train-with-tiered-events"); + out.shouldHaveExitValue(0); } static void negativeTests() throws Exception { @@ -484,6 +494,7 @@ testEmptyValue("AOTCache"); testEmptyValue("AOTConfiguration"); testEmptyValue("AOTMode"); + testEmptyValue("AOTCacheOutput"); } static void testEmptyValue(String option) throws Exception { diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveNoDefaultArchive.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveNoDefaultArchive.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveNoDefaultArchive.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveNoDefaultArchive.java 2025-12-18 08:04:02.000000000 +0000 @@ -27,6 +27,7 @@ * @summary Test -XX:+AutoCreateSharedArchive on a copied JDK without default shared archive * @bug 8261455 * @requires vm.cds + * @requires vm.cds.default.archive.available * @requires vm.flagless * @comment This test doesn't work on Windows because it depends on symlinks * @requires os.family != "windows" diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/cds/appcds/loaderConstraints/DynamicLoaderConstraintsTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 @@ -55,6 +55,7 @@ /** * @test id=custom-cl-zgc * @requires vm.cds.custom.loaders + * @requires vm.cds.nocoops.archive.available * @requires vm.gc.Z * @summary Test dumptime_table entries are removed with zgc eager class unloading * @bug 8274935 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/jni/checked/TestCharArrayReleasing.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/jni/checked/TestCharArrayReleasing.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/jni/checked/TestCharArrayReleasing.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/jni/checked/TestCharArrayReleasing.java 2025-12-18 08:04:02.000000000 +0000 @@ -25,6 +25,8 @@ * @test * @bug 8357601 * @requires vm.flagless + * @comment The check of the array allocated with raw malloc triggers ASAN as we peek into the malloc header space. + * @requires !vm.asan * @library /test/lib * @run main/othervm/native TestCharArrayReleasing 0 0 * @run main/othervm/native TestCharArrayReleasing 1 0 diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/jni/checked/TestLargeUTF8Length.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/jni/checked/TestLargeUTF8Length.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/jni/checked/TestLargeUTF8Length.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/jni/checked/TestLargeUTF8Length.java 2025-12-18 08:04:02.000000000 +0000 @@ -44,9 +44,14 @@ static native void checkUTF8Length(String s, long utf8Length); static void test() { - int length = Integer.MAX_VALUE/2 + 1; - char character = (char)0XD1; // N with tilde - long utf8Length = 2L * length; + // We want a string whose UTF-8 length is > Integer.MAX_VALUE, but + // whose "natural" length is < Integer.MAX_VALUE/2 so it can be + // created regardless of whether compact-strings are enabled or not. + // So we use a character that encodes as 3-bytes in UTF-8. + // U+08A0 : e0 a2 a0 : ARABIC LETTER BEH WITH SMALL V BELOW + char character = '\u08A0'; + int length = Integer.MAX_VALUE/2 - 1; + long utf8Length = 3L * length; char[] chrs = new char[length]; Arrays.fill(chrs, character); String s = new String(chrs); diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/os/TestHugePageDecisionsAtVMStartup.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/os/TestHugePageDecisionsAtVMStartup.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/os/TestHugePageDecisionsAtVMStartup.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/os/TestHugePageDecisionsAtVMStartup.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2023, 2024, Red Hat Inc. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -56,6 +56,7 @@ import jdk.test.lib.os.linux.HugePageConfiguration; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import jtreg.SkippedException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -123,6 +124,9 @@ out.shouldContain(warningNoTHP); } else if (useLP && !useTHP && configuration.supportsExplicitHugePages() && haveUsableExplicitHugePages) { + if (configuration.getExplicitAvailableHugePageNumber() == 0) { + throw new SkippedException("No usable explicit hugepages configured on the system, skipping test"); + } out.shouldContain("[info][pagesize] Using the default large page size: " + buildSizeString(configuration.getExplicitDefaultHugePageSize())); out.shouldContain("[info][pagesize] UseLargePages=1, UseTransparentHugePages=0"); out.shouldContain("[info][pagesize] Large page support enabled"); diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/signal/SigTestDriver.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/signal/SigTestDriver.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/signal/SigTestDriver.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/signal/SigTestDriver.java 2025-12-18 08:04:02.000000000 +0000 @@ -53,15 +53,9 @@ switch (signame) { case "SIGWAITING": case "SIGKILL": - case "SIGSTOP": { - throw new SkippedException("signals SIGWAITING, SIGKILL and SIGSTOP can't be tested"); - } + case "SIGSTOP": case "SIGUSR2": { - if (Platform.isLinux()) { - throw new SkippedException("SIGUSR2 can't be tested on Linux"); - } else if (Platform.isOSX()) { - throw new SkippedException("SIGUSR2 can't be tested on OS X"); - } + throw new SkippedException("signals SIGWAITING, SIGKILL, SIGSTOP and SIGUSR2 can't be tested"); } } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/signal/TestSigusr2.java openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/signal/TestSigusr2.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/runtime/signal/TestSigusr2.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/runtime/signal/TestSigusr2.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2017, 2020, 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 - * @requires os.family != "windows" & os.family != "aix" - * - * @summary converted from VM testbase runtime/signal/sigusr201. - * VM testbase keywords: [signal, runtime, linux, macosx] - * - * @library /test/lib - * @run main/native SigTestDriver SIGUSR2 - */ - diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, Google and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -29,7 +29,7 @@ * @summary Verifies that AsyncGetCallTrace is call-able and provides sane information. * @compile ASGCTBaseTest.java * @requires os.family == "linux" - * @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="arm" | os.arch=="aarch64" | os.arch=="ppc64" | os.arch=="s390" | os.arch=="riscv64" + * @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="arm" | os.arch=="aarch64" | os.arch=="ppc64" | os.arch=="ppc64le" | os.arch=="s390" | os.arch=="riscv64" * @requires vm.jvmti * @run main/othervm/native -agentlib:AsyncGetCallTraceTest MyPackage.ASGCTBaseTest */ diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/HeapDump/UnmountedVThreadNativeMethodAtTop.java 2025-12-18 08:04:02.000000000 +0000 @@ -27,7 +27,9 @@ * @requires vm.continuations * @modules jdk.management * @library /test/lib - * @run junit/othervm --enable-native-access=ALL-UNNAMED UnmountedVThreadNativeMethodAtTop + * @build jdk.test.whitebox.WhiteBox + * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox + * @run junit/othervm/native -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI --enable-native-access=ALL-UNNAMED UnmountedVThreadNativeMethodAtTop */ import java.lang.management.ManagementFactory; @@ -45,9 +47,12 @@ import jdk.test.lib.hprof.model.Snapshot; import jdk.test.lib.hprof.model.ThreadObject; import jdk.test.lib.hprof.parser.Reader; +import jdk.test.whitebox.WhiteBox; public class UnmountedVThreadNativeMethodAtTop { + static WhiteBox wb = WhiteBox.getWhiteBox(); + boolean done; /** @@ -56,7 +61,7 @@ */ @BeforeEach void doGC() { - System.gc(); + wb.fullGC(); } /** diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/jvmti/VMEvent/libVMEventTest.c openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/VMEvent/libVMEventTest.c --- openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/jvmti/VMEvent/libVMEventTest.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/jvmti/VMEvent/libVMEventTest.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, Google and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -47,12 +47,36 @@ #endif +// JVMTI_ERROR_WRONG_PHASE guard +static jrawMonitorID event_mon = NULL; +static int is_vm_dead = 0; + +void lock(jvmtiEnv *jvmti, JNIEnv *jni) { + jvmtiError err = (*jvmti)->RawMonitorEnter(jvmti, event_mon); + if (err != JVMTI_ERROR_NONE) { + JNI_ENV_PTR(jni)->FatalError(JNI_ENV_ARGS2(jni, "RawMonitorEnter failed")); + } +} + +void unlock(jvmtiEnv *jvmti, JNIEnv *jni) { + jvmtiError err = (*jvmti)->RawMonitorExit(jvmti, event_mon); + if (err != JVMTI_ERROR_NONE) { + JNI_ENV_PTR(jni)->FatalError(JNI_ENV_ARGS2(jni, "RawMonitorExit failed")); + } +} + extern JNIEXPORT void JNICALL VMObjectAlloc(jvmtiEnv *jvmti, JNIEnv* jni, jthread thread, jobject object, jclass klass, jlong size) { + lock(jvmti, jni); + if (is_vm_dead) { + unlock(jvmti, jni); + return; + } + char *signature = NULL; jvmtiError error = (*jvmti)->GetClassSignature(jvmti, klass, &signature, NULL); @@ -78,25 +102,40 @@ JNI_ENV_ARGS2(jni, "Failed during the CallObjectMethod call")); } } + unlock(jvmti, jni); } extern JNIEXPORT void JNICALL OnVMInit(jvmtiEnv *jvmti, JNIEnv *jni, jthread thread) { (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_OBJECT_ALLOC, NULL); } +extern JNIEXPORT void JNICALL OnVMDeath(jvmtiEnv *jvmti, JNIEnv *jni) { + lock(jvmti, jni); + is_vm_dead = 1; + unlock(jvmti, jni); +} + extern JNIEXPORT jint JNICALL Agent_OnLoad(JavaVM *jvm, char *options, void *reserved) { jvmtiEnv *jvmti; jvmtiEventCallbacks callbacks; jvmtiCapabilities caps; + jvmtiError err; if ((*jvm)->GetEnv(jvm, (void **) (&jvmti), JVMTI_VERSION) != JNI_OK) { return JNI_ERR; } + err = (*jvmti)->CreateRawMonitor(jvmti, "Event Monitor", &event_mon); + if (err != JVMTI_ERROR_NONE) { + printf("CreateRawMonitor failed: %d\n", err); + return JNI_ERR; + } + memset(&callbacks, 0, sizeof(callbacks)); callbacks.VMObjectAlloc = &VMObjectAlloc; callbacks.VMInit = &OnVMInit; + callbacks.VMDeath = &OnVMDeath; memset(&caps, 0, sizeof(caps)); caps.can_generate_vm_object_alloc_events = 1; @@ -104,6 +143,7 @@ (*jvmti)->SetEventCallbacks(jvmti, &callbacks, sizeof(jvmtiEventCallbacks)); (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_INIT, NULL); + (*jvmti)->SetEventNotificationMode(jvmti, JVMTI_ENABLE, JVMTI_EVENT_VM_DEATH, NULL); return 0; } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/GarbageProducerTest.java openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/GarbageProducerTest.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/GarbageProducerTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/GarbageProducerTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 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 @@ -25,6 +25,7 @@ import utils.GarbageProducer; import common.TmTool; import utils.JstatResults; +import utils.JstatGcCauseTool; /** * Base class for jstat testing which uses GarbageProducer to allocate garbage. @@ -36,19 +37,19 @@ private final static float TARGET_MEMORY_USAGE = 0.7f; private final static float MEASUREMENT_TOLERANCE = 0.05f; private final GarbageProducer garbageProducer; - private final TmTool jstatTool; + private final JstatGcCauseTool jstatTool; - public GarbageProducerTest(TmTool tool) { + public GarbageProducerTest(JstatGcCauseTool tool) { garbageProducer = new GarbageProducer(TARGET_MEMORY_USAGE); // We will be running jstat tool jstatTool = tool; } public void run() throws Exception { - // Run once and get the results asserting that they are reasonable - JstatResults measurement1 = jstatTool.measure(); - measurement1.assertConsistency(); - // Eat metaspace and heap then run the tool again and get the results asserting that they are reasonable + // Run once and get the results asserting that they are reasonable + JstatResults measurement1 = jstatTool.measureAndAssertConsistency(); + + // Eat metaspace and heap then run the tool again and get the results, asserting that they are reasonable System.gc(); garbageProducer.allocateMetaspaceAndHeap(); // Collect garbage. Also update VM statistics diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/GcNewTest.java openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/GcNewTest.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/GcNewTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/GcNewTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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,15 +44,13 @@ JstatGcNewTool jstatGcTool = new JstatGcNewTool(ProcessHandle.current().pid()); // Run once and get the results asserting that they are reasonable - JstatGcNewResults measurement1 = jstatGcTool.measure(); - measurement1.assertConsistency(); + JstatGcNewResults measurement1 = jstatGcTool.measureAndAssertConsistency(); GcProvoker gcProvoker = new GcProvoker(); // Provoke GC and run the tool again gcProvoker.provokeGc(); - JstatGcNewResults measurement2 = jstatGcTool.measure(); - measurement2.assertConsistency(); + JstatGcNewResults measurement2 = jstatGcTool.measureAndAssertConsistency(); // Assert the increase in GC events and time between the measurements assertThat(measurement2.getFloatValue("YGC") > measurement1.getFloatValue("YGC"), "YGC didn't increase between measurements 1 and 2"); @@ -60,8 +58,7 @@ // Provoke GC and run the tool again gcProvoker.provokeGc(); - JstatGcNewResults measurement3 = jstatGcTool.measure(); - measurement3.assertConsistency(); + JstatGcNewResults measurement3 = jstatGcTool.measureAndAssertConsistency(); // Assert the increase in GC events and time between the measurements assertThat(measurement3.getFloatValue("YGC") > measurement2.getFloatValue("YGC"), "YGC didn't increase between measurements 1 and 2"); diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/GcTest01.java openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/GcTest01.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/GcTest01.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/GcTest01.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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,17 +47,15 @@ // We will be running "jstat -gc" tool JstatGcTool jstatGcTool = new JstatGcTool(ProcessHandle.current().pid()); - // Run once and get the results asserting that they are reasonable - JstatGcResults measurement1 = jstatGcTool.measure(); - measurement1.assertConsistency(); + // Run once and get the results asserting that they are reasonable + JstatGcResults measurement1 = jstatGcTool.measureAndAssertConsistency(); GcProvoker gcProvoker = new GcProvoker(); // Provoke GC then run the tool again and get the results // asserting that they are reasonable gcProvoker.provokeGc(); - JstatGcResults measurement2 = jstatGcTool.measure(); - measurement2.assertConsistency(); + JstatGcResults measurement2 = jstatGcTool.measureAndAssertConsistency(); // Assert the increase in GC events and time between the measurements JstatResults.assertGCEventsIncreased(measurement1, measurement2); @@ -66,13 +64,10 @@ // Provoke GC again and get the results // asserting that they are reasonable gcProvoker.provokeGc(); - JstatGcResults measurement3 = jstatGcTool.measure(); - measurement3.assertConsistency(); + JstatGcResults measurement3 = jstatGcTool.measureAndAssertConsistency(); // Assert the increase in GC events and time between the measurements JstatResults.assertGCEventsIncreased(measurement2, measurement3); JstatResults.assertGCTimeIncreased(measurement2, measurement3); - } - } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/GcTest02.java openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/GcTest02.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/GcTest02.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/GcTest02.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -42,6 +42,6 @@ public class GcTest02 { public static void main(String[] args) throws Exception { - new GarbageProducerTest(new JstatGcTool(ProcessHandle.current().pid())).run(); + new GarbageProducerTest(new JstatGcCauseTool(ProcessHandle.current().pid())).run(); } } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCapacityTool.java openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCapacityTool.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCapacityTool.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCapacityTool.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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,9 @@ * This tool executes "jstat -gccapacity " and returns the results as * JstatGcCapacityoolResults */ -public class JstatGcCapacityTool extends TmTool { +public class JstatGcCapacityTool extends JstatTool { public JstatGcCapacityTool(long pid) { super(JstatGcCapacityResults.class, "jstat", "-gccapacity " + pid); } - } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCauseTool.java openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCauseTool.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCauseTool.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcCauseTool.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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,9 @@ * This tool executes "jstat -gc " and returns the results as * JstatGcToolResults */ -public class JstatGcCauseTool extends TmTool { +public class JstatGcCauseTool extends JstatTool { public JstatGcCauseTool(long pid) { super(JstatGcCauseResults.class, "jstat", "-gc " + pid); } - } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcNewTool.java openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcNewTool.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcNewTool.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcNewTool.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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,9 @@ * This tool executes "jstat -gcnew " and returns the results as * JstatGcNewResults */ -public class JstatGcNewTool extends TmTool { +public class JstatGcNewTool extends JstatTool { public JstatGcNewTool(long pid) { super(JstatGcNewResults.class, "jstat", "-gcnew " + pid); } - } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcTool.java openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcTool.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcTool.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcTool.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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,9 @@ * This tool executes "jstat -gc " and returns the results as * JstatGcToolResults */ -public class JstatGcTool extends TmTool { +public class JstatGcTool extends JstatTool { public JstatGcTool(long pid) { super(JstatGcResults.class, "jstat", "-gc " + pid); } - } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatResults.java openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatResults.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatResults.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatResults.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -31,7 +31,7 @@ * Results of running the jstat tool Concrete subclasses will detail the jstat * tool options */ -abstract public class JstatResults extends ToolResults { +public abstract class JstatResults extends ToolResults { private static final float FLOAT_COMPARISON_TOLERANCE = 0.0011f; @@ -181,5 +181,5 @@ return Math.abs(sum) <= FLOAT_COMPARISON_TOLERANCE; } - abstract public void assertConsistency(); + public abstract void assertConsistency(); } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatTool.java openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatTool.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatTool.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatTool.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,59 @@ +/* + * 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 utils; + +import common.TmTool; + +/** + * Common base class for Jstat tools. + */ +public class JstatTool extends TmTool { + + private static final int TRIES = 3; + + public JstatTool(Class resultsClz, String toolName, String otherArgs) { + super(resultsClz, toolName, otherArgs); + } + + /** + * Measure, and call assertConsistency() on the results, + * tolerating a set number of failures to account for inconsistencies in PerfData. + */ + public T measureAndAssertConsistency() throws Exception { + T results = null; + for (int i = 1; i <= TRIES; i++) { + try { + results = measure(); + results.assertConsistency(); + } catch (RuntimeException e) { + System.out.println("Attempt " + i + ": " + e); + if (i == TRIES) { + System.out.println("Too many failures."); + throw(e); + } + // Will retry. + } + } + return results; + } +} diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/Compiler.java 2025-12-18 08:04:02.000000000 +0000 @@ -28,7 +28,9 @@ import jdk.internal.reflect.ConstantPool; import jdk.test.whitebox.WhiteBox; +import java.lang.reflect.Constructor; import java.lang.reflect.Executable; +import java.lang.reflect.Method; import java.util.Arrays; import java.util.Objects; import java.util.concurrent.Executor; @@ -79,26 +81,53 @@ preloadClasses(aClass.getName(), id, constantPool); } - // Make sure the class is initialized. - UNSAFE.ensureClassInitialized(aClass); + // Attempt to initialize the class. If initialization is not possible + // due to NCDFE, accept this, and try compile anyway. + try { + UNSAFE.ensureClassInitialized(aClass); + } catch (NoClassDefFoundError e) { + CompileTheWorld.OUT.printf("[%d]\t%s\tNOTE unable to init class : %s%n", + id, aClass.getName(), e); + } compileClinit(aClass, id); + // Getting constructor/methods with unresolvable signatures would fail with NCDFE. + // Try to get as much as possible, and compile everything else. + // TODO: Would be good to have a Whitebox method that returns the subset of resolvable + // constructors/methods without throwing NCDFE. This would extend the testing scope. + Constructor[] constructors = new Constructor[0]; + Method[] methods = new Method[0]; + + try { + constructors = aClass.getDeclaredConstructors(); + } catch (NoClassDefFoundError e) { + CompileTheWorld.OUT.printf("[%d]\t%s\tNOTE unable to get constructors : %s%n", + id, aClass.getName(), e); + } + + try { + methods = aClass.getDeclaredMethods(); + } catch (NoClassDefFoundError e) { + CompileTheWorld.OUT.printf("[%d]\t%s\tNOTE unable to get methods : %s%n", + id, aClass.getName(), e); + } + // Populate profile for all methods to expand the scope of // compiler optimizations. Do this before compilations start. - for (Executable e : aClass.getDeclaredConstructors()) { + for (Executable e : constructors) { WHITE_BOX.markMethodProfiled(e); } - for (Executable e : aClass.getDeclaredMethods()) { + for (Executable e : methods) { WHITE_BOX.markMethodProfiled(e); } // Now schedule the compilations. long methodCount = 0; - for (Executable e : aClass.getDeclaredConstructors()) { + for (Executable e : constructors) { ++methodCount; executor.execute(new CompileMethodCommand(id, e)); } - for (Executable e : aClass.getDeclaredMethods()) { + for (Executable e : methods) { ++methodCount; executor.execute(new CompileMethodCommand(id, e)); } @@ -127,9 +156,12 @@ if (constantPool.getTagAt(i) == ConstantPool.Tag.CLASS) { constantPool.getClassAt(i); } + } catch (NoClassDefFoundError e) { + CompileTheWorld.OUT.printf("[%d]\t%s\tNOTE unable to preload : %s%n", + id, className, e); } catch (Throwable t) { - CompileTheWorld.OUT.println(String.format("[%d]\t%s\tWARNING preloading failed : %s", - id, className, t)); + CompileTheWorld.OUT.printf("[%d]\t%s\tWARNING preloading failed : %s%n", + id, className, t); t.printStackTrace(CompileTheWorld.ERR); } } @@ -170,17 +202,22 @@ @Override public final void run() { + // Make sure method is not compiled at any level before starting + // progressive compilations. No deopt in-between tiers is needed, + // as long as we increase the compilation levels one by one. + WHITE_BOX.deoptimizeMethod(method); + int compLevel = Utils.INITIAL_COMP_LEVEL; if (Utils.TIERED_COMPILATION) { for (int i = compLevel; i <= Utils.TIERED_STOP_AT_LEVEL; ++i) { - WHITE_BOX.deoptimizeMethod(method); compileAtLevel(i); } } else { compileAtLevel(compLevel); } - // Make the method eligible for sweeping sooner + // Ditch all the compiled versions of the code, make the method + // eligible for sweeping sooner. WHITE_BOX.deoptimizeMethod(method); } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/CtwRunner.java 2025-12-18 08:04:02.000000000 +0000 @@ -292,6 +292,8 @@ "--add-exports", "java.base/jdk.internal.misc=ALL-UNNAMED", "--add-exports", "java.base/jdk.internal.reflect=ALL-UNNAMED", "--add-exports", "java.base/jdk.internal.access=ALL-UNNAMED", + // Graphics clinits may run, force headless mode + "-Djava.awt.headless=true", // enable diagnostic logging "-XX:+LogCompilation", // use phase specific log, hs_err and ciReplay files @@ -308,6 +310,8 @@ // Do not pay extra stack trace generation cost for normally thrown exceptions "-XX:-StackTraceInThrowable", "-XX:+IgnoreUnrecognizedVMOptions", + // Do not pay extra for verifying inline caches during nmethod cleanups + "-XX:-VerifyInlineCaches", // Do not pay extra zapping cost for explicit GC invocations "-XX:-ZapUnusedHeapArea", // Stress* are c2-specific stress flags, so IgnoreUnrecognizedVMOptions is needed diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary/ctw/src/sun/hotspot/tools/ctw/PathHandler.java 2025-12-18 08:04:02.000000000 +0000 @@ -245,9 +245,12 @@ CompileTheWorld.OUT.println(String.format("[%d]\t%s", id, name)); aClass = entry.loader().loadClass(name); Compiler.compileClass(aClass, id, executor); + } catch (NoClassDefFoundError e) { + CompileTheWorld.OUT.printf("[%d]\t%s\tNOTE unable to load/compile, skipped: %s%n", + id, name, e); } catch (Throwable e) { - CompileTheWorld.OUT.println(String.format("[%d]\t%s\tWARNING skipped: %s", - id, name, e)); + CompileTheWorld.OUT.printf("[%d]\t%s\tWARNING skipped: %s%n", + id, name, e); e.printStackTrace(CompileTheWorld.ERR); } } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestBadFormat.java openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestBadFormat.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestBadFormat.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestBadFormat.java 2025-12-18 08:04:02.000000000 +0000 @@ -1124,8 +1124,8 @@ @Test @FailCount(8) - @IR(counts = {IRNode.LOAD_VECTOR_I, "> 0"}) - @IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE_MAX, "> 0"}) // valid + @IR(counts = {IRNode.LOAD_VECTOR_I, "> 0"}, applyIf = {"MaxVectorSize", "> 0"}) // valid, but only if MaxVectorSize > 0, otherwise, a violation is reported + @IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE_MAX, "> 0"}, applyIf = {"MaxVectorSize", "> 0"}) // valid, but only if MaxVectorSize > 0, otherwise, a violation is reported @IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE_ANY, "> 0"}) // valid @IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "", "> 0"}) @IR(counts = {IRNode.LOAD_VECTOR_I, IRNode.VECTOR_SIZE + "xxx", "> 0"}) diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestIRMatching.java openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestIRMatching.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestIRMatching.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/testlibrary_tests/ir_framework/tests/TestIRMatching.java 2025-12-18 08:04:02.000000000 +0000 @@ -125,6 +125,12 @@ GoodFailOnConstraint.create(AllocInstance.class, "allocInstance()", 10) ); + runCheck( + BadFailOnConstraint.create(AllocInstance.class, "allocNested()", 1), + BadFailOnConstraint.create(AllocInstance.class, "allocNested()", 2), + BadFailOnConstraint.create(AllocInstance.class, "allocNested()", 3) + ); + runCheck(BadFailOnConstraint.create(AllocArray.class, "allocArray()", 1), BadFailOnConstraint.create(AllocArray.class, "allocArray()", 2), GoodFailOnConstraint.create(AllocArray.class, "allocArray()", 3), @@ -963,6 +969,13 @@ public void allocInstance() { myClass = new MyClass(); } + + static class Nested {} + @Test + @IR(failOn = {IRNode.ALLOC_OF, "Nested"}) + @IR(failOn = {IRNode.ALLOC_OF, "AllocInstance\\$Nested"}) + @IR(failOn = {IRNode.ALLOC_OF, "AllocInst\\w+\\$Nested"}) + public Nested allocNested() { return new Nested(); } } class AllocArray { diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/gc/gctests/AllocateWithoutOomTest/AllocateWithoutOomTest.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/gctests/AllocateWithoutOomTest/AllocateWithoutOomTest.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/gc/gctests/AllocateWithoutOomTest/AllocateWithoutOomTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/gc/gctests/AllocateWithoutOomTest/AllocateWithoutOomTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -37,7 +37,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/timeout=480 * -XX:-UseGCOverheadLimit * gc.gctests.AllocateWithoutOomTest.AllocateWithoutOomTest */ diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Allocate/alloc001/alloc001.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Allocate/alloc001/alloc001.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Allocate/alloc001/alloc001.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/Allocate/alloc001/alloc001.java 2025-12-18 08:04:02.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 @@ -43,6 +43,8 @@ * * @comment Not run on AIX as it does not support ulimit -v * @requires os.family != "aix" + * @comment Do not run with asan enabled because asan has issues with ulimit + * @requires !vm.asan * @run main/native nsk.jvmti.Allocate.alloc001.alloc001 */ diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetErrorName/geterrname002/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetErrorName/geterrname002/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetErrorName/geterrname002/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetErrorName/geterrname002/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -35,6 +35,9 @@ * JVMTI_ERROR_NULL_POINTER if name_ptr is NULL. * COMMENTS * + * @comment We test with arguments out of scope of the jvmti enums, which causes + * ubsan issues. + * @requires !vm.ubsan * @library /vmTestbase * /test/lib * @run main/othervm/native diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted003.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted003.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted003.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/ResourceExhausted/resexhausted003.java 2025-12-18 08:04:02.000000000 +0000 @@ -25,9 +25,10 @@ import java.io.File; import java.io.FileInputStream; import java.io.PrintStream; +import java.net.URI; +import java.nio.file.Path; +import java.security.CodeSource; import java.security.ProtectionDomain; -import java.util.regex.Pattern; -import java.util.regex.Matcher; import nsk.share.Consts; import nsk.share.test.Stresser; @@ -80,24 +81,12 @@ public static int run(String args[], PrintStream out) { - String testclasspath = System.getProperty("test.class.path"); - String [] testpaths = testclasspath.split(System.getProperty("path.separator")); - String classesDir = ""; - - Pattern pattern = Pattern.compile("^(.*)classes(.*)vmTestbase(.*)$"); - for (int i = 0 ; i < testpaths.length; i++) { - if (pattern.matcher(testpaths[i]).matches()) { - classesDir = testpaths[i]; - } - } - if (classesDir.equals("")) { - System.err.println("TEST BUG: Classes directory not found in test,class.path."); - return Consts.TEST_FAILED; - } Stresser stress = new Stresser(args); String className = Helper.class.getName(); - byte[] bloatBytes = fileBytes(classesDir + File.separator + className.replace('.', '/') + ".class"); + CodeSource classCodeSource = Helper.class.getProtectionDomain().getCodeSource(); + Path classFilePath = Path.of(URI.create(classCodeSource.getLocation().toString())); + byte[] bloatBytes = fileBytes(classFilePath.resolve(className.replace('.', '/') + ".class").toString()); int count = 0; Helper.resetExhaustedEvent(); diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetVerboseFlag/setvrbflag002/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetVerboseFlag/setvrbflag002/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetVerboseFlag/setvrbflag002/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetVerboseFlag/setvrbflag002/TestDescription.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -34,6 +34,9 @@ * if flag is not a jvmtiVerboseFlag. * COMMENTS * + * @comment We test with arguments out of scope of the jvmti enums, which causes + * ubsan issues. + * @requires !vm.ubsan * @library /vmTestbase * /test/lib * @run main/othervm/native diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Launcher.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Launcher.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Launcher.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Launcher.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2024, 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 @@ -32,7 +32,7 @@ /** * This class provides launching of jdb and debuggee in local - * or remote mode according to test command line options. + * mode according to test command line options. */ public class Launcher extends DebugeeBinder { @@ -94,7 +94,7 @@ } /** - * Defines mode (local or remote) and type of connector (default, launching, + * Defines mode (local) and type of connector (default, launching, * raw launching, attaching or listening) according to options * parsed by JdbArgumentHandler. And then launches jdb * and debuggee in defined mode. diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/BindServer.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/BindServer.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/BindServer.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/BindServer.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,1847 +0,0 @@ -/* - * Copyright (c) 2001, 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. - */ - -package nsk.share.jpda; - -import java.io.*; -import java.net.*; -import java.util.*; - -import nsk.share.*; - -/** - * BindServer is an utility to perform JPDA tests - * in remote mode across network. - *

- * This utility should be started on remote host. It listens for connection - * from JPDA tests and launches debuggee VM on this host. - *

- * BindServer works together with Binder used in - * the tests to incapsulate actions required for launching debuggee VM. - * See ProcessBinder and DebugeeArgumentHandler - * to know how run tests in local or remote mode across network or - * on an single host. - *

- * BindServer is started on the debuggee host. - * It recognizes following command line options: - *

    - *
  • -bind.file=filename - configuration file - *
  • -verbose - print verbose messages - *
- *

- * Only required option is -bind.file, which points to the file - * where pairs of particular pathes are presented as they are seen from - * both hosts along with some other BindServer options. - * See execution.html to read more about format of bind-file. - * - * @see DebugeeBinder - * @see DebugeeArgumentHandler - */ -public final class BindServer { - - /** Version of BindServer implementation. */ - public static final long VERSION = 2; - - /** Timeout in milliseconds used for waiting for inner threads. */ - private static long THREAD_TIMEOUT = DebugeeBinder.THREAD_TIMEOUT; // milliseconds - - private static int PASSED = 0; - private static int FAILED = 2; - private static int JCK_BASE = 95; - - private static int TRACE_LEVEL_PACKETS = 10; - private static int TRACE_LEVEL_THREADS = 20; - private static int TRACE_LEVEL_ACTIONS = 30; - private static int TRACE_LEVEL_SOCKETS = 40; - private static int TRACE_LEVEL_IO = 50; - - private static String pathSeparator = System.getProperty("path.separator"); - private static String fileSeparator = System.getProperty("file.separator"); - - private static char pathSeparatorChar = pathSeparator.charAt(0); - private static char fileSeparatorChar = fileSeparator.charAt(0); - - private static Log log = null; - private static Log.Logger logger = null; - private static ArgumentHandler argHandler = null; - - private static String pathConvertions[][] = null; - - - private int totalRequests = 0; - private int acceptedRequests = 0; - private int unauthorizedRequests = 0; - private int busyRequests = 0; - - /** - * Start BindServer utility from command line. - * This method invokes run() and redirects output - * to System.err. - * - * @param argv list of command line arguments - */ - public static void main (String argv[]) { - System.exit(run(argv,System.err) + JCK_BASE); - } - - /** - * Start BindServer utility from JCK-compatible - * environment. - * - * @param argv list of command line arguments - * @param out outpur stream for log messages - * - * @return FAILED if error occured - * PASSED oterwise - */ - public static int run(String argv[], PrintStream out) { - return new BindServer().runIt(argv, out); - } - /** - * Perform execution of BindServer. - * This method handles command line arguments, starts seperate - * thread for listening connection from test on remote host, - * and waits for command "exit" from a user. - * Finally it closes all conections and prints connections - * statiscs. - * - * @param argv list of command line arguments - * @param out outpur stream for log messages - * - * @return FAILED if error occured - * PASSED oterwise - */ - private int runIt(String argv[], PrintStream out) { - try { - argHandler = new ArgumentHandler(argv); - } catch (ArgumentHandler.BadOption e) { - out.println("ERROR: " + e.getMessage()); - return FAILED; - } - - if (argHandler.getArguments().length > 0) { - out.println("ERROR: " + "Too many positional arguments in command line"); - return FAILED; - } - - log = new Log(out, argHandler); - logger = new Log.Logger(log, ""); - - logger.trace(TRACE_LEVEL_THREADS, "BindServer: starting main thread"); - - logger.display("Listening to port: " + argHandler.getBindPortNumber()); - logger.display("Authorizing host: " + argHandler.getDebuggerHost()); - - pathConvertions = new String[][] { - { "TESTED_JAVA_HOME", argHandler.getDebuggerJavaHome(), argHandler.getDebugeeJavaHome() }, - { "TESTBASE", argHandler.getDebuggerTestbase(), argHandler.getDebugeeTestbase() }, - { "WORKDIR", argHandler.getDebuggerWorkDir(), argHandler.getDebugeeWorkDir() } - }; - - logger.display("Translating pathes:"); - for (int i = 0; i < pathConvertions.length; i++) { - logger.display(pathConvertions[i][0] + ":" +"\n" - + " " + pathConvertions[i][1] + "\n" - + " =>" + "\n" - + " " + pathConvertions[i][2]); - } - - String windir = argHandler.getDebugeeWinDir(); - if (!(windir == null || windir.equals(""))) { - logger.display("Using WINDIR: \n" - + " " + argHandler.getDebugeeWinDir()); - } - - BufferedReader stdIn = new BufferedReader( - new InputStreamReader(System.in)); - try (ListeningThread listeningThread = new ListeningThread(this)) { - listeningThread.bind(); - listeningThread.start(); - - System.out.println("\n" - + "BindServer started" + "\n" - + "Type \"exit\" to shut down BindServer" - + "\n"); - - for (; ; ) { - try { - String userInput = stdIn.readLine(); - if (userInput == null || userInput.equals("exit") - || userInput.equals("quit")) { - logger.display("Shutting down BindServer"); - stdIn.close(); - stdIn = null; - break; - } else if (userInput.trim().equals("")) { - continue; - } else { - System.out.println("ERROR: Unknown command: " + userInput); - } - } catch (IOException e) { - e.printStackTrace(log.getOutStream()); - throw new Failure("Caught exception while reading console command:\n\t" - + e); - } - } - - printSummary(System.out); - - logger.trace(TRACE_LEVEL_THREADS, "BindServer: exiting main thread"); - } - - return PASSED; - } - - /** - * Print usefull summary statistics about connections occured. - * - * @param out output stream for printing statistics - */ - private void printSummary(PrintStream out) { - out.println("\n" - + "Connections summary:" + "\n" - + " Tolal connections: " + totalRequests + "\n" - + " Accepted authorized: " + acceptedRequests + "\n" - + " Rejected unauthorized " + unauthorizedRequests + "\n" - + " Rejected being busy: " + busyRequests + "\n"); - }; - - /** - * Check if given path starts with the specified prefix taking - * into account difference between slashChar used in path - * and fileSeparatorChar used in prefix. - * - * @param path path to check - * @param prefix prefix to compare with - * @param slashChar file separator used in path - */ - private static boolean checkPathPrefix(String path, String prefix, char slashChar) { - int prefixLength = prefix.length(); - if (prefixLength > path.length()) { - return false; - } - for (int i = 0; i < prefixLength; i++) { - char pathChar = path.charAt(i); - char prefixChar = prefix.charAt(i); - - if (pathChar != prefixChar) { - if ((pathChar == slashChar || pathChar == fileSeparatorChar - || pathChar == '\\' || pathChar == '/') - && (prefixChar == slashChar || prefixChar == fileSeparatorChar - || prefixChar == '\\' || prefixChar == '/')) { - // do nothing - } else { - return false; - } - } - } - return true; - } - - /** - * Convert given path according to list of prefixes from - * pathConvertions table. - * - * @param path path for converting - * @param slash file separator used in path - * @param name path identifier used for error messages - * @param strict force throwing Failure if path is not matched - * - * @return string with the converted path - * - * @throws Failure if path does not matched for translation - */ - private static String convertPath(String path, String slash, String name, boolean strict) { - if (path == null) - return null; - - char slashChar = slash.charAt(0); - - for (int i = 0; i < pathConvertions.length; i++) { - String from = pathConvertions[i][1]; - String to = pathConvertions[i][2]; - if (checkPathPrefix(path, from, slashChar)) { - return (to + path.substring(from.length())).replace(slashChar, fileSeparatorChar); - } - } - if (strict) { - throw new Failure("Path not matched for translation " + name + ":\n\t" + path); - } - return path; - } - - /** - * Convert given list of pathes according to list of prefixes from - * pathConvertions table by invoking convertPath() - * for each path from the list. - * - * @param list list of pathes for converting - * @param slash file separator used in pathes - * @param name path identifier used for error messages - * @param strict force throwing Failure if some path is not matched - * - * @return list of strings with converted pathes - * - * @throws Failure if some path does not matched for translation - * - * @see #convertPath() - */ - private static String[] convertPathes(String[] list, String slash, String name, boolean strict) { - String[] converted = new String[list.length]; - for (int i = 0; i < list.length; i++) { - converted[i] = convertPath(list[i], slash, name, strict); - } - return converted; - } - - /** - * Pause current thread for specified amount of time in milliseconds, - * This method uses Object.wait(long) method as a reliable - * method which prevents whole VM from suspending. - * - * @param millisecs - amount of time in milliseconds - */ - private static void sleeping(int millisecs) { - Object obj = new Object(); - - synchronized(obj) { - try { - obj.wait(millisecs); - } catch (InterruptedException e) { - e.printStackTrace(log.getOutStream()); - new Failure("Thread interrupted while sleeping:\n\t" + e); - } - } - } - - /** - * Wait for given thread finished for specified timeout or - * interrupt this thread if not finished. - * - * @param thr thread to wait for - * @param millisecs timeout in milliseconds - */ - private static void waitInterruptThread(Thread thr, long millisecs) { - if (thr != null) { - String name = thr.getName(); - try { - if (thr.isAlive()) { - logger.trace(TRACE_LEVEL_THREADS, "Waiting for thread: " + name); - thr.join(millisecs); - } - } catch (InterruptedException e) { - e.printStackTrace(log.getOutStream()); - throw new Failure ("Thread interrupted while waiting for another thread:\n\t" - + e); - } finally { - if (thr.isAlive()) { - logger.trace(TRACE_LEVEL_THREADS, "Interrupting not finished thread: " + name); - thr.interrupt(); -/* - logger.display("Stopping not finished thread: " + thr); - thr.stop(); - */ - } - } - } - } - - /** - * Wait for given thread finished for default timeout - * THREAD_TIMEOUT and - * interrupt this thread if not finished. - * - * @param thr thread to wait for - */ - private static void waitInterruptThread(Thread thr) { - waitInterruptThread(thr, THREAD_TIMEOUT); - } - -///////// Thread listening a TCP/IP socket ////////// - - /** - * An inner thread used for listening connection from remote test - * and starting separate serving thread for each accepted connection. - * - * @see ServingThread - */ - private static class ListeningThread extends Thread implements AutoCloseable { - private volatile boolean shouldStop = false; - private volatile boolean closed = false; - - private BindServer owner = null; - private volatile ServingThread servingThread = null; - private volatile int taskCount = 0; - - private ObjectOutputStream socOut = null; - private ObjectInputStream socIn = null; - - private String autorizedHostName = argHandler.getDebuggerHost(); - private InetAddress autorizedInetAddresses[] = null; - private int port = argHandler.getBindPortNumber(); - private Socket socket = null; - private ServerSocket serverSocket = null; - private InetAddress clientInetAddr = null; - private String clientHostName = null; - private SocketConnection connection = null; - - /** - * Make listening thread for given BindServer object - * as an owner and bind it to listening port by invoking method - * bind(). - * - * @see bind() - */ - public ListeningThread(BindServer owner) { - super("ListeningThread"); - this.owner = owner; - try { - autorizedInetAddresses = InetAddress.getAllByName(autorizedHostName); - } catch (UnknownHostException e) { - e.printStackTrace(log.getOutStream()); - throw new Failure("Cannot resolve DEBUGGER_HOST value: " + autorizedHostName); - } - } - - /** - * Bind ServerSocket to the specified port. - */ - public void bind() { - for (int i = 0; !shouldStop && i < DebugeeBinder.CONNECT_TRIES; i++) { - try { - logger.trace(TRACE_LEVEL_SOCKETS, "ListeningThread: binding to server socket ..."); - // length of the queue = 2 - serverSocket = new ServerSocket(port, 2); - // timeout for the ServerSocket.accept() - serverSocket.setSoTimeout(DebugeeBinder.CONNECT_TRY_DELAY); - logger.trace(TRACE_LEVEL_SOCKETS, "ListeningThread: socket bound: " + serverSocket); - logger.display("Bound to listening port"); - return; - } catch (BindException e) { - logger.display("Socket binding try #" + i + " failed:\n\t" + e); - sleeping(DebugeeBinder.CONNECT_TRY_DELAY); - } catch (IOException e) { - e.printStackTrace(log.getOutStream()); - throw new Failure("Caught exception while binding to socket:\n\t" - + e); - } - } - throw new Failure("Unable to bind to socket after " - + DebugeeBinder.CONNECT_TRIES + " tries"); - } - - /** - * Accept socket connection from authorized remote host and - * start separate SrvingThread to handle each connection. - * Connection from unauthorized hosts or connections made while - * current connection is alive are rejected. - * - * @see ServingThread - * @see #llowConnection() - * @see allowServing() - */ - public void run() { - String reply = null; - - logger.trace(TRACE_LEVEL_THREADS, "ListeningThread: started"); - logger.display("Listening for connection from remote host"); - while(!(shouldStop || isInterrupted())) { - try { - try { - logger.trace(TRACE_LEVEL_SOCKETS, "ListeningThread: waiting for connection from test"); - socket = serverSocket.accept(); - logger.trace(TRACE_LEVEL_SOCKETS, "ListeningThread: connection accepted"); - } catch(InterruptedIOException e) { -// logger.trace(TRACE_LEVEL_SOCKETS, "ListeningThread: timeout of waiting for connection from test"); - continue; - } - owner.totalRequests++; - logger.display(""); - clientInetAddr = socket.getInetAddress(); - clientHostName = clientInetAddr.getHostName(); - logger.display("Connection #" + owner.totalRequests - + " requested from host: " + clientHostName); - connection = new SocketConnection(logger, "BindServer"); -// connection.setPingTimeout(DebugeeBinder.PING_TIMEOUT); - connection.setSocket(socket); - socket = null; - if (allowConnection()) { - if (allowServing()) { - owner.acceptedRequests++; - reply = "host authorized: " + clientHostName; - logger.display("Accepting connection #" + owner.acceptedRequests - + ": " + reply); - servingThread = new ServingThread(this, connection); - servingThread.start(); - cleanHostConnection(); - } else { - owner.busyRequests++; - reply = "BindServer is busy"; - logger.complain("Rejecting connection #" + owner.busyRequests - + ": " + reply); - connection.writeObject(new RequestFailed(reply)); - closeHostConnection(); - } - } else { - owner.unauthorizedRequests++; - reply = "host unauthorized: " + clientHostName; - logger.complain("Rejecting connection #" + owner.unauthorizedRequests - + ": " + reply); - connection.writeObject(new RequestFailed(reply)); - closeHostConnection(); - } - } catch (Exception e) { - logger.complain("Caught exception while accepting connection:\n" + e); - e.printStackTrace(log.getOutStream()); - } - } - logger.trace(TRACE_LEVEL_THREADS, "ListeningThread: exiting"); - closeConnection(); - } - - /** - * Check if the connection made is from authorized host. - * - * @return true if connection is allowed because host authorized - * false if connection is rejected because host unauthorized - */ - private boolean allowConnection() { - // check if local host from loopback address - if (autorizedHostName.equals("localhost")) - return clientInetAddr.isLoopbackAddress(); - - // check if equal hostname - if (autorizedHostName.equals(clientHostName)) - return true; - - // check if equal host address - for (int i = 0; i < autorizedInetAddresses.length; i++) { - if (clientInetAddr.equals(autorizedInetAddresses[i])) { - return true; - } - } - return false; - } - - /** - * Check if no current connection exists or it is dead. - * If current connection presents it will be tested by pinging - * remote host and aborted if host sends no reply. If an alive - * connection exists, new connection will be rejected. - * - * @return true if no alive connection exists - * false otherwise - */ - private boolean allowServing() { - if (servingThread == null) { - return true; - } - if (servingThread.done) { - return true; - } - if (!servingThread.isConnectionAlive()) { - logger.display("# WARNING: Previous connection from remote host is dead: aborting connection"); - servingThread.close(); - servingThread = null; - return true; - } - -/* - logger.complain("Previous connection from remote host is alive: starting new connection"); - servingThread = null; - return true; - */ - logger.complain("Previous connection from remote host is alive: reject new connection"); - return false; - } - - /** - * Wait for this thread finished - * for specified timeout or interrupt it. - * - * @param millis timeout in milliseconds - */ - public void waitForThread(long millis) { - shouldStop = true; - waitInterruptThread(this, millis); - } - - /** - * Close socket connection from remote host. - */ - private void closeHostConnection() { - if (connection != null) { - connection.close(); - } - if (socket != null) { - try { - socket.close(); - } catch (IOException e) { - logger.complain("Caught IOException while closing socket:\n\t" - + e); - } - socket = null; - } - } - - /** - * Assign to connection and socket objects - * but do not close them. - */ - private void cleanHostConnection() { - connection = null; - socket = null; - } - - /** - * Close all connections and sockets. - */ - private void closeConnection() { - closeHostConnection(); - if (serverSocket != null) { - try { - serverSocket.close(); - } catch (IOException e) { - logger.complain("Caught IOException while closing ServerSocket:\n\t" - + e); - } - serverSocket = null; - } - } - - /** - * Close thread by closing all connections and waiting - * for thread to finish. - * - * @see #closeConnection() - */ - @Override - public synchronized void close() { - if (closed) { - return; - } - try { - closeHostConnection(); - if (servingThread != null) { - servingThread.close(); - servingThread = null; - } - waitForThread(THREAD_TIMEOUT); - closeConnection(); - closed = true; - logger.trace(TRACE_LEVEL_THREADS, "ListeningThread closed"); - } catch (Throwable e) { - e.printStackTrace(log.getOutStream()); - logger.complain("Caught exception while closing ListeningThread:\n\t" + e); - } - } - - } // ListeningThread - -///////// Thread working with a communication channel ////////// - - /** - * An internal thread for handling each connection from a test - * on remote host. It reads requests from test and starts separate - * LaunchingThread to execute each request. - * - * @see LaunchingThread - */ - private static class ServingThread extends Thread { - private volatile boolean shouldStop = false; - private volatile boolean closed = false; - private volatile boolean done = false; - - private ListeningThread owner = null; - private LaunchingThread launchingThread = null; - - private SocketConnection connection = null; - - /** - * Make serving thread with specified input/output connection streams - * and given Listenerthread as an owner. - * - * @param owner owner of this thread - * @param connection established socket connection with test - */ - public ServingThread(ListeningThread owner, SocketConnection connection) { - super("ServingThread"); - this.owner = owner; - this.connection = connection; - } - - /** - * Read requests from socket connection and start LaunchingThread - * to perform each requested action. - */ - public void run() { - logger.trace(TRACE_LEVEL_THREADS, "ServingThread: starting handling requests from debugger"); - try { - // sending OK(version) - logger.trace(TRACE_LEVEL_ACTIONS, "ServingThread: sending initial OK(VERSION) to debugger"); - connection.writeObject(new OK(VERSION)); - - // receiving TaskID(id) - logger.trace(TRACE_LEVEL_IO, "ServingThread: waiting for TaskID from debugger"); - Object taskID = connection.readObject(); - logger.trace(TRACE_LEVEL_IO, "ServingThread: received TaskID from debugger: " + taskID); - if (taskID instanceof TaskID) { - String id = ((TaskID)taskID).id; - owner.taskCount++; - logger.println("[" + owner.taskCount + "/" + owner.owner.totalRequests + "]: " + id); - } else { - throw new Failure("Unexpected TaskID received form debugger: " + taskID); - } - - // starting launching thread - launchingThread = new LaunchingThread(this, connection); - launchingThread.start(); - - // receiving and handling requests - while(!(shouldStop || isInterrupted())) { - logger.trace(TRACE_LEVEL_IO, "ServingThread: waiting for request from debugger"); - Object request = connection.readObject(); - logger.trace(TRACE_LEVEL_IO, "ServingThread: received request from debugger: " + request); - if (request == null) { - logger.display("Connection closed"); - break; - } else if (request instanceof Disconnect) { - logger.display("Closing connection by request"); - request = null; - break; - } else { - boolean success = false; - long timeToFinish = System.currentTimeMillis() + THREAD_TIMEOUT; - while (System.currentTimeMillis() < timeToFinish) { - if (launchingThread.doneRequest()) { - success = true; - logger.trace(TRACE_LEVEL_ACTIONS, "ServingThread: asking launching thread to handle request: " + request); - launchingThread.handleRequest(request); - break; - } - try { - launchingThread.join(DebugeeBinder.TRY_DELAY); - } catch (InterruptedException e) { - throw new Failure("ServingThread interrupted while waiting for LaunchingThread:\n\t" - + e); - } - } - if (!success) { - logger.complain("Rejecting request because of being busy:\n" + request); - connection.writeObject( - new RequestFailed("Busy with handling previous request")); - } - } - } - } catch (Exception e) { - e.printStackTrace(log.getOutStream()); - logger.complain("Caught exception while handling request:\n\t" + e); - } finally { - logger.trace(TRACE_LEVEL_THREADS, "ServingThread: exiting"); - closeConnection(); - done = true; - } - } - - /** - * Check if present socket connection is alive. - */ - private boolean isConnectionAlive() { - return (connection != null && connection.isConnected()); - } - - /** - * Wait for this thread finished - * for specified timeout or interrupt it. - * - * @param millis timeout in milliseconds - */ - public void waitForThread(long millis) { - shouldStop = true; - waitInterruptThread(this, millis); - } - - /** - * Close socket connection from remote host. - */ - private void closeConnection() { - if (connection != null) { - connection.close(); - } - if (launchingThread != null) { - launchingThread.handleRequest(null); - } - } - - /** - * Close thread closing socket connection and - * waiting for thread finished. - */ - public synchronized void close() { - if (closed) { - return; - } - closeConnection(); - if (launchingThread != null) { - launchingThread.close(); - launchingThread = null; - } - waitForThread(THREAD_TIMEOUT); - closed = true; - logger.trace(TRACE_LEVEL_THREADS, "ServingThread closed"); - } - - } // ServingThread - -///////// Thread serving a particular Binder's request ////////// - - /** - * An internal thread to execute each request from a test on remote host. - * Requests are coming from ServingThread by invoking handleRequest(Object) - * method. - */ - private static class LaunchingThread extends Thread { - private volatile boolean shouldStop = false; - private volatile boolean closed = false; - public volatile boolean done = false; - - private ServingThread owner = null; -// private ProcessWaitingThread waitingThread = null; - private Process process = null; - - private StreamRedirectingThread stdoutRedirectingThread = null; - private StreamRedirectingThread stderrRedirectingThread = null; - - /** Notification about request occurence. */ - private volatile Object notification = new Object(); - /** Request to execute. */ - private volatile Object request = null; - /** Socket stream to send replies to. */ - private SocketConnection connection = null; - - /** - * Make thread for executing requests from a test and - * send reply. - * - * @param owner owner of this thread - * @connection socket connection for sending replies - */ - public LaunchingThread(ServingThread owner, SocketConnection connection) { - super("LaunchingThread"); - this.owner = owner; - this.connection = connection; - } - - /** - * Notify this thread that new request has come. - * - * @param request request to execute - */ - public void handleRequest(Object request) { - synchronized (notification) { - this.request = request; - notification.notifyAll(); - } - } - - /** - * Check if request has been executed. - */ - public boolean doneRequest() { - return done; - } - - /** - * Wait for request notification from ServingThread - * and execute an action according to the request. - * Request null means thread should finish. - */ - public void run() { - logger.trace(TRACE_LEVEL_THREADS, "LaunchingThread: started to handle request"); - done = true; - while (!isInterrupted()) { - // wait for new request notification - logger.trace(TRACE_LEVEL_ACTIONS, "LaunchingThread: waiting for request"); - synchronized (notification) { - try { - notification.wait(); - } catch (InterruptedException e) { - logger.complain("LaunchingThread interrupted while waiting for request:\n\t" - + e); - break; - } - } - - // execute the request - try { - logger.trace(TRACE_LEVEL_ACTIONS, "LaunchingThread: handling request: " + request); - if (request == null) { - break; - } else if (request instanceof LaunchDebugee) { - launchDebugee((LaunchDebugee)request); - } else if (request instanceof WaitForDebugee) { - waitForDebugee((WaitForDebugee)request); - } else if (request instanceof DebugeeExitCode) { - debugeeExitCode((DebugeeExitCode)request); - } else if (request instanceof KillDebugee) { - killDebugee((KillDebugee)request); - } else { - String reason = "Unknown request: " + request; - logger.complain(reason); - sendReply(new RequestFailed(reason)); - } - } catch (Exception e) { - e.printStackTrace(log.getOutStream()); - logger.complain("Caught exception while handling request:\n\t" + e); - } - done = true; - } - done = true; - logger.trace(TRACE_LEVEL_THREADS, "LaunchingThread: exiting"); - closeConnection(); - } - - /** - * Send given reply to remote test. - * - * @param reply reply object to send - */ - public void sendReply(Object reply) throws IOException { - connection.writeObject(reply); - } - - /** - * Send given output line to remote test. - * - * @param reply wrapper object for output line to send - */ - public void sendStreamMessage(RedirectedStream wrapper) throws IOException { - logger.trace(TRACE_LEVEL_ACTIONS, "Sending output line wrapper to debugger: " + wrapper); - if (connection.isConnected()) { - sendReply(wrapper); - } else { - logger.complain("NOT redirected: " + wrapper.line); - } - } - - /** - * Launch two StreamRedirectingThread threads to redirect - * stdin/stderr output of debuggee VM process via BindServer - * connection. - * - * @param process debuggee VM process - */ - private void launchStreamRedirectors(Process process) { - stdoutRedirectingThread = - new StdoutRedirectingThread(this, process.getInputStream(), - DebugeeProcess.DEBUGEE_STDOUT_LOG_PREFIX); - stdoutRedirectingThread.start(); - stderrRedirectingThread = - new StderrRedirectingThread(this, process.getErrorStream(), - DebugeeProcess.DEBUGEE_STDERR_LOG_PREFIX); - stderrRedirectingThread.start(); - } - - /** - * Execute request for launching debuggee. - * - * @param request request to execute - */ - private void launchDebugee(LaunchDebugee request) throws IOException { - logger.trace(TRACE_LEVEL_ACTIONS, "LaunchDebugee: handle request: " + request); - - if (process != null) { - logger.complain("Unable to launch debuggee: process already launched"); - sendReply(new RequestFailed("Debuggee process already launched")); - return; - } - - try { - String[] cmd = request.cmd; - cmd[0] = convertPath(cmd[0], request.slash, "TESTED_JAVA_HOME", true); - for (int i = 1; i < cmd.length; i++) { - cmd[i] = convertPath(cmd[i], request.slash, "JAVA_ARGS", false); - } - String workDir = convertPath(request.workDir, request.slash, "WORKDIR", true); - String[] classPathes = convertPathes(request.classPathes, request.slash, "CLASSPATH", true); - String windir = argHandler.getDebugeeWinDir(); - - boolean win = (!(windir == null || windir.equals(""))); - String[] envp = new String[win ? 3 : 1] ; - envp[0] = "CLASSPATH=" + ArgumentParser.joinArguments(classPathes, "", pathSeparator); - if (win) { - envp[1] = "WINDIR=" + windir; - envp[2] = "SystemRoot=" + windir; - } - - logger.display("Setting environment:\n" - + " " + ArgumentHandler.joinArguments(envp, "", "\n ")); - logger.display("Setting work dir:\n" - + " " + workDir); - logger.display("Launching debuggee:\n" - + " " + ArgumentHandler.joinArguments(cmd, "\"")); - - process = Runtime.getRuntime().exec(cmd, envp, new File(workDir)); - logger.display(" debuggee launched successfully"); - - launchStreamRedirectors(process); - } catch (Exception e) { - if (!(e instanceof Failure)) { - e.printStackTrace(log.getOutStream()); - } - logger.complain("Caught exception while launching debuggee:\n\t" + e); - sendReply(new CaughtException(e)); - return; - } - - sendReply(new OK()); - } - - /** - * Execute request for waiting for debuggee exited. - * - * @param request request to execute - */ - private void waitForDebugee(WaitForDebugee request) throws IOException { - logger.trace(TRACE_LEVEL_ACTIONS, "WaitForDebugee: handle request: " + request); - - if (process == null) { - String reply = "No debuggee process to wait for"; - logger.complain(reply); - sendReply(new RequestFailed(reply)); - return; - } - - logger.display("Waiting for debuggee to exit"); -/* - // because timeout is not supported now - // we do not use separate thread for waiting for process - // and so following lines are commented out - - waitingThread = new ProcessWaitingThread(); - logger.trace(TRACE_LEVEL_ACTIONS, "LaunchingThread: starting thread for waiting for debugee process"); - waitingThread.start(); - try { - waitingThread.join(request.timeout); - if (waitingThread.isAlive()) { - String reply = "Timeout exceeded while waiting for debuggee to exit"; - logger.complain(reply); - waitingThread.interrupt(); - sendReply(socOut, new RequestFailed(reply)); - return; - } - } catch (InterruptedException e) { - e.printStackTrace(log.getOutStream()); - logger.complain("Caught exception while waiting for debuggee:\n\t" + e); - sendReply(new CaughtException(e)); - return; - } - int exitStatus = waitingThread.exitStatus; - waitingThread = null; - */ - int exitStatus; - try { - exitStatus = process.waitFor(); - waitForRedirectors(THREAD_TIMEOUT); - process.destroy(); - } catch (InterruptedException e) { - e.printStackTrace(log.getOutStream()); - logger.complain("Caught exception while waiting for debuggee process to exit:\n\t" - + e); - sendReply(new CaughtException(e)); - return; - } - logger.display(" debuggee exited with exit status: " + exitStatus); - sendReply(new OK(exitStatus)); - } - - /** - * Execute request for returning debuggee exit code. - * - * @param request request to execute - */ - private void debugeeExitCode(DebugeeExitCode request) throws IOException { - logger.trace(TRACE_LEVEL_ACTIONS, "DebugeeExitCode: handle request: " + request); - - if (process == null) { - String reply = "No debuggee process to get exit code for"; - logger.complain(reply); - sendReply(new RequestFailed(reply)); - return; - } - - int exitStatus = 0; - try { - exitStatus = process.exitValue(); - } catch (IllegalThreadStateException e) { - logger.display("# WARNING: Caught exception while getting exit status of debuggee:\n\t" - + e); - sendReply(new CaughtException(e)); - return; - } - logger.trace(TRACE_LEVEL_ACTIONS, "DebugeeExitCode: return debuggee exit status: " + exitStatus); - sendReply(new OK(exitStatus)); - } - - /** - * Execute request for unconditional terminating debuggee process. - * - * @param request request to execute - */ - private void killDebugee(KillDebugee request) throws IOException { - logger.trace(TRACE_LEVEL_ACTIONS, "killDebugee: handle request: " + request); - - if (process == null) { - String reply = "No debuggee process to kill"; - logger.complain(reply); - sendReply(new RequestFailed(reply)); - return; - } - - logger.trace(TRACE_LEVEL_ACTIONS, "killDebugee: killing debuggee process"); - process.destroy(); - - logger.trace(TRACE_LEVEL_ACTIONS, "killDebugee: debuggee process killed"); - sendReply(new OK()); - } - - /** - * Terminate debigee VM process if still alive. - */ - private void terminateDebugeeAtExit() { - if (process != null) { - logger.trace(TRACE_LEVEL_ACTIONS, "Checking that debuggee process has exited correctly"); - try { - int value = process.exitValue(); - } catch (IllegalThreadStateException e) { - logger.complain("Debuggee process has not exited correctly: trying to kill it"); - process.destroy(); - try { - int value = process.exitValue(); - } catch (IllegalThreadStateException ie) { - logger.complain("Debuggee process is alive after killing it"); - } - process = null; - return; - } - logger.trace(TRACE_LEVEL_ACTIONS, "Debuggee process has exited correctly"); - } - } - - /** - * Wait for stream redirecting threads finished - * for specified timeout. - * - * @param millis timeout in milliseconds - */ - private void waitForRedirectors(long millis) { - try { - if (stdoutRedirectingThread != null) { - stdoutRedirectingThread.join(millis); - } - if (stderrRedirectingThread != null) { - stderrRedirectingThread.join(millis); - } - } catch (InterruptedException e) { - e.printStackTrace(log.getOutStream()); - logger.complain("Caught exception while waiting for debuggee process exited:\n\t" - + e); - } - } - - /** - * Wait for this thread finished - * for specified timeout or interrupt it. - * - * @param millis timeout in milliseconds - */ - public void waitForThread(long millis) { - shouldStop = true; - handleRequest(null); - waitInterruptThread(this, millis); - } - - /** - * Close connection with debuggee. - */ - public void closeConnection() { - // no connections to close - } - - /** - * Close thread by closing all connections with debuggee, - * finishing all redirectors and wait for thread finished. - */ - public synchronized void close() { - if (closed) { - return; - } - closeConnection(); - terminateDebugeeAtExit(); - if (stdoutRedirectingThread != null) { - stdoutRedirectingThread.close(); - stdoutRedirectingThread = null; - } - if (stderrRedirectingThread != null) { - stderrRedirectingThread.close(); - stderrRedirectingThread = null; - } - waitForThread(THREAD_TIMEOUT); - closed = true; - logger.trace(TRACE_LEVEL_THREADS, "LaunchingThread closed"); - } - - /** - * An inner thread for waiting for debuggee process exited - * and saving its exit status. (currently not used) - */ -/* - private class ProcessWaitingThread extends Thread { - int exitStatus = 0; - - ProcessWaitingThread() { - super("ProcessWaitingThread"); - } - - public void run() { - logger.trace(TRACE_LEVEL_THREADS, "ProcessWaitingThread: starting waiting for process"); - try { - exitStatus = process.waitFor(); - } catch (InterruptedException e) { - e.printStackTrace(log.getOutStream()); - logger.complain("Caught exception while waiting for debuggee process:\n\t" - + e); - } - logger.trace(TRACE_LEVEL_ACTIONS, "ProcessWaitingThread: process finished with status: " + exitStatus); - logger.trace(TRACE_LEVEL_THREADS, "ProcessWaitingThread: exiting"); - } - - public synchronized void close() { - logger.trace(TRACE_LEVEL_THREADS, "ProcessWaitingThread closed"); - } - - } // ProcessWaitingThread - */ - } // LaunchingThread - -///////// Redirecting threads ///////// - - /** - * An abstract base class for internal threads which redirects stderr/stdout - * output from debuggee process via BindServer connection. - *

- * Two derived classes will redirect stderr or stdout stream - * by enwrapping stream line by DebugeeStderr or - * DebugeeStderr objects. They should implement only one - * abstract method enwrapLine(String) to make the difference. - */ - public static abstract class StreamRedirectingThread extends Thread { - private volatile boolean shouldStop = false; - private volatile boolean closed = false; - - private LaunchingThread owner = null; - - private BufferedReader bin = null; - private String prefix = null; - - /** - * Make a thread to enwrap and redirect lines from specified - * input stream with given prefix. - * - * @param owner owner of this thread - * @param is input stream to redirect lines from - * @param prefix prefix to add to each line - */ - public StreamRedirectingThread(LaunchingThread owner, InputStream is, String prefix) { - super("StreamRedirectingThread"); - this.prefix = prefix; - this.owner = owner; - bin = new BufferedReader(new InputStreamReader(is)); - } - - /** - * Read lines from an input stream, enwrap them, and send to remote - * test via BindServer connection. - */ - public void run() { - logger.trace(TRACE_LEVEL_THREADS, "StreamRedirectingThread: starting redirect output stream"); - try { - String line; - logger.trace(TRACE_LEVEL_IO, "StreamRedirectingThread: waiting for line from debuggee output"); - while(!shouldStop) { - line = bin.readLine(); - if (line == null) - break; - owner.sendStreamMessage(enwrapLine(prefix + line)); - } - } catch (EOFException e) { - logger.display("Debuggee output stream closed by process"); - } catch (IOException e) { - e.printStackTrace(log.getOutStream()); - logger.display("# WARNING: Connection to debuggee output stream aborted:\n\t" + e); - } catch (Exception e) { - e.printStackTrace(log.getOutStream()); - logger.complain("Caught exception while redirecting debuggee output stream:\n\t" - + e); - } - logger.trace(TRACE_LEVEL_THREADS, "StreamRedirectingThread: exiting"); - closeConnection(); - } - - /** - * Envrap output line by the appropriate wrapper. - * @param line line to enwrap - */ - protected abstract RedirectedStream enwrapLine(String line); - - /** - * Wait for this thread finished or interrupt it. - * - * @param millis timeout in milliseconds - */ - public void waitForThread(long millis) { - shouldStop = true; - waitInterruptThread(this, millis); - } - - /** - * Close redirected process output stream. - */ - public void closeConnection() { - if (closed) { - return; - } - if (bin != null) { - try { - bin.close(); - } catch (IOException e) { - e.printStackTrace(log.getOutStream()); - logger.complain("Caught exception while closing debuggee output stream:\n\t" - + e); - } - bin = null; - } - closed = true; - logger.trace(TRACE_LEVEL_THREADS, "StreamRedirectingThread closed"); - } - - /** - * Close thread by waiting redirected stream closed - * and finish the thread. - */ - public synchronized void close() { - if (closed) { - return; - } - waitForThread(THREAD_TIMEOUT); - closeConnection(); - closed = true; - logger.trace(TRACE_LEVEL_THREADS, "StreamRedirectingThread closed"); - } - - } // StreamRedirectingThread - - /** - * Particalar case of StreamRedirectingThread to redirect - * stderr stream by enwrapping lines into DebugeeStderr - * objects. - */ - private static class StderrRedirectingThread extends StreamRedirectingThread { - - /** - * Make a thread to redirect stderr output stream. - */ - StderrRedirectingThread(LaunchingThread owner, InputStream is, String prefix) { - super(owner, is, prefix); - setName("StderrRedirectingThread"); - } - - /** - * Enwrap given line into DebugeeStderr object. - */ - protected RedirectedStream enwrapLine(String line) { - return new DebugeeStderr(line); - } - - } - - /** - * Particalar case of StreamRedirectingThread to redirect - * stdout stream by enwrapping lines into DebugeeStdout - * objects. - */ - private static class StdoutRedirectingThread extends StreamRedirectingThread { - - /** - * Make a thread to redirect stdout output stream. - */ - StdoutRedirectingThread(LaunchingThread owner, InputStream is, String prefix) { - super(owner, is, prefix); - setName("StdoutRedirectingThread"); - } - - /** - * Enwrap given line into DebugeeStdout object. - */ - protected RedirectedStream enwrapLine(String line) { - return new DebugeeStdout(line); - } - - } - -///////// BinderServer's packets ////////// - - /** - * Base serializable object to transmit request or reply - * via BindServer connection. - */ - public static class Packet implements Serializable {} - - ///////// Binder's requests ////////// - - /** - * Base class to represent request to BindServer. - */ - public static abstract class Request extends Packet {} - - /** - * This class implements task identification command. - */ - public static class TaskID extends Request { - public String id; - - public TaskID(String id) { - this.id = id; - } - - public String toString() { - return "TaskID: id=" + id; - } - } - - /** - * This class implements a request for launching a debugee. - */ - public static class LaunchDebugee extends Request { - public String slash; // slash symbol used on debugger host - public String[] cmd; // command line arguments as seen on debugger host - public String workDir; // path to working directory as seen on debugger host - public String[] classPathes; // list of class pathes as seen on debugger host - - public LaunchDebugee(String[] cmd, String slash, String workDir, - String[] pathes, String[] classPathes, - String[] libPathes) { - this.cmd = cmd; - this.slash = slash; - this.workDir = workDir; - this.classPathes = classPathes; - } - - public String toString() { - return "LaunchDebugee:" - + "\n\tcommand=" + ArgumentParser.joinArguments(cmd, "\"") - + "\n\tWORKDIR=" + workDir - + "\n\tCLASSPATH=" + ArgumentParser.joinArguments(classPathes, "", ":") - + "\n\tslash=" + slash; - } - } - - /** - * This class implements a request for waiting for debugee - * termination. - */ - public static class WaitForDebugee extends Request { - public long timeout = 0; // timeout in minutes for waiting - - public WaitForDebugee(long value) { - timeout = value; - } - - public String toString() { - return "WaitForDebugee: timeout=" + timeout; - } - } - - /** - * This class implements a request for exit code of - * debugee process. - */ - public static class DebugeeExitCode extends Request { - public String toString() { - return "SebugeeExitCode"; - } - } - - /** - * This class implements a request for killing debugee process. - */ - public static class KillDebugee extends Request { - public String toString() { - return "KillDebugee"; - } - } - - /** - * This class implements a request to disconnect connection with test. - */ - public static class Disconnect extends Request { - public String toString() { - return "Disconnect"; - } - } - - ///////// BindServer's responses ////////// - - /** - * Base class to represent response from BindServer. - */ - public static abstract class Response extends Packet {} - - /** - * This class implements a response that a previoulsy received - * request has been successfully performed. - */ - public static class OK extends Response { - public long info = BindServer.VERSION; // optional additional info - - public OK() { - } - - public OK(long value) { - info = value; - } - - public String toString() { - return "OK(" + info + ")"; - } - } - - /** - * This class implements a response that the BindServer is - * unable to serve a previoulsy received request. - */ - public static class RequestFailed extends Response { - public String reason; // the short explanation of failure - - public RequestFailed(String reason) { - this.reason = reason; - } - - public String toString() { - return "RequestFailed(" + reason + ")"; - } - } - - /** - * This class implements a response that the BindServer is - * unable to serve a previoulsy received request because of - * caught exception. - */ - public static class CaughtException extends RequestFailed { - public CaughtException(Exception cause) { - super("Caught exception: " + cause); - } - } - - ///////// Wrappers for redirected messages ////////// - - /** - * Base class to represent wrappers for redirected streams. - */ - public static class RedirectedStream extends Packet { - public String line; // line containing line from redirected stream - - public RedirectedStream(String str) { - line = str; - } - - public String toString() { - return "RedirectedStream(" + line + ")"; - } - } - - /** - * This class enwraps redirected line of stdout stream. - */ - public static class DebugeeStdout extends RedirectedStream { - - public DebugeeStdout(String str) { - super(str); - } - - public String toString() { - return "DebugeeStdout(" + line + ")"; - } - } - - /** - * This class enwraps redirected line of stderr stream. - */ - public static class DebugeeStderr extends RedirectedStream { - public DebugeeStderr(String str) { - super(str); - } - - public String toString() { - return "DebugeeStderr(" + line + ")"; - } - } - -/////// ArgumentHandler for BindServer command line ///////// - - /** - * This class is used to parse arguments from command line - * and specified bind-file, - */ - private static class ArgumentHandler extends ArgumentParser { - - protected Properties fileOptions; - - /** - * Make parser object for command line arguments. - * - * @param args list of command line arguments - */ - public ArgumentHandler(String[] args) { - super(args); - } - - /** - * Check if given command line option is aloowed. - * - * @param option option name - * @param value option value - */ - protected boolean checkOption(String option, String value) { - if (option.equals("bind.file")) { - // accept any file name - return true; - } - return super.checkOption(option, value); - } - - /** - * Check if all recignized options are compatible. - */ - protected void checkOptions() { - if (getBindFileName() == null) { - throw new BadOption("Option -bind.file is requred "); - } - super.checkOptions(); - } - - /** - * Check if value of this option points to a existing directory. - * - * @param option option name - * @param dir option value - */ - private void checkDir(String option, String dir) { - File file = new File(dir); - if (!file.exists()) { - throw new BadOption(option + " does not exist: " + dir); - } - if (!file.isAbsolute()) { - throw new BadOption(option + " is not absolute pathname: " + dir); - } - if (!file.isDirectory()) { - throw new BadOption(option + " is not directory: " + dir); - } - } - - /** - * Check if option from bind-file is allowed. - * - * @param option option name - * @param value option value - */ - protected boolean checkAdditionalOption(String option, String value) { - - if (option.equals("DEBUGGER_HOST")) { - // accept any hostname - return true; - } - - if (option.equals("BINDSERVER_PORT")) { - // accept only integer value - try { - int port = Integer.parseInt(value); - } catch (NumberFormatException e) { - throw new Failure("Not integer value of bind-file option " + option - + ": " + value); - } - return true; - } - - if (option.equals("DEBUGGER_TESTED_JAVA_HOME") - || option.equals("DEBUGGER_WORKDIR") - || option.equals("DEBUGGER_TESTBASE")) { - if (value == null || value.equals("")) { - throw new BadOption("Empty value of bind-file option " + option); - } - return true; - } - - if (option.equals("DEBUGGEE_TESTED_JAVA_HOME") - || option.equals("DEBUGGEE_WORKDIR") - || option.equals("DEBUGGEE_TESTBASE")) { - if (value == null || value.equals("")) { - throw new BadOption("Empty value of bind-file option " + option); - } - checkDir(option, value); - return true; - } - - if (option.equals("DEBUGGEE_WINDIR")) { - if (!(value == null || value.equals(""))) { - checkDir(option, value); - } - return true; - } - - return false; - } - - /** - * Check if all recignized options form bind-file are compatible. - */ - protected void checkAdditionalOptions() { - - if (getDebuggerJavaHome() == null) { - throw new BadOption("Option DEBUGGER_JAVA_HOME missed from bind-file"); - } - if (getDebuggerWorkDir() == null) { - throw new BadOption("Option DEBUGGER_WORKDIR missed from bind-file"); - } - if (getDebuggerTestbase() == null) { - throw new BadOption("Option DEBUGGER_TESTBASE missed from bind-file"); - } - - if (getDebugeeJavaHome() == null) { - throw new BadOption("Option DEBUGGEE_JAVA_HOME missed from bind-file"); - } - if (getDebugeeWorkDir() == null) { - throw new BadOption("Option DEBUGGEE_WORKDIR missed from bind-file"); - } - if (getDebugeeTestbase() == null) { - throw new BadOption("Option DEBUGGEE_TESTBASE missed from bind-file"); - } - } - - /** - * Parse options form specified bind-file. - */ - protected void parseAdditionalOptions() { - Enumeration keys = fileOptions.keys(); - while (keys.hasMoreElements()) { - String option = (String)keys.nextElement(); - String value = fileOptions.getProperty(option); - if (! checkAdditionalOption(option, value)) { - throw new BadOption("Unrecognized bind-file option: " + option); - } - } - checkAdditionalOptions(); - } - - /** - * Parse all options from command line and specified bind-file. - */ - protected void parseArguments() { - super.parseArguments(); - String fileName = getBindFileName(); - try { - FileInputStream bindFile = new FileInputStream(fileName); - fileOptions = new Properties(); - fileOptions.load(bindFile); - bindFile.close(); - } catch(FileNotFoundException e) { - throw new BadOption("Unable to open bind-file " + fileName + ": " + e); - } catch(IOException e) { - e.printStackTrace(log.getOutStream()); - throw new Failure("Caught exception while reading bind-file:\n" + e); - } - parseAdditionalOptions(); - } - - /** Return name of specified bind-file. */ - public String getBindFileName() { - return options.getProperty("bind.file"); - } - - /** Return specified debuggee host name . */ - public String getDebuggerHost() { - return fileOptions.getProperty("DEBUGGER_HOST", "localhost"); - } - - /** Return string representation of port number for BindServer connection. */ - public String getBindPort() { - return fileOptions.getProperty("BINDSERVER_PORT", "9000"); - } - - /** Return specified port number for BindServer connection. */ - public int getBindPortNumber() { - try { - return Integer.parseInt(getBindPort()); - } catch (NumberFormatException e) { - throw new Failure("Not integer value of BindServer port"); - } - } - - /** Return specified path to tested JDK used for debuggee VM. */ - public String getDebugeeJavaHome() { - return fileOptions.getProperty("DEBUGGEE_TESTED_JAVA_HOME"); - } - - /** Return specified path to tested JDK used for debugger. */ - public String getDebuggerJavaHome() { - return fileOptions.getProperty("DEBUGGER_TESTED_JAVA_HOME"); - } - - /** Return specified path to working dir from debuggee host. */ - public String getDebugeeWorkDir() { - return fileOptions.getProperty("DEBUGGEE_WORKDIR"); - } - - /** Return specified path to working dir from debugger host. */ - public String getDebuggerWorkDir() { - return fileOptions.getProperty("DEBUGGER_WORKDIR"); - } - - /** Return specified path to testbase dir from debuggee host. */ - public String getDebugeeTestbase() { - return fileOptions.getProperty("DEBUGGEE_TESTBASE"); - } - - /** Return specified path to testbase dir from debugger host. */ - public String getDebuggerTestbase() { - return fileOptions.getProperty("DEBUGGER_TESTBASE"); - } - - /** Return specified path to system directory on Wimdows platform. */ - public String getDebugeeWinDir() { - return fileOptions.getProperty("DEBUGGEE_WINDIR"); - } - - } // ArgumentHandler - -} // BindServer diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeArgumentHandler.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeArgumentHandler.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeArgumentHandler.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeArgumentHandler.java 2025-12-18 08:04:02.000000000 +0000 @@ -67,8 +67,6 @@ * using JVMDI strict mode *

  • -pipe.port=<port> - * port number for internal IOPipe connection - *
  • -bind.port=<port> - - * port number for BindServer connection * *

    * See also list of basic options recognized by @@ -421,47 +419,6 @@ return (java_home == null); } - private boolean bindPortInited = false; - /** - * Return string representation of the port number for BindServer connection, - * specified by -bind.port command line option, or - * "DEFAULT_BIND_PORT" string by default. - * - * @see #getBindPortNumber() - * @see #setRawArguments(String[]) - */ - public String getBindPort() { - String port = options.getProperty("bind.port"); - if (port == null) { - if (!bindPortInited) { - port = findFreePort(); - if (port == null) { - port = DEFAULT_BIND_PORT; - } - options.setProperty("bind.port", port); - bindPortInited = true; - } - } - return port; - } - - /** - * Return port number for BindServer connection, - * specified by -bind.port command line option, or - * "DEFAULT_BIND_PORT" port number by default. - * - * @see #getBindPort() - * @see #setRawArguments(String[]) - */ - public int getBindPortNumber() { - String value = getBindPort(); - try { - return Integer.parseInt(value); - } catch (NumberFormatException e) { - throw new TestBug("Not integer value of \"bind.port\" argument: " + value); - } - } - /** * Return JVMDI strict mode for launching debugee VM, specified by. * -jvmdi.strict command line option, or @@ -683,7 +640,6 @@ // option with positive integer port value if (option.equals("transport.port") - || option.equals("bind.port") || option.equals("pipe.port")) { try { int number = Integer.parseInt(value); diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeBinder.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeBinder.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeBinder.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeBinder.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -52,8 +52,8 @@ * @see DebugeeArgumentHandler * @see DebugeeProcess * @see IOPipe - * @see BindServer * + * @see nsk.share.jdb.Launcher * @see nsk.share.jdi.Binder * @see nsk.share.jdwp.Binder */ diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeProcess.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeProcess.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeProcess.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeProcess.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,7 +41,7 @@ * This is an abstract class that declares abstract methods to control * debugee VM process. * Derived classes should implement these methods corresponding to the mode - * that the process should be started in (locally, remotely or manually). + * that the process should be started in (locally). *

    * Particular derived classes nsk.share.jdi.Debugee and * nsk.share.jdwp.Debugee provides additional abilities diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/IOPipe.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/IOPipe.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/IOPipe.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/jpda/IOPipe.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,12 +29,10 @@ /** * This class implements communicational channel between * debugger and debugee used for synchronization and data exchange. - * This channel is based on TCP/IP sockets and works in all - * modes (local, remote and manual). In a remote mode - * connection to BindServer is used for redirecting IOPipe messages. - * In all other modes direct TCP/IP coonnection between two VMs is used. + * This channel is based on TCP/IP sockets. * - * @see BindServer + * @see jpda.DebugeeArgumentHandler + * @see jpda.DebugeeProcess */ public class IOPipe extends SocketIOPipe { diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/share/test/Stresser.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/test/Stresser.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/nsk/share/test/Stresser.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/nsk/share/test/Stresser.java 2025-12-18 08:04:02.000000000 +0000 @@ -58,9 +58,12 @@ private String name; private long maxIterations; private long iterations; + + // In nanoseconds private long startTime; - private long finishTime; private long currentTime; + private long stressTime; + private PrintStream defaultOutput = System.out; /* @@ -179,15 +182,15 @@ */ public void printExecutionInfo(PrintStream out) { println(out, "Completed iterations: " + iterations); - println(out, "Execution time: " + (currentTime - startTime) + " seconds"); + println(out, "Execution time: " + (currentTime - startTime) / 1_000_000_000.0 + " seconds"); if (!finished) { println(out, "Execution is not finished yet"); } else if (forceFinish) { println(out, "Execution was forced to finish"); } else if (maxIterations != 0 && iterations >= maxIterations) { println(out, "Execution finished because number of iterations was exceeded: " + iterations + " >= " + maxIterations); - } else if (finishTime != 0 && currentTime >= finishTime) { - println(out, "Execution finished because time was exceeded: " + (currentTime - startTime) + " >= " + (finishTime - startTime)); + } else if (stressTime != 0 && (currentTime - startTime) >= stressTime) { + println(out, "Execution finished because time has exceeded stress time: " + stressTime / 1_000_000_000 + " seconds"); } } @@ -208,13 +211,8 @@ public void start(long stdIterations) { maxIterations = stdIterations * options.getIterationsFactor(); iterations = 0; - long stressTime = options.getTime(); - startTime = System.currentTimeMillis(); - if (stressTime == 0) { - finishTime = 0; - } else { - finishTime = startTime + stressTime * 1000; - } + stressTime = options.getTime() * 1_000_000_000; + startTime = System.nanoTime(); finished = false; forceFinish = false; if (options.isDebugEnabled()) { @@ -232,7 +230,7 @@ * finally {} block. */ public void finish() { - currentTime = System.currentTimeMillis(); + currentTime = System.nanoTime(); finished = true; if (options.isDebugEnabled()) { printExecutionInfo(defaultOutput); @@ -255,10 +253,12 @@ */ public boolean iteration() { ++iterations; + boolean result = continueExecution(); + // Call print at the end to show the most up-to-date info. if (options.isDebugDetailed()) { printExecutionInfo(defaultOutput); } - return continueExecution(); + return result; } /** @@ -267,14 +267,14 @@ * @return true if execution needs to continue */ public boolean continueExecution() { - currentTime = System.currentTimeMillis(); + currentTime = System.nanoTime(); if (startTime == 0) { throw new TestBug("Stresser is not started."); } return !forceFinish && !finished && (maxIterations == 0 || iterations < maxIterations) - && (finishTime == 0 || currentTime < finishTime); + && (stressTime == 0 || (currentTime - startTime) < stressTime); } /** @@ -309,7 +309,7 @@ * @return time */ public long getExecutionTime() { - return System.currentTimeMillis() - startTime; + return (System.nanoTime() - startTime) / 1_000_000; } /** @@ -318,11 +318,11 @@ * @return time */ public long getTimeLeft() { - long current = System.currentTimeMillis(); - if (current >= finishTime) { + long elapsedTime = System.nanoTime() - startTime; + if (elapsedTime >= stressTime) { return 0; } else { - return finishTime - current; + return (stressTime - elapsedTime) / 1_000_000; } } diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Implicit01/cs_disabled/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Implicit01/cs_disabled/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Implicit01/cs_disabled/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Implicit01/cs_disabled/TestDescription.java 2025-12-18 08:04:02.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 @@ -33,3 +33,17 @@ * @run main/othervm -XX:-CompactStrings vm.compiler.optimizations.stringconcat.implicit.Implicit01 */ + +/* + * @test id=stringConcatInline + * + * @summary The same test with an updated compile directive that produces + * StringBuilder-backed string concatenations. + * VM Testbase keywords: [jit, quick] + * + * @library /vmTestbase + * /test/lib + * @compile -XDstringConcat=inline ../../Implicit01.java + * @run main/othervm -XX:-CompactStrings vm.compiler.optimizations.stringconcat.implicit.Implicit01 + */ + diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Implicit01/cs_enabled/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Implicit01/cs_enabled/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Implicit01/cs_enabled/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Implicit01/cs_enabled/TestDescription.java 2025-12-18 08:04:02.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 @@ -33,3 +33,17 @@ * @run main/othervm -XX:+CompactStrings vm.compiler.optimizations.stringconcat.implicit.Implicit01 */ + +/* + * @test id=stringConcatInline + * + * @summary The same test with an updated compile directive that produces + * StringBuilder-backed string concatenations. + * VM Testbase keywords: [jit, quick] + * + * @library /vmTestbase + * /test/lib + * @compile -XDstringConcat=inline ../../Implicit01.java + * @run main/othervm -XX:+CompactStrings vm.compiler.optimizations.stringconcat.implicit.Implicit01 + */ + diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Merge01/cs_disabled/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Merge01/cs_disabled/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Merge01/cs_disabled/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Merge01/cs_disabled/TestDescription.java 2025-12-18 08:04:02.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 @@ -33,3 +33,17 @@ * @run main/othervm -XX:-CompactStrings vm.compiler.optimizations.stringconcat.implicit.Merge01 */ + +/* + * @test id=stringConcatInline + * + * @summary The same test with an updated compile directive that produces + * StringBuilder-backed string concatenations. + * VM Testbase keywords: [jit, quick] + * + * @library /vmTestbase + * /test/lib + * @compile -XDstringConcat=inline ../../Merge01.java + * @run main/othervm -XX:-CompactStrings vm.compiler.optimizations.stringconcat.implicit.Merge01 + */ + diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Merge01/cs_enabled/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Merge01/cs_enabled/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Merge01/cs_enabled/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/compiler/optimizations/stringconcat/implicit/Merge01/cs_enabled/TestDescription.java 2025-12-18 08:04:02.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 @@ -33,3 +33,17 @@ * @run main/othervm -XX:+CompactStrings vm.compiler.optimizations.stringconcat.implicit.Merge01 */ + +/* + * @test id=stringConcatInline + * + * @summary The same test with an updated compile directive that produces + * StringBuilder-backed string concatenations. + * VM Testbase keywords: [jit, quick] + * + * @library /vmTestbase + * /test/lib + * @compile -XDstringConcat=inline ../../Merge01.java + * @run main/othervm -XX:+CompactStrings vm.compiler.optimizations.stringconcat.implicit.Merge01 + */ + diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings_Strings/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings_Strings/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings_Strings/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_InternedStrings_Strings/TestDescription.java 2025-12-18 08:04:02.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 @@ -36,7 +36,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/timeout=480 * -XX:-UseGCOverheadLimit * vm.gc.compact.Compact * -gp interned(randomString) diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree/TestDescription.java 2025-12-18 08:04:02.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 @@ -36,7 +36,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/timeout=480 * -XX:-UseGCOverheadLimit * vm.gc.compact.Compact * -gp nonbranchyTree(high) diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_ArrayOf/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_ArrayOf/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_ArrayOf/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_ArrayOf/TestDescription.java 2025-12-18 08:04:02.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 @@ -36,7 +36,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/timeout=480 * -XX:-UseGCOverheadLimit * vm.gc.compact.Compact * -gp nonbranchyTree(high) diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_TwoFields/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_TwoFields/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_TwoFields/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_NonbranchyTree_TwoFields/TestDescription.java 2025-12-18 08:04:02.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 @@ -36,7 +36,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/timeout=480 * -XX:-UseGCOverheadLimit * vm.gc.compact.Compact * -gp nonbranchyTree(high) diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings/TestDescription.java 2025-12-18 08:04:02.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 @@ -36,7 +36,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/timeout=480 * -XX:-UseGCOverheadLimit * vm.gc.compact.Compact * -gp randomString diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_InternedStrings/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_InternedStrings/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_InternedStrings/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_InternedStrings/TestDescription.java 2025-12-18 08:04:02.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 @@ -36,7 +36,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/timeout=480 * -XX:-UseGCOverheadLimit * vm.gc.compact.Compact * -gp randomString diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_TwoFields/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_TwoFields/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_TwoFields/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Compact_Strings_TwoFields/TestDescription.java 2025-12-18 08:04:02.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 @@ -36,7 +36,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/timeout=480 * -XX:-UseGCOverheadLimit * vm.gc.compact.Compact * -gp randomString diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_NonbranchyTree/TestDescription.java 2025-12-18 08:04:02.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 @@ -36,7 +36,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/timeout=480 * -XX:-UseGCOverheadLimit * vm.gc.compact.Compact * -gp nonbranchyTree(high) diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Strings/TestDescription.java openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Strings/TestDescription.java --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Strings/TestDescription.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/gc/compact/Humongous_Strings/TestDescription.java 2025-12-18 08:04:02.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 @@ -36,7 +36,7 @@ * * @library /vmTestbase * /test/lib - * @run main/othervm + * @run main/othervm/timeout=480 * -XX:-UseGCOverheadLimit * vm.gc.compact.Compact * -gp randomString diff -Nru openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/mlvm/indy/func/jvmti/stepBreakPopReturn/stepBreakPopReturn.cpp openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/mlvm/indy/func/jvmti/stepBreakPopReturn/stepBreakPopReturn.cpp --- openjdk-25-25.0.1+8/test/hotspot/jtreg/vmTestbase/vm/mlvm/indy/func/jvmti/stepBreakPopReturn/stepBreakPopReturn.cpp 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/hotspot/jtreg/vmTestbase/vm/mlvm/indy/func/jvmti/stepBreakPopReturn/stepBreakPopReturn.cpp 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 @@ -89,7 +89,7 @@ gIsMethodEntryWorking = JNI_TRUE; if (!gIsBreakpointSet) - NSK_JVMTI_VERIFY(jvmti_env->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_SINGLE_STEP, nullptr)); + NSK_JVMTI_VERIFY(jvmti_env->SetEventNotificationMode(JVMTI_ENABLE, JVMTI_EVENT_SINGLE_STEP, thread)); } } @@ -116,7 +116,7 @@ free(locStr); } - NSK_JVMTI_VERIFY(gJvmtiEnv->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_SINGLE_STEP, nullptr)); + NSK_JVMTI_VERIFY(gJvmtiEnv->SetEventNotificationMode(JVMTI_DISABLE, JVMTI_EVENT_SINGLE_STEP, thread)); if (!gIsDebuggerCompatible) { if (!NSK_JVMTI_VERIFY(jvmti_env->SetBreakpoint(method, location))) diff -Nru openjdk-25-25.0.1+8/test/jaxp/TEST.ROOT openjdk-25-25.0.2+10/test/jaxp/TEST.ROOT --- openjdk-25-25.0.1+8/test/jaxp/TEST.ROOT 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jaxp/TEST.ROOT 2025-12-18 08:04:02.000000000 +0000 @@ -23,7 +23,7 @@ groups=TEST.groups # Minimum jtreg version -requiredVersion=7.5.1+1 +requiredVersion=8+2 # Path to libraries in the topmost test directory. This is needed so @library # does not need ../../ notation to reach them diff -Nru openjdk-25-25.0.1+8/test/jdk/ProblemList.txt openjdk-25-25.0.2+10/test/jdk/ProblemList.txt --- openjdk-25-25.0.1+8/test/jdk/ProblemList.txt 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/ProblemList.txt 2025-12-18 08:04:02.000000000 +0000 @@ -119,6 +119,7 @@ java/awt/Focus/IconifiedFrameFocusChangeTest/IconifiedFrameFocusChangeTest.java 6849364 generic-all java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusToFrontTest.java 6848406 generic-all java/awt/Focus/AutoRequestFocusTest/AutoRequestFocusSetVisibleTest.java 6848407 generic-all +java/awt/Frame/BogusFocusableWindowState/BogusFocusableWindowState.java 8361521 linux-all java/awt/Frame/MaximizedToMaximized/MaximizedToMaximized.java 8340374 macosx-all java/awt/Frame/MaximizedUndecorated/MaximizedUndecorated.java 8022302 generic-all java/awt/Frame/RestoreToOppositeScreen/RestoreToOppositeScreen.java 8286840 linux-all @@ -260,7 +261,7 @@ java/awt/FullScreen/UninitializedDisplayModeChangeTest/UninitializedDisplayModeChangeTest.java 8273617 macosx-all java/awt/print/PrinterJob/PSQuestionMark.java 7003378 generic-all java/awt/print/PrinterJob/GlyphPositions.java 7003378 generic-all -java/awt/Choice/ChoiceMouseWheelTest/ChoiceMouseWheelTest.java 6849371 macosx-all,linux-all +java/awt/Choice/ChoiceMouseWheelTest/ChoiceMouseWheelTest.java 8366852 generic-all java/awt/Component/GetScreenLocTest/GetScreenLocTest.java 4753654 generic-all java/awt/Component/SetEnabledPerformance/SetEnabledPerformance.java 8165863 macosx-all java/awt/Clipboard/PasteNullToTextComponentsTest.java 8234140 macosx-all,windows-all @@ -455,7 +456,6 @@ java/awt/FileDialog/ModalFocus/FileDialogModalFocusTest.java 8194751 linux-all java/awt/image/VolatileImage/BitmaskVolatileImage.java 8133102 linux-all java/awt/SplashScreen/MultiResolutionSplash/unix/UnixMultiResolutionSplashTest.java 8203004 linux-all -java/awt/ScrollPane/ScrollPositionTest.java 8040070 linux-all java/awt/ScrollPane/ScrollPaneEventType.java 8296516 macosx-all java/awt/Robot/AcceptExtraMouseButtons/AcceptExtraMouseButtons.java 7107528 linux-all,macosx-all java/awt/Mouse/MouseDragEvent/MouseDraggedTest.java 8080676 linux-all @@ -592,8 +592,6 @@ java/net/MulticastSocket/SetOutgoingIf.java 8308807 aix-ppc64 java/net/MulticastSocket/Test.java 7145658,8308807 macosx-all,aix-ppc64 -java/net/Socket/asyncClose/Race.java 8317801 aix-ppc64 - ############################################################################ # jdk_nio @@ -805,7 +803,6 @@ java/awt/Modal/WsDisabledStyle/CloseBlocker/CloseBlocker.java 7187741 linux-all,macosx-all java/awt/xembed/server/TestXEmbedServerJava.java 8001150,8004031 generic-all java/awt/Modal/PrintDialogsTest/PrintDialogsTest.java 8068378 generic-all -java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java 8162380 generic-all java/awt/image/VolatileImage/VolatileImageConfigurationTest.java 8171069 macosx-all,linux-all java/awt/Modal/InvisibleParentTest/InvisibleParentTest.java 8172245 linux-all java/awt/Frame/FrameStateTest/FrameStateTest.java 8203920 macosx-all,linux-all @@ -815,6 +812,7 @@ java/awt/font/TextLayout/TestJustification.java 8250791 macosx-all java/awt/TrayIcon/DragEventSource/DragEventSource.java 8252242 macosx-all java/awt/FileDialog/DefaultFocusOwner/DefaultFocusOwner.java 7187728 macosx-all,linux-all +java/awt/FileDialog/DoubleActionESC.java 8356981 linux-all java/awt/print/PageFormat/Orient.java 8016055 macosx-all java/awt/TextArea/TextAreaCursorTest/HoveringAndDraggingTest.java 8024986 macosx-all,linux-all java/awt/TextComponent/CorrectTextComponentSelectionTest.java 8237220 macosx-all @@ -826,7 +824,6 @@ java/awt/Frame/SizeMinimizedTest.java 8305915 linux-x64 java/awt/PopupMenu/PopupHangTest.java 8340022 windows-all java/awt/Focus/MinimizeNonfocusableWindowTest.java 8024487 windows-all -java/awt/Focus/InactiveFocusRace.java 8023263 linux-all java/awt/List/HandlingKeyEventIfMousePressedTest.java 6848358 macosx-all,windows-all java/awt/List/ListScrollbarCursorTest.java 8066410 generic-all java/awt/Checkbox/CheckboxBoxSizeTest.java 8340870 windows-all @@ -835,3 +832,8 @@ java/awt/dnd/WinMoveFileToShellTest.java 8341665 windows-all java/awt/Menu/MenuVisibilityTest.java 8161110 macosx-all java/awt/Modal/NativeDialogToFrontBackTest.java 7188049 windows-all,linux-all +java/awt/Cursor/CursorDragTest/ListDragCursor.java 7177297 macosx-all + +# Mechanically added: +javax/sound/midi/Soundbanks/ExtraCharInSoundbank.java 8350613 linux-aarch64,linux-x64 +java/net/CookieHandler/B6644726.java 8366103 linux-aarch64,linux-x64,macosx-aarch64,windows-x64 diff -Nru openjdk-25-25.0.1+8/test/jdk/TEST.ROOT openjdk-25-25.0.2+10/test/jdk/TEST.ROOT --- openjdk-25-25.0.1+8/test/jdk/TEST.ROOT 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/TEST.ROOT 2025-12-18 08:04:02.000000000 +0000 @@ -121,7 +121,7 @@ jdk.static # Minimum jtreg version -requiredVersion=7.5.1+1 +requiredVersion=8+2 # Path to libraries in the topmost test directory. This is needed so @library # does not need ../../ notation to reach them diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/jdi/JdbStopInNotificationThreadTest.java openjdk-25-25.0.2+10/test/jdk/com/sun/jdi/JdbStopInNotificationThreadTest.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/jdi/JdbStopInNotificationThreadTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/jdi/JdbStopInNotificationThreadTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 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 @@ -113,9 +113,11 @@ private static final String DEBUGGEE_CLASS = JdbStopInNotificationThreadTestTarg.class.getName(); private static final String PATTERN1_TEMPLATE = "^Breakpoint hit: \"thread=Notification Thread\", " + "JdbStopInNotificationThreadTestTarg\\$1\\.handleNotification\\(\\), line=%LINE_NUMBER.*\\R%LINE_NUMBER\\s+System\\.out\\.println\\(\"Memory usage low!!!\"\\);.*"; + private static final String[] DEBUGGEE_OPTIONS = {"-Xmx256M"}; private JdbStopInNotificationThreadTest() { - super(DEBUGGEE_CLASS); + super(new LaunchOptions(DEBUGGEE_CLASS) + .addDebuggeeOptions(DEBUGGEE_OPTIONS)); } public static void main(String argv[]) { diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/jdi/ThreadMemoryLeakTest.java openjdk-25-25.0.2+10/test/jdk/com/sun/jdi/ThreadMemoryLeakTest.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/jdi/ThreadMemoryLeakTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/jdi/ThreadMemoryLeakTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -28,7 +28,7 @@ * * @comment Don't allow -Xcomp or -Xint as they impact memory useage and number of iterations. * Require compressed oops because not doing so increases memory usage. - * @requires (vm.compMode == "Xmixed") & vm.opt.final.UseCompressedOops + * @requires (vm.compMode == "Xmixed") & (vm.bits == 32 | vm.opt.final.UseCompressedOops) * @run build TestScaffold VMConnection TargetListener TargetAdapter * @run compile -g ThreadMemoryLeakTest.java * @comment run with -Xmx7m so any leak will quickly produce OOME diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/net/httpserver/FileServerHandler.java openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/FileServerHandler.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/net/httpserver/FileServerHandler.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/FileServerHandler.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -43,7 +43,6 @@ this.docroot = docroot; } - int invocation = 1; public void handle (HttpExchange t) throws IOException { @@ -87,16 +86,16 @@ rmap.set ("Content-Type", "text/html"); t.sendResponseHeaders (200, 0); String[] list = f.list(); - OutputStream os = t.getResponseBody(); - PrintStream p = new PrintStream (os); - p.println ("

    Directory listing for: " + path+ "

    "); - p.println ("
      "); - for (int i=0; i"+list[i]+""); + try (final OutputStream os = t.getResponseBody(); + final PrintStream p = new PrintStream (os)) { + p.println("

      Directory listing for: " + path + "

      "); + p.println("
        "); + for (int i = 0; i < list.length; i++) { + p.println("
      • " + list[i] + "
      • "); + } + p.println("


      "); + p.flush(); } - p.println ("


    "); - p.flush(); - p.close(); } else { int clen; if (fixedrequest != null) { @@ -105,10 +104,9 @@ clen = 0; } t.sendResponseHeaders (200, clen); - OutputStream os = t.getResponseBody(); - FileInputStream fis = new FileInputStream (f); int count = 0; - try { + try (final OutputStream os = t.getResponseBody(); + final FileInputStream fis = new FileInputStream (f)) { byte[] buf = new byte [16 * 1024]; int len; while ((len=fis.read (buf)) != -1) { @@ -118,8 +116,6 @@ } catch (IOException e) { e.printStackTrace(); } - fis.close(); - os.close(); } } diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/net/httpserver/Test12.java openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test12.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/net/httpserver/Test12.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/net/httpserver/Test12.java 2025-12-18 08:04:02.000000000 +0000 @@ -21,23 +21,12 @@ * questions. */ -/* - * @test - * @bug 6270015 - * @library /test/lib - * @build jdk.test.lib.Asserts - * jdk.test.lib.Utils - * jdk.test.lib.net.SimpleSSLContext - * jdk.test.lib.net.URIBuilder - * @run main/othervm Test12 - * @run main/othervm -Djava.net.preferIPv6Addresses=true Test12 - * @summary Light weight HTTP server - */ - import com.sun.net.httpserver.*; import java.nio.file.Files; import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; import java.util.concurrent.*; import java.io.*; import java.net.*; @@ -49,11 +38,19 @@ import static jdk.test.lib.Asserts.assertFileContentsEqual; import static jdk.test.lib.Utils.createTempFileOfSize; -/* basic http/s connectivity test - * Tests: - * - same as Test1, but in parallel +/* + * @test + * @bug 6270015 8359477 + * @summary Light weight HTTP server - basic http/s connectivity test, same as Test1, + * but in parallel + * @library /test/lib + * @build jdk.test.lib.Asserts + * jdk.test.lib.Utils + * jdk.test.lib.net.SimpleSSLContext + * jdk.test.lib.net.URIBuilder + * @run main/othervm Test12 + * @run main/othervm -Djava.net.preferIPv6Addresses=true Test12 */ - public class Test12 extends Test { private static final String TEMP_FILE_PREFIX = @@ -61,14 +58,12 @@ static SSLContext ctx; - static boolean fail = false; - public static void main (String[] args) throws Exception { HttpServer s1 = null; HttpsServer s2 = null; - ExecutorService executor=null; Path smallFilePath = createTempFileOfSize(TEMP_FILE_PREFIX, null, 23); Path largeFilePath = createTempFileOfSize(TEMP_FILE_PREFIX, null, 2730088); + final ExecutorService executor = Executors.newCachedThreadPool(); try { System.out.print ("Test12: "); InetAddress loopback = InetAddress.getLoopbackAddress(); @@ -80,7 +75,6 @@ HttpHandler h = new FileServerHandler(smallFilePath.getParent().toString()); HttpContext c1 = s1.createContext ("/", h); HttpContext c2 = s2.createContext ("/", h); - executor = Executors.newCachedThreadPool(); s1.setExecutor (executor); s2.setExecutor (executor); ctx = new SimpleSSLContext().get(); @@ -90,7 +84,7 @@ int port = s1.getAddress().getPort(); int httpsport = s2.getAddress().getPort(); - Runner r[] = new Runner[8]; + final Runner[] r = new Runner[8]; r[0] = new Runner (true, "http", port, smallFilePath); r[1] = new Runner (true, "http", port, largeFilePath); r[2] = new Runner (true, "https", httpsport, smallFilePath); @@ -99,95 +93,83 @@ r[5] = new Runner (false, "http", port, largeFilePath); r[6] = new Runner (false, "https", httpsport, smallFilePath); r[7] = new Runner (false, "https", httpsport, largeFilePath); - start (r); - join (r); - System.out.println ("OK"); + // submit the tasks + final List> futures = new ArrayList<>(); + for (Runner runner : r) { + futures.add(executor.submit(runner)); + } + // wait for the tasks' completion + for (Future f : futures) { + f.get(); + } + System.out.println ("All " + futures.size() + " tasks completed successfully"); } finally { - if (s1 != null) + if (s1 != null) { s1.stop(0); - if (s2 != null) + } + if (s2 != null) { s2.stop(0); - if (executor != null) - executor.shutdown (); + } + executor.close(); + // it's OK to delete these files since the server side handlers + // serving these files have completed (guaranteed by the completion of Executor.close()) + System.out.println("deleting " + smallFilePath); Files.delete(smallFilePath); + System.out.println("deleting " + largeFilePath); Files.delete(largeFilePath); } } - static void start (Runner[] x) { - for (int i=0; i { boolean fixedLen; String protocol; int port; private final Path filePath; - Runner (boolean fixedLen, String protocol, int port, Path filePath) { + Runner(boolean fixedLen, String protocol, int port, Path filePath) { this.fixedLen=fixedLen; this.protocol=protocol; this.port=port; this.filePath = filePath; } - public void run () { - try { - URL url = URIBuilder.newBuilder() - .scheme(protocol) - .loopback() - .port(port) - .path("/" + filePath.getFileName()) - .toURL(); - HttpURLConnection urlc = (HttpURLConnection) url.openConnection(Proxy.NO_PROXY); - if (urlc instanceof HttpsURLConnection) { - HttpsURLConnection urlcs = (HttpsURLConnection) urlc; - urlcs.setHostnameVerifier (new HostnameVerifier () { - public boolean verify (String s, SSLSession s1) { - return true; - } - }); - urlcs.setSSLSocketFactory (ctx.getSocketFactory()); - } - byte [] buf = new byte [4096]; - - if (fixedLen) { - urlc.setRequestProperty ("XFixed", "yes"); - } - InputStream is = urlc.getInputStream(); - File temp = File.createTempFile ("Test1", null); - temp.deleteOnExit(); - OutputStream fout = new BufferedOutputStream (new FileOutputStream(temp)); - int c, count = 0; - while ((c=is.read(buf)) != -1) { - count += c; - fout.write (buf, 0, c); - } - is.close(); - fout.close(); - - if (count != filePath.toFile().length()) { - throw new RuntimeException ("wrong amount of data returned"); - } - assertFileContentsEqual(filePath, temp.toPath()); - temp.delete(); - } catch (Exception e) { - e.printStackTrace(); - fail = true; + @Override + public Void call() throws Exception { + final URL url = URIBuilder.newBuilder() + .scheme(protocol) + .loopback() + .port(port) + .path("/" + filePath.getFileName()) + .toURL(); + final HttpURLConnection urlc = (HttpURLConnection) url.openConnection(Proxy.NO_PROXY); + if (urlc instanceof HttpsURLConnection) { + HttpsURLConnection urlcs = (HttpsURLConnection) urlc; + urlcs.setHostnameVerifier (new HostnameVerifier () { + public boolean verify (String s, SSLSession s1) { + return true; + } + }); + urlcs.setSSLSocketFactory (ctx.getSocketFactory()); } + if (fixedLen) { + urlc.setRequestProperty ("XFixed", "yes"); + } + final Path temp = Files.createTempFile(Path.of("."), "Test12", null); + final long numReceived; + try (InputStream is = urlc.getInputStream(); + OutputStream fout = new BufferedOutputStream(new FileOutputStream(temp.toFile()))) { + numReceived = is.transferTo(fout); + } + System.out.println("received " + numReceived + " response bytes for " + url); + final long expected = filePath.toFile().length(); + if (numReceived != expected) { + throw new RuntimeException ("expected " + expected + " bytes, but received " + + numReceived); + } + assertFileContentsEqual(filePath, temp); + Files.delete(temp); + return null; } } - } diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/Bind.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Bind.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/Bind.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Bind.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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,6 +23,7 @@ /* @test * @bug 4927640 + * @library /test/lib * @summary Tests the SCTP protocol implementation * @author chegar */ @@ -48,18 +49,14 @@ import com.sun.nio.sctp.ShutdownNotification; import static java.lang.System.out; +import jtreg.SkippedException; + /** * Tests bind, bindAddress, unbindAddress, getLocalAddress, and * getAllLocalAddresses. */ public class Bind { void test(String[] args) { - if (!Util.isSCTPSupported()) { - out.println("SCTP protocol is not supported"); - out.println("Test cannot be run"); - return; - } - /* Simply bind tests */ testBind(); @@ -341,6 +338,10 @@ void check(boolean cond, String failMessage) {if (cond) pass(); else fail(failMessage);} void debug(String message) {if(debug) { System.out.println(message); } } public static void main(String[] args) throws Throwable { + if (!Util.isSCTPSupported()) { + throw new SkippedException("SCTP protocol is not supported"); + } + Class k = new Object(){}.getClass().getEnclosingClass(); try {k.getMethod("instanceMain",String[].class) .invoke( k.newInstance(), (Object) args);} diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/CloseDescriptors.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/CloseDescriptors.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/CloseDescriptors.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/CloseDescriptors.java 2025-12-18 08:04:02.000000000 +0000 @@ -24,6 +24,7 @@ /* * @test * @bug 8238274 + * @key intermittent * @summary Potential leak file descriptor for SCTP * @requires (os.family == "linux") * @library /test/lib @@ -45,6 +46,8 @@ import com.sun.nio.sctp.SctpChannel; import com.sun.nio.sctp.SctpServerChannel; +import jtreg.SkippedException; + public class CloseDescriptors { private static Selector selector; private static final int LOOP = 10; @@ -54,7 +57,7 @@ public static void main(String[] args) throws Exception { if (!Util.isSCTPSupported()) { - throw new jtreg.SkippedException("SCTP protocol is not supported"); + throw new SkippedException("SCTP protocol is not supported"); } List lsofDirs = List.of("/usr/bin", "/usr/sbin"); @@ -63,7 +66,7 @@ .filter(f -> Files.isExecutable(f)) .findFirst(); if (!lsof.isPresent()) { - throw new jtreg.SkippedException("Cannot locate lsof in " + lsofDirs); + throw new SkippedException("Cannot locate lsof in " + lsofDirs); } try (ServerSocket ss = new ServerSocket(0)) { diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/CommUp.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/CommUp.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/CommUp.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/CommUp.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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,6 +23,7 @@ /* @test * @bug 6863110 + * @library /test/lib * @summary Newly connected/accepted SctpChannel should fire OP_READ if registered with a Selector * @author chegar */ @@ -49,6 +50,8 @@ import static java.nio.channels.SelectionKey.OP_CONNECT; import static java.nio.channels.SelectionKey.OP_READ; +import jtreg.SkippedException; + public class CommUp { static CountDownLatch acceptLatch = new CountDownLatch(1); static final int TIMEOUT = 10000; @@ -61,12 +64,6 @@ void test(String[] args) { SocketAddress address = null; - if (!Util.isSCTPSupported()) { - out.println("SCTP protocol is not supported"); - out.println("Test cannot be run"); - return; - } - if (args.length == 2) { /* requested to connecct to a specific address */ try { @@ -355,6 +352,10 @@ void sleep(long millis) { try { Thread.currentThread().sleep(millis); } catch(InterruptedException ie) { unexpected(ie); }} public static void main(String[] args) throws Throwable { + if (!Util.isSCTPSupported()) { + throw new SkippedException("SCTP protocol is not supported"); + } + Class k = new Object(){}.getClass().getEnclosingClass(); try {k.getMethod("instanceMain",String[].class) .invoke( k.newInstance(), (Object) args);} diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/Connect.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Connect.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/Connect.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Connect.java 2025-12-18 08:04:02.000000000 +0000 @@ -23,6 +23,7 @@ /* @test * @bug 4927640 + * @library /test/lib * @summary Tests the SCTP protocol implementation * @author chegar */ @@ -43,6 +44,8 @@ import static java.lang.System.out; import static java.lang.System.err; +import jtreg.SkippedException; + /** * Tests connect, finishConnect, isConnectionPending, * getRemoteAddresses and association. @@ -50,12 +53,6 @@ public class Connect { void test(String[] args) { - if (!Util.isSCTPSupported()) { - out.println("SCTP protocol is not supported"); - out.println("Test cannot be run"); - return; - } - doTest(); } @@ -235,6 +232,10 @@ void check(boolean cond, String failMessage) {if (cond) pass(); else fail(failMessage);} void debug(String message) {if(debug) { System.out.println(message); } } public static void main(String[] args) throws Throwable { + if (!Util.isSCTPSupported()) { + throw new SkippedException("SCTP protocol is not supported"); + } + Class k = new Object(){}.getClass().getEnclosingClass(); try {k.getMethod("instanceMain",String[].class) .invoke( k.newInstance(), (Object) args);} diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/Receive.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Receive.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/Receive.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Receive.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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,6 +23,7 @@ /* @test * @bug 4927640 + * @library /test/lib * @summary Tests the SCTP protocol implementation * @author chegar */ @@ -48,6 +49,8 @@ import static java.lang.System.out; import static java.lang.System.err; +import jtreg.SkippedException; + public class Receive { /* Latches used to synchronize between the client and server so that * connections without any IO may not be closed without being accepted */ @@ -61,13 +64,6 @@ SocketAddress address = null; Server server; - - if (!Util.isSCTPSupported()) { - out.println("SCTP protocol is not supported"); - out.println("Test cannot be run"); - return; - } - if (args.length == 2) { /* requested to connecct to a specific address */ try { @@ -349,6 +345,10 @@ void debug(String message) {if(debug) { System.out.println(Thread.currentThread() + " " + message); } } public static void main(String[] args) throws Throwable { + if (!Util.isSCTPSupported()) { + throw new SkippedException("SCTP protocol is not supported"); + } + Class k = new Object(){}.getClass().getEnclosingClass(); try {k.getMethod("instanceMain",String[].class) .invoke( k.newInstance(), (Object) args);} diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/ReceiveIntoDirect.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/ReceiveIntoDirect.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/ReceiveIntoDirect.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/ReceiveIntoDirect.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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,6 +23,7 @@ /* @test * @bug 8034181 + * @library /test/lib * @summary SIGBUS in SctpChannelImpl receive * @author chegar */ @@ -45,6 +46,8 @@ import static java.lang.System.err; import static java.nio.charset.StandardCharsets.US_ASCII; +import jtreg.SkippedException; + public class ReceiveIntoDirect { /* suitably small message to NOT overrun small buffers */ final byte[] msgBytes = "Hello".getBytes(US_ASCII); @@ -56,12 +59,6 @@ SocketAddress address = null; Server server; - if (!Util.isSCTPSupported()) { - out.println("SCTP protocol is not supported"); - out.println("Test cannot be run"); - return; - } - if (args.length == 2) { /* requested to connecct to a specific address */ try { @@ -264,6 +261,10 @@ void debug(String message) {if(debug) { System.out.println(Thread.currentThread() + " " + message); } } public static void main(String[] args) throws Throwable { + if (!Util.isSCTPSupported()) { + throw new SkippedException("SCTP protocol is not supported"); + } + Class k = new Object(){}.getClass().getEnclosingClass(); try {k.getMethod("instanceMain",String[].class) .invoke( k.newInstance(), (Object) args);} diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/Send.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Send.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/Send.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Send.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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,6 +23,7 @@ /* @test * @bug 4927640 + * @library /test/lib * @summary Tests the SCTP protocol implementation * @author chegar */ @@ -48,6 +49,8 @@ import static java.lang.System.out; import static java.lang.System.err; +import jtreg.SkippedException; + public class Send { /* Latches used to synchronize between the client and server so that * connections without any IO may not be closed without being accepted */ @@ -60,12 +63,6 @@ SocketAddress address = null; Server server = null; - if (!Util.isSCTPSupported()) { - out.println("SCTP protocol is not supported"); - out.println("Test cannot be run"); - return; - } - if (args.length == 2) { /* requested to connecct to a specific address */ try { @@ -451,6 +448,10 @@ void check(boolean cond, String failMessage) {if (cond) pass(); else fail(failMessage);} void debug(String message) {if(debug) { System.out.println(message); } } public static void main(String[] args) throws Throwable { + if (!Util.isSCTPSupported()) { + throw new SkippedException("SCTP protocol is not supported"); + } + Class k = new Object(){}.getClass().getEnclosingClass(); try {k.getMethod("instanceMain",String[].class) .invoke( k.newInstance(), (Object) args);} diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/Shutdown.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Shutdown.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/Shutdown.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/Shutdown.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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,6 +23,7 @@ /* @test * @bug 4927640 + * @library /test/lib * @summary Tests the SCTP protocol implementation * @author chegar */ @@ -43,6 +44,8 @@ import static java.lang.System.out; import static java.lang.System.err; +import jtreg.SkippedException; + public class Shutdown { static CountDownLatch finishedLatch = new CountDownLatch(1); static CountDownLatch sentLatch = new CountDownLatch(1); @@ -51,12 +54,6 @@ SocketAddress address = null; ShutdownServer server = null; - if (!Util.isSCTPSupported()) { - out.println("SCTP protocol is not supported"); - out.println("Test cannot be run"); - return; - } - if (args.length == 2) { /* requested to connecct to a specific address */ try { @@ -272,6 +269,10 @@ void check(boolean cond, String failMessage) {if (cond) pass(); else fail(failMessage);} void debug(String message) {if(debug) { System.out.println(message); } } public static void main(String[] args) throws Throwable { + if (!Util.isSCTPSupported()) { + throw new SkippedException("SCTP protocol is not supported"); + } + Class k = new Object(){}.getClass().getEnclosingClass(); try {k.getMethod("instanceMain",String[].class) .invoke( k.newInstance(), (Object) args);} diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpChannel/SocketOptionTests.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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,6 +23,7 @@ /* @test * @bug 4927640 + * @library /test/lib * @summary Tests the SCTP protocol implementation * @author chegar */ @@ -43,6 +44,8 @@ import static com.sun.nio.sctp.SctpStandardSocketOptions.*; import static java.lang.System.out; +import jtreg.SkippedException; + public class SocketOptionTests { final String osName = AccessController.doPrivileged( (PrivilegedAction)() -> System.getProperty("os.name")); @@ -66,12 +69,6 @@ } void test(String[] args) { - if (!Util.isSCTPSupported()) { - out.println("SCTP protocol is not supported"); - out.println("Test cannot be run"); - return; - } - try (SctpChannel sc = SctpChannel.open()) { /* check supported options */ @@ -190,6 +187,10 @@ void check(boolean cond, String failMessage) {if (cond) pass(); else fail(failMessage);} void debug(String message) {if(debug) { System.out.println(message); } } public static void main(String[] args) throws Throwable { + if (!Util.isSCTPSupported()) { + throw new SkippedException("SCTP protocol is not supported"); + } + Class k = new Object(){}.getClass().getEnclosingClass(); try {k.getMethod("instanceMain",String[].class) .invoke( k.newInstance(), (Object) args);} diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Branch.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Branch.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Branch.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Branch.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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,6 +23,7 @@ /* @test * @bug 4927640 + * @library /test/lib * @summary Tests the SCTP protocol implementation * @author chegar */ @@ -48,6 +49,8 @@ import static java.lang.System.out; import static java.lang.System.err; +import jtreg.SkippedException; + public class Branch { /* Latches used to synchronize between the client and server so that * connections without any IO may not be closed without being accepted */ @@ -58,12 +61,6 @@ SocketAddress address = null; Server server = null; - if (!Util.isSCTPSupported()) { - out.println("SCTP protocol is not supported"); - out.println("Test cannot be run"); - return; - } - if (args.length == 2) { /* requested to connecct to a specific address */ try { @@ -277,6 +274,10 @@ void check(boolean cond, String failMessage) {if (cond) pass(); else fail(failMessage);} void debug(String message) {if(debug) { System.out.println(message); } } public static void main(String[] args) throws Throwable { + if (!Util.isSCTPSupported()) { + throw new SkippedException("SCTP protocol is not supported"); + } + Class k = new Object(){}.getClass().getEnclosingClass(); try {k.getMethod("instanceMain",String[].class) .invoke( k.newInstance(), (Object) args);} diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpMultiChannel/CloseDescriptors.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/CloseDescriptors.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpMultiChannel/CloseDescriptors.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/CloseDescriptors.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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,6 +23,7 @@ /* @test * @bug 8269481 + * @library /test/lib * @summary Tests that file descriptors are closed * @requires (os.family == "linux") * @run main/othervm CloseDescriptors @@ -38,6 +39,8 @@ import com.sun.nio.sctp.MessageInfo; import com.sun.nio.sctp.SctpMultiChannel; +import jtreg.SkippedException; + public class CloseDescriptors { private static final int NUM = 5; @@ -46,9 +49,7 @@ public static void main(String[] args) throws Exception { if (!Util.isSCTPSupported()) { - System.out.println("SCTP protocol is not supported"); - System.out.println("Test cannot be run"); - return; + throw new SkippedException("SCTP protocol is not supported"); } List lsofDirs = List.of("/usr/bin", "/usr/sbin"); @@ -57,9 +58,7 @@ .filter(f -> Files.isExecutable(f)) .findFirst(); if (!lsof.isPresent()) { - System.out.println("Cannot locate lsof in " + lsofDirs); - System.out.println("Test cannot be run"); - return; + throw new SkippedException("Cannot locate lsof in " + lsofDirs); } try (ServerSocket ss = new ServerSocket(0)) { diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Send.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Send.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Send.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/Send.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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,6 +23,7 @@ /* @test * @bug 4927640 + * @library /test/lib * @summary Tests the SCTP protocol implementation * @author chegar */ @@ -42,6 +43,8 @@ import static java.lang.System.out; import static java.lang.System.err; +import jtreg.SkippedException; + public class Send { /* Latches used to synchronize between the client and server so that * connections without any IO may not be closed without being accepted */ @@ -52,12 +55,6 @@ SocketAddress address = null; Server server = null; - if (!Util.isSCTPSupported()) { - out.println("SCTP protocol is not supported"); - out.println("Test cannot be run"); - return; - } - if (args.length == 2) { /* requested to connecct to a specific address */ try { @@ -355,6 +352,10 @@ void check(boolean cond, String failMessage) {if (cond) pass(); else fail(failMessage);} void debug(String message) {if(debug) { System.out.println(message); } } public static void main(String[] args) throws Throwable { + if (!Util.isSCTPSupported()) { + throw new SkippedException("SCTP protocol is not supported"); + } + Class k = new Object(){}.getClass().getEnclosingClass(); try {k.getMethod("instanceMain",String[].class) .invoke( k.newInstance(), (Object) args);} diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SendFailed.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SendFailed.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SendFailed.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SendFailed.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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,6 +23,7 @@ /* @test * @bug 8067846 + * @library /test/lib * @summary Test for send failed notification */ @@ -35,6 +36,8 @@ import static java.lang.System.out; import static java.nio.ByteBuffer.*; +import jtreg.SkippedException; + public class SendFailed { static final SocketAddress remoteAddress = new InetSocketAddress(InetAddress.getLoopbackAddress(), 3000); @@ -45,12 +48,6 @@ void test(String[] args) throws IOException { SocketAddress address = null; - if (!Util.isSCTPSupported()) { - out.println("SCTP protocol is not supported"); - out.println("Test cannot be run"); - return; - } - System.out.println("remote address: " + remoteAddress); System.out.println("Note, remote address should not be up"); @@ -186,6 +183,10 @@ void check(boolean cond, String failMessage) {if (cond) pass(); else fail(failMessage);} void debug(String message, Object... args) {if(debug) { out.printf(message, args); } } public static void main(String[] args) throws Throwable { + if (!Util.isSCTPSupported()) { + throw new SkippedException("SCTP protocol is not supported"); + } + Class k = new Object(){}.getClass().getEnclosingClass(); try {k.getMethod("instanceMain",String[].class) .invoke( k.newInstance(), (Object) args);} diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpMultiChannel/SocketOptionTests.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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,6 +23,7 @@ /* @test * @bug 4927640 + * @library /test/lib * @summary Tests the SCTP protocol implementation * @author chegar */ @@ -51,6 +52,8 @@ import static com.sun.nio.sctp.SctpStandardSocketOptions.*; import static java.lang.System.out; +import jtreg.SkippedException; + public class SocketOptionTests { final String osName = AccessController.doPrivileged( (PrivilegedAction)() -> System.getProperty("os.name")); @@ -74,12 +77,6 @@ } void test(String[] args) { - if (!Util.isSCTPSupported()) { - out.println("SCTP protocol is not supported"); - out.println("Test cannot be run"); - return; - } - try { SctpMultiChannel smc = SctpMultiChannel.open(); @@ -244,6 +241,10 @@ void check(boolean cond, String failMessage) {if (cond) pass(); else fail(failMessage);} void debug(String message) {if(debug) { System.out.println(message); } } public static void main(String[] args) throws Throwable { + if (!Util.isSCTPSupported()) { + throw new SkippedException("SCTP protocol is not supported"); + } + Class k = new Object(){}.getClass().getEnclosingClass(); try {k.getMethod("instanceMain",String[].class) .invoke( k.newInstance(), (Object) args);} diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpServerChannel/Accept.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpServerChannel/Accept.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpServerChannel/Accept.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpServerChannel/Accept.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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,6 +23,7 @@ /* @test * @bug 4927640 + * @library /test/lib * @summary Tests the SCTP protocol implementation * @author chegar */ @@ -41,6 +42,8 @@ import static java.lang.System.out; import static java.lang.System.err; +import jtreg.SkippedException; + public class Accept { static CountDownLatch acceptLatch = new CountDownLatch(1); static CountDownLatch closeByIntLatch = new CountDownLatch(1); @@ -50,12 +53,6 @@ void test(String[] args) { SocketAddress address = null; - if (!Util.isSCTPSupported()) { - out.println("SCTP protocol is not supported"); - out.println("Test cannot be run"); - return; - } - if (args.length == 2) { /* requested to connecct to a specific address */ try { @@ -262,6 +259,10 @@ void join(Thread thread, long millis) { try { thread.join(millis); } catch(InterruptedException ie) { unexpected(ie); }} public static void main(String[] args) throws Throwable { + if (!Util.isSCTPSupported()) { + throw new SkippedException("SCTP protocol is not supported"); + } + Class k = new Object(){}.getClass().getEnclosingClass(); try {k.getMethod("instanceMain",String[].class) .invoke( k.newInstance(), (Object) args);} diff -Nru openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpServerChannel/NonBlockingAccept.java openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpServerChannel/NonBlockingAccept.java --- openjdk-25-25.0.1+8/test/jdk/com/sun/nio/sctp/SctpServerChannel/NonBlockingAccept.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/com/sun/nio/sctp/SctpServerChannel/NonBlockingAccept.java 2025-12-18 08:04:02.000000000 +0000 @@ -23,6 +23,7 @@ /* @test * @bug 4927640 + * @library /test/lib * @summary Tests the SCTP protocol implementation * @author chegar */ @@ -42,6 +43,8 @@ import static java.lang.System.out; import static java.lang.System.err; +import jtreg.SkippedException; + public class NonBlockingAccept { static CountDownLatch acceptLatch = new CountDownLatch(1); static final int SEL_TIMEOUT = 10000; @@ -51,12 +54,6 @@ SocketAddress address = null; NonblockingServer server; - if (!Util.isSCTPSupported()) { - out.println("SCTP protocol is not supported"); - out.println("Test cannot be run"); - return; - } - if (args.length == 2) { /* requested to connecct to a specific address */ try { @@ -218,6 +215,10 @@ void sleep(long millis) { try { Thread.currentThread().sleep(millis); } catch(InterruptedException ie) { unexpected(ie); }} public static void main(String[] args) throws Throwable { + if (!Util.isSCTPSupported()) { + throw new SkippedException("SCTP protocol is not supported"); + } + Class k = new Object(){}.getClass().getEnclosingClass(); try {k.getMethod("instanceMain",String[].class) .invoke( k.newInstance(), (Object) args);} diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/Cursor/CursorDragTest/ListDragCursor.java openjdk-25-25.0.2+10/test/jdk/java/awt/Cursor/CursorDragTest/ListDragCursor.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/Cursor/CursorDragTest/ListDragCursor.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/Cursor/CursorDragTest/ListDragCursor.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2024, 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 @@ -25,42 +25,60 @@ * @test * @bug 4313052 * @summary Test cursor changes after mouse dragging ends - * @library /java/awt/regtesthelpers - * @build PassFailJFrame * @run main/manual ListDragCursor */ +import java.awt.BorderLayout; +import java.awt.Button; import java.awt.Cursor; +import java.awt.EventQueue; import java.awt.Frame; import java.awt.List; import java.awt.Panel; import java.awt.TextArea; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; public class ListDragCursor { - public static void main(String[] args) throws Exception { - String INSTRUCTIONS = """ + private static final String INSTRUCTIONS = """ 1. Move mouse to the TextArea. 2. Press the left mouse button. 3. Drag mouse to the list. 4. Release the left mouse button. - If the mouse cursor starts as a Text Line Cursor and changes - to a regular Pointer Cursor, then Hand Cursor when hovering - the list, pass the test. This test fails if the cursor does - not update at all when pointing over the different components. + The mouse cursor should appear as an I-beam cursor + and should stay the same while dragging across the + components. Once you reach the list, release the + left mouse button. As soon as you release the left + mouse button, the cursor should change to a Hand + cursor. If true, this test passes. + + The test fails if the cursor updates while dragging + over the components before releasing the left + mouse button. """; - PassFailJFrame.builder() - .title("Test Instructions") - .instructions(INSTRUCTIONS) - .rows((int) INSTRUCTIONS.lines().count() + 2) - .columns(35) - .testUI(ListDragCursor::createUI) - .build() - .awaitAndCheck(); + private static Frame testFrame; + private static Frame instructionsFrame; + + private static final CountDownLatch countDownLatch = new CountDownLatch(1); + + public static void main(String[] args) throws Exception { + try { + EventQueue.invokeAndWait(() -> { + instructionsFrame = createInstructionsFrame(); + testFrame = createTestFrame(); + }); + if (!countDownLatch.await(5, TimeUnit.MINUTES)) { + throw new RuntimeException("Test timeout : No action was" + + " taken on the test."); + } + } finally { + EventQueue.invokeAndWait(ListDragCursor::disposeFrames); + } } - public static Frame createUI() { + static Frame createTestFrame() { Frame frame = new Frame("Cursor change after drag"); Panel panel = new Panel(); @@ -78,7 +96,51 @@ panel.add(list); frame.add(panel); - frame.setBounds(300, 100, 300, 150); + frame.setSize(300, 150); + frame.setLocation(instructionsFrame.getX() + + instructionsFrame.getWidth(), + instructionsFrame.getY()); + frame.setVisible(true); return frame; } + + static Frame createInstructionsFrame() { + Frame frame = new Frame("Test Instructions"); + Panel mainPanel = new Panel(new BorderLayout()); + TextArea textArea = new TextArea(INSTRUCTIONS, + 15, 35, TextArea.SCROLLBARS_NONE); + + Panel btnPanel = new Panel(); + Button passBtn = new Button("Pass"); + Button failBtn = new Button("Fail"); + btnPanel.add(passBtn); + btnPanel.add(failBtn); + + passBtn.addActionListener(e -> { + countDownLatch.countDown(); + System.out.println("Test passed."); + }); + failBtn.addActionListener(e -> { + countDownLatch.countDown(); + throw new RuntimeException("Test Failed."); + }); + + mainPanel.add(textArea, BorderLayout.CENTER); + mainPanel.add(btnPanel, BorderLayout.SOUTH); + + frame.add(mainPanel); + frame.pack(); + frame.setLocationRelativeTo(null); + frame.setVisible(true); + return frame; + } + + static void disposeFrames() { + if (testFrame != null) { + testFrame.dispose(); + } + if (instructionsFrame != null) { + instructionsFrame.dispose(); + } + } } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/Desktop/BrowseTest.java openjdk-25-25.0.2+10/test/jdk/java/awt/Desktop/BrowseTest.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/Desktop/BrowseTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/Desktop/BrowseTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -40,10 +40,27 @@ public class BrowseTest extends JPanel { static final String INSTRUCTIONS = """ - This test could launch default file manager to open user's home - directory, and default web browser to show the URL of java vendor. - After test execution close the native file manager and web browser + Set your default browser as per the test platform. + macOS - Safari + windows - MS Edge + linux - Firefox + + This test checks 2 cases: + + 1) Directory URI: + On macOS and windows, verify that a browser window opens and + EITHER the browser OR native file manager shows the user's + home directory. + + On Linux verify that the user's home directory is shown by the + default file manager. + + 2) Web URI: + Verify that the Web URI (URL of java vendor) opens in the browser. + + After test execution close the native file manager and any web browser windows if they were launched by test. + Also check output for any unexpected EXCEPTIONS, if you see any failure messages press Fail otherwise press Pass. """; @@ -53,7 +70,7 @@ URI dirURI = new File(System.getProperty("user.home")).toURI(); URI webURI = URI.create(System.getProperty("java.vendor.url", "http://www.java.com")); - boolean failed = false; + PassFailJFrame.log("Testing 1st case: Directory URI ..."); try { PassFailJFrame.log("Try to browse " + dirURI + " ..."); desktop.browse(dirURI); @@ -62,6 +79,7 @@ PassFailJFrame.log("EXCEPTION: " + e.getMessage()); } + PassFailJFrame.log("Testing 2nd case: Web URI ..."); try { PassFailJFrame.log("Try to browse " + webURI + " ..."); desktop.browse(webURI); diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java openjdk-25-25.0.2+10/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/Desktop/EditAndPrintTest/EditAndPrintTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -48,7 +48,7 @@ This test tries to edit and print a directory, which will expectedly raise IOException. Then this test would edit and print a .txt file, which should be successful. After test execution close the editor if it was launched by test. - If you see any EXCEPTION messages in the output press FAIL. + If you see any EXCEPTION messages in case of .txt file in the output press FAIL. """; static Desktop desktop; diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/FileDialog/DoubleActionESC.java openjdk-25-25.0.2+10/test/jdk/java/awt/FileDialog/DoubleActionESC.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/FileDialog/DoubleActionESC.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/FileDialog/DoubleActionESC.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -34,12 +34,15 @@ import java.awt.event.KeyEvent; import java.util.concurrent.CountDownLatch; +import static java.util.concurrent.TimeUnit.SECONDS; + /* * @test * @bug 5097243 * @summary Tests that FileDialog can be closed by ESC any time * @key headful * @run main DoubleActionESC + * @run main/othervm -Dsun.awt.disableGtkFileDialogs=true DoubleActionESC */ public class DoubleActionESC { @@ -49,47 +52,48 @@ private static Robot robot; private static volatile Point p; private static volatile Dimension d; - private static volatile CountDownLatch latch; private static final int REPEAT_COUNT = 2; + private static final long LATCH_TIMEOUT = 10; - public static void main(String[] args) throws Exception { - latch = new CountDownLatch(1); + private static final CountDownLatch latch = new CountDownLatch(REPEAT_COUNT); + public static void main(String[] args) throws Exception { robot = new Robot(); - robot.setAutoDelay(100); + robot.setAutoDelay(50); try { EventQueue.invokeAndWait(() -> { createAndShowUI(); }); + robot.waitForIdle(); robot.delay(1000); + EventQueue.invokeAndWait(() -> { p = showBtn.getLocationOnScreen(); d = showBtn.getSize(); }); for (int i = 0; i < REPEAT_COUNT; ++i) { - Thread thread = new Thread(() -> { - robot.mouseMove(p.x + d.width / 2, p.y + d.height / 2); - robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); - robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); - }); - thread.start(); - robot.delay(3000); - - Thread thread1 = new Thread(() -> { - robot.keyPress(KeyEvent.VK_ESCAPE); - robot.keyRelease(KeyEvent.VK_ESCAPE); - robot.waitForIdle(); - }); - thread1.start(); - robot.delay(3000); + robot.mouseMove(p.x + d.width / 2, p.y + d.height / 2); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + robot.waitForIdle(); + robot.delay(1000); + + robot.keyPress(KeyEvent.VK_ESCAPE); + robot.keyRelease(KeyEvent.VK_ESCAPE); + robot.waitForIdle(); + robot.delay(1000); } - latch.await(); - if (fd.isVisible()) { - throw new RuntimeException("File Dialog is not closed"); + if (!latch.await(LATCH_TIMEOUT, SECONDS)) { + throw new RuntimeException("Test failed: Latch timeout reached"); } + EventQueue.invokeAndWait(() -> { + if (fd.isVisible()) { + throw new RuntimeException("File Dialog is not closed"); + } + }); } finally { EventQueue.invokeAndWait(() -> { if (f != null) { diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/Focus/ComponentLostFocusTest.java openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/ComponentLostFocusTest.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/Focus/ComponentLostFocusTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/ComponentLostFocusTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2024, 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 @@ -35,13 +35,20 @@ import java.awt.Frame; import java.awt.KeyboardFocusManager; import java.awt.Point; +import java.awt.Rectangle; import java.awt.Robot; import java.awt.TextField; +import java.awt.Toolkit; import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; import java.awt.event.InputEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; +import java.io.File; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +import javax.imageio.ImageIO; public class ComponentLostFocusTest { @@ -49,10 +56,10 @@ static TextField tf; static Robot r; static Dialog dialog = null; - static volatile boolean passed; static volatile Point loc; static volatile int width; static volatile int top; + static final CountDownLatch focusGainedLatch = new CountDownLatch(1); private static void createTestUI() { @@ -75,11 +82,7 @@ public static void doTest() { System.out.println("dialog.setVisible.... "); - new Thread(new Runnable() { - public void run() { - dialog.setVisible(true); - } - }).start(); + new Thread(() -> dialog.setVisible(true)).start(); // The bug is that this construction leads to the redundant xRequestFocus // By the way, the requestFocusInWindow() works fine before the fix @@ -98,7 +101,7 @@ tf.addFocusListener(new FocusAdapter() { public void focusGained(FocusEvent e) { System.out.println("TextField gained focus: " + e); - passed = true; + focusGainedLatch.countDown(); } }); @@ -116,6 +119,17 @@ tf.requestFocus(); } + private static void captureScreen() { + try { + final Rectangle screenBounds = new Rectangle( + Toolkit.getDefaultToolkit().getScreenSize()); + ImageIO.write(r.createScreenCapture(screenBounds), + "png", new File("ComponentLostFocusTest.png")); + } catch (Exception e) { + e.printStackTrace(); + } + } + public static final void main(String args[]) throws Exception { r = new Robot(); r.setAutoDelay(100); @@ -138,9 +152,10 @@ System.out.println("Focus owner: " + KeyboardFocusManager.getCurrentKeyboardFocusManager(). getFocusOwner()); - - if (!passed) { - throw new RuntimeException("TextField got no focus! Test failed."); + if (!focusGainedLatch.await(5, TimeUnit.SECONDS)) { + captureScreen(); + throw new RuntimeException("Waited too long, " + + "TextField got no focus! Test failed."); } } finally { EventQueue.invokeAndWait(() -> { @@ -151,4 +166,3 @@ } } } - diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/Focus/InactiveFocusRace.java openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/InactiveFocusRace.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/Focus/InactiveFocusRace.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/Focus/InactiveFocusRace.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2024, 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 @@ -30,6 +30,7 @@ */ import java.awt.Button; +import java.awt.EventQueue; import java.awt.FlowLayout; import java.awt.Frame; import java.awt.KeyboardFocusManager; @@ -48,19 +49,27 @@ Button activeButton, inactiveButton1, inactiveButton2; Semaphore sema; final static int TIMEOUT = 10000; + private static Robot robot; public static void main(String[] args) throws Exception { try { + robot = new Robot(); InactiveFocusRace test = new InactiveFocusRace(); - test.init(); + EventQueue.invokeAndWait(() -> { + test.init(); + }); + robot.waitForIdle(); + robot.delay(1000); test.start(); } finally { - if (activeFrame != null) { - activeFrame.dispose(); - } - if (inactiveFrame != null) { - inactiveFrame.dispose(); - } + EventQueue.invokeAndWait(() -> { + if (activeFrame != null) { + activeFrame.dispose(); + } + if (inactiveFrame != null) { + inactiveFrame.dispose(); + } + }); } } @@ -91,24 +100,40 @@ sema.raise(); } }); + inactiveFrame.addWindowListener(new WindowAdapter() { + public void windowActivated(WindowEvent e) { + System.err.println("inactive Window activated"); + sema.raise(); + } + }); activeFrame.addWindowListener(new WindowAdapter() { public void windowActivated(WindowEvent e) { System.err.println("Window activated"); sema.raise(); } }); + inactiveFrame.setVisible(true); } public void start() { - Robot robot = null; + + + // Wait for inactive frame to become active try { - robot = new Robot(); - } catch (Exception e) { - throw new RuntimeException("Unable to create robot"); + sema.doWait(TIMEOUT); + } catch (InterruptedException ie) { + throw new RuntimeException("Wait was interrupted"); + } + if (!sema.getState()) { + throw new RuntimeException("Frame doesn't become active on show"); } + sema.setState(false); - inactiveFrame.setVisible(true); - activeFrame.setVisible(true); + try { + EventQueue.invokeAndWait(() -> activeFrame.setVisible(true)); + } catch (Exception e) { + throw new RuntimeException("Interrupted active frame rendering"); + } // Wait for active frame to become active try { diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/Frame/BogusFocusableWindowState/BogusFocusableWindowState.java openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/BogusFocusableWindowState/BogusFocusableWindowState.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/Frame/BogusFocusableWindowState/BogusFocusableWindowState.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/BogusFocusableWindowState/BogusFocusableWindowState.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,50 @@ +/* + * Copyright Amazon.com Inc. 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. + */ + +import java.awt.Window; + +/** + * @test + * @bug 8346952 + * @summary Verifies no exception occurs when triggering updateCG() + * for an ownerless window. + * @key headful + */ +public final class BogusFocusableWindowState { + + public static void main(String[] args) { + Window frame = new Window(null) { + @Override + public boolean getFocusableWindowState() { + removeNotify(); + return true; + } + }; + try { + frame.pack(); + frame.setVisible(true); + } finally { + frame.dispose(); + } + } +} diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -27,7 +27,7 @@ /** * @test - * @bug 8235638 8235739 8285094 + * @bug 8235638 8235739 8285094 8346952 * @key headful */ public final class GetGraphicsStressTest { diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/List/MouseDraggedOriginatedByScrollBarTest.java openjdk-25-25.0.2+10/test/jdk/java/awt/List/MouseDraggedOriginatedByScrollBarTest.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/List/MouseDraggedOriginatedByScrollBarTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/List/MouseDraggedOriginatedByScrollBarTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -24,41 +24,46 @@ /* * @test * @bug 6240151 + * @key headful * @summary XToolkit: Dragging the List scrollbar initiates DnD - * @library /java/awt/regtesthelpers - * @build PassFailJFrame - * @run main/manual MouseDraggedOriginatedByScrollBarTest + * @requires os.family == "linux" + * @run main MouseDraggedOriginatedByScrollBarTest */ +import java.awt.EventQueue; import java.awt.FlowLayout; import java.awt.Frame; import java.awt.List; -import java.awt.event.MouseMotionAdapter; +import java.awt.Point; +import java.awt.Robot; +import java.awt.event.InputEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; +import java.awt.event.MouseMotionAdapter; public class MouseDraggedOriginatedByScrollBarTest { - - private static final String INSTRUCTIONS = """ - 1) Click and drag the scrollbar of the list. - 2) Keep dragging till the mouse pointer goes out the scrollbar. - 3) The test failed if you see messages about events. The test passed if you don't."""; + private static Frame frame; + private static volatile Point loc; + private static List list; + private static final int XOFFSET = 10; + private static final int YOFFSET = 20; public static void main(String[] args) throws Exception { - PassFailJFrame.builder() - .title("MouseDraggedOriginatedByScrollBarTest Instructions") - .instructions(INSTRUCTIONS) - .rows((int) INSTRUCTIONS.lines().count() + 2) - .columns(35) - .testUI(MouseDraggedOriginatedByScrollBarTest::createTestUI) - .logArea() - .build() - .awaitAndCheck(); + try { + EventQueue.invokeAndWait(() -> createUI()); + test(); + } finally { + EventQueue.invokeAndWait(() -> { + if (frame != null) { + frame.dispose(); + } + }); + } } - private static Frame createTestUI() { - Frame frame = new Frame(); - List list = new List(4, false); + private static void createUI() { + frame = new Frame(); + list = new List(4, false); list.add("000"); list.add("111"); @@ -77,27 +82,52 @@ new MouseMotionAdapter(){ @Override public void mouseDragged(MouseEvent me){ - PassFailJFrame.log(me.toString()); + System.out.println(me); + throw new RuntimeException("Mouse dragged event detected."); } }); list.addMouseListener( new MouseAdapter() { public void mousePressed(MouseEvent me) { - PassFailJFrame.log(me.toString()); + System.out.println(me); + throw new RuntimeException("Mouse pressed event detected."); } public void mouseReleased(MouseEvent me) { - PassFailJFrame.log(me.toString()); + System.out.println(me); + throw new RuntimeException("Mouse released event detected."); } public void mouseClicked(MouseEvent me){ - PassFailJFrame.log(me.toString()); + System.out.println(me); + throw new RuntimeException("Mouse clicked event detected."); } }); frame.setLayout(new FlowLayout()); frame.pack(); - return frame; + frame.setLocationRelativeTo(null); + frame.setVisible(true); + } + + private static void test() throws Exception { + Robot robot = new Robot(); + robot.waitForIdle(); + robot.delay(1000); + robot.setAutoWaitForIdle(true); + + EventQueue.invokeAndWait(() -> { + Point p = list.getLocationOnScreen(); + p.translate(list.getWidth() - XOFFSET, YOFFSET); + loc = p; + }); + robot.mouseMove(loc.x, loc.y); + robot.mousePress(InputEvent.BUTTON1_DOWN_MASK); + for (int i = 0; i < 30; i++) { + robot.mouseMove(loc.x, loc.y + i); + } + robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK); + robot.delay(100); } } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/TextField/SetEchoCharTest4/SetEchoCharTest4.java openjdk-25-25.0.2+10/test/jdk/java/awt/TextField/SetEchoCharTest4/SetEchoCharTest4.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/TextField/SetEchoCharTest4/SetEchoCharTest4.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/TextField/SetEchoCharTest4/SetEchoCharTest4.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -27,7 +27,6 @@ import java.awt.TextField; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.lang.reflect.InvocationTargetException; /* * @test @@ -54,16 +53,17 @@ Make sure the actual text matches what you typed in for each field. Press Pass if everything's ok, otherwise Fail - """; + """; public SetEchoCharTest4() { + super("SetEchoCharTest4"); setLayout(new FlowLayout()); tf1.setEchoChar('*'); tf2.setEchoChar('$'); tf3.setEchoChar('#'); addStuff(); b.addActionListener(this); - setSize (200,200); + setSize (300, 150); } private void addStuff() { @@ -78,7 +78,6 @@ PassFailJFrame.log("TextField2 = " + tf2.getText()); PassFailJFrame.log("TextField3 = " + tf3.getText()); PassFailJFrame.log("--------------"); - setVisible(false); remove(tf1); remove(tf2); remove(tf3); @@ -86,16 +85,14 @@ addStuff(); } - public static void main(String[] args) throws InterruptedException, - InvocationTargetException { + public static void main(String[] args) throws Exception { PassFailJFrame.builder() - .title("Set Echo Character Test") - .testUI(SetEchoCharTest4::new) - .instructions(INSTRUCTIONS) - .rows((int) INSTRUCTIONS.lines().count() + 1) - .columns(40) - .logArea() - .build() - .awaitAndCheck(); + .title("Set Echo Character Test") + .testUI(SetEchoCharTest4::new) + .instructions(INSTRUCTIONS) + .columns(40) + .logArea() + .build() + .awaitAndCheck(); } } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/TextField/SetEchoCharWordOpsTest.java openjdk-25-25.0.2+10/test/jdk/java/awt/TextField/SetEchoCharWordOpsTest.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/TextField/SetEchoCharWordOpsTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/TextField/SetEchoCharWordOpsTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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,7 +30,7 @@ /* * @test - * @bug 6191897 + * @bug 6191897 8354646 * @summary Verifies that ctrl+left/right does not move word-by-word in a TextField * with echo character set * @library /java/awt/regtesthelpers /test/lib diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/Toolkit/Headless/WrappedToolkitTest/TestWrapped.java openjdk-25-25.0.2+10/test/jdk/java/awt/Toolkit/Headless/WrappedToolkitTest/TestWrapped.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/Toolkit/Headless/WrappedToolkitTest/TestWrapped.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/Toolkit/Headless/WrappedToolkitTest/TestWrapped.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 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 @@ -22,55 +22,52 @@ */ /* - * test + * @test * @bug 6282388 - * @summary Tests that AWT use correct toolkit to be wrapped into HeadlessToolkit - * @author artem.ananiev@sun.com: area=awt.headless - * @run shell WrappedToolkitTest.sh + * @summary Tests that AWT uses correct toolkit wrapped into HeadlessToolkit + * @modules java.desktop/sun.awt:open + * @library /test/lib + * @run main/othervm -Djava.awt.headless=true TestWrapped */ -import java.awt.*; - -import java.lang.reflect.*; - -import sun.awt.*; - -public class TestWrapped -{ - public static void main(String[] args) - { - try - { - if (args.length != 1) { - System.err.println("No correct toolkit class name is specified, test is not run"); - System.exit(0); +import java.awt.Toolkit; +import java.lang.Class; +import java.lang.reflect.Field; + +import jdk.test.lib.Platform; + +public final class TestWrapped { + + private static final String HEADLESS_TOOLKIT = "sun.awt.HeadlessToolkit"; + private static final String MACOSX_TOOLKIT = "sun.lwawt.macosx.LWCToolkit"; + private static final String UNIX_TOOLKIT = "sun.awt.X11.XToolkit"; + private static final String WINDOWS_TOOLKIT = "sun.awt.windows.WToolkit"; + + public static void main(String[] args) throws Exception { + String expectedToolkitClassName; + if (Platform.isWindows()) { + expectedToolkitClassName = WINDOWS_TOOLKIT; + } else if (Platform.isOSX()) { + expectedToolkitClassName = MACOSX_TOOLKIT; + } else { + expectedToolkitClassName = UNIX_TOOLKIT; } - String correctToolkitClassName = args[0]; Toolkit tk = Toolkit.getDefaultToolkit(); - Class tkClass = tk.getClass(); - if (!tkClass.getName().equals("sun.awt.HeadlessToolkit")) - { - System.err.println(tkClass.getName()); - System.err.println("Error: default toolkit is not an instance of HeadlessToolkit"); - System.exit(-1); + Class tkClass = tk.getClass(); + if (!tkClass.getName().equals(HEADLESS_TOOLKIT)) { + System.err.println("Expected: " + HEADLESS_TOOLKIT); + System.err.println("Actual: " + tkClass.getName()); + throw new RuntimeException("Wrong default toolkit"); } Field f = tkClass.getDeclaredField("tk"); f.setAccessible(true); - Class wrappedClass = f.get(tk).getClass(); - if (!wrappedClass.getName().equals(correctToolkitClassName)) { - System.err.println(wrappedClass.getName()); - System.err.println("Error: wrapped toolkit is not an instance of " + correctToolkitClassName); - System.exit(-1); + Class wrappedClass = f.get(tk).getClass(); + if (!wrappedClass.getName().equals(expectedToolkitClassName)) { + System.err.println("Expected: " + expectedToolkitClassName); + System.err.println("Actual: " + wrappedClass.getName()); + throw new RuntimeException("Wrong wrapped toolkit"); } - } - catch (Exception z) - { - z.printStackTrace(System.err); - System.exit(-1); - } - - System.exit(0); } } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh openjdk-25-25.0.2+10/test/jdk/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh --- openjdk-25-25.0.1+8/test/jdk/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,221 +0,0 @@ -#!/bin/ksh -p - -# -# Copyright (c) 2012, 2020, 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 6282388 8030640 -# @summary Tests that AWT use correct toolkit to be wrapped into HeadlessToolkit -# @author artem.ananiev@sun.com: area=awt.headless -# compile TestWrapped.java -# @run shell WrappedToolkitTest.sh - -# Beginning of subroutines: -status=1 - -#Call this from anywhere to fail the test with an error message -# usage: fail "reason why the test failed" -fail() - { echo "The test failed :-(" - echo "$*" 1>&2 - echo "exit status was $status" - exit $status - } #end of fail() - -#Call this from anywhere to pass the test with a message -# usage: pass "reason why the test passed if applicable" -pass() - { echo "The test passed!!!" - echo "$*" 1>&2 - exit 0 - } #end of pass() - -# end of subroutines - - -# The beginning of the script proper - -# Checking for proper OS -OS=`uname -s` -case "$OS" in - AIX | CYGWIN* | Darwin | Linux ) - FILESEP="/" - ;; - - Windows* ) - FILESEP="\\" - ;; - - # catch all other OSs - * ) - echo "Unrecognized system! $OS" - fail "Unrecognized system! $OS" - ;; -esac - -# check that some executable or other file you need is available, abort if not -# note that the name of the executable is in the fail string as well. -# this is how to check for presence of the compiler, etc. -#RESOURCE=`whence SomeProgramOrFileNeeded` -#if [ "${RESOURCE}" = "" ] ; -# then fail "Need SomeProgramOrFileNeeded to perform the test" ; -#fi - -# Want this test to run standalone as well as in the harness, so do the -# following to copy the test's directory into the harness's scratch directory -# and set all appropriate variables: - -if [ -z "${TESTJAVA}" ] ; then - # TESTJAVA is not set, so the test is running stand-alone. - # TESTJAVA holds the path to the root directory of the build of the JDK - # to be tested. That is, any java files run explicitly in this shell - # should use TESTJAVA in the path to the java interpreter. - # So, we'll set this to the JDK spec'd on the command line. If none - # is given on the command line, tell the user that and use a cheesy - # default. - # THIS IS THE JDK BEING TESTED. - if [ -n "$1" ] ; - then TESTJAVA=$1 - else fail "no JDK specified on command line!" - fi - TESTSRC=. - TESTCLASSES=. - STANDALONE=1; -fi -echo "JDK under test is: $TESTJAVA" - -#if in test harness, then copy the entire directory that the test is in over -# to the scratch directory. This catches any support files needed by the test. -if [ -z "${STANDALONE}" ] ; - then cp ${TESTSRC}/* . -fi -case "$OS" in - Windows* | CYGWIN* ) - ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} \ - --add-exports java.desktop/sun.awt=ALL-UNNAMED \ - --add-exports java.desktop/sun.awt.windows=ALL-UNNAMED ${CP} \ - *.java - status=$? - if [ ! $status -eq "0" ]; then - fail "Compilation failed"; - fi - ;; - - AIX | Linux ) - ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} \ - --add-exports java.desktop/sun.awt=ALL-UNNAMED \ - --add-exports java.desktop/sun.awt.X11=ALL-UNNAMED ${CP} \ - *.java - status=$? - if [ ! $status -eq "0" ]; then - fail "Compilation failed"; - fi - ;; - - Darwin) - ${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} \ - --add-exports java.desktop/sun.awt=ALL-UNNAMED \ - --add-exports java.desktop/sun.lwawt.macosx=ALL-UNNAMED ${CP} \ - *.java - status=$? - if [ ! $status -eq "0" ]; then - fail "Compilation failed"; - fi - ;; - -esac - -#Just before executing anything, make sure it has executable permission! -chmod 777 ./* - -############### YOUR TEST CODE HERE!!!!!!! ############# - -case "$OS" in - Windows* | CYGWIN* ) - ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \ - --add-opens java.desktop/sun.awt=ALL-UNNAMED \ - --add-opens java.desktop/sun.awt.windows=ALL-UNNAMED ${CP} \ - TestWrapped sun.awt.windows.WToolkit - status=$? - if [ ! $status -eq "0" ]; then - fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.windows.WToolkit"; - fi - ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \ - --add-opens java.desktop/sun.awt=ALL-UNNAMED \ - --add-opens java.desktop/sun.awt.windows=ALL-UNNAMED ${CP} \ - -Dawt.toolkit=sun.awt.windows.WToolkit \ - TestWrapped sun.awt.windows.WToolkit - status=$? - if [ ! $status -eq "0" ]; then - fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.windows.WToolkit"; - fi - ;; - - AIX | Linux ) - ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \ - --add-opens java.desktop/sun.awt=ALL-UNNAMED \ - --add-opens java.desktop/sun.awt.X11=ALL-UNNAMED ${CP} \ - -Dawt.toolkit=sun.awt.X11.XToolkit \ - TestWrapped sun.awt.X11.XToolkit - status=$? - if [ ! $status -eq "0" ]; then - fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.xawt.XToolkit"; - fi - AWT_TOOLKIT=XToolkit ${TESTJAVA}/bin/java ${TESTVMOPTS} \ - --add-opens java.desktop/sun.awt=ALL-UNNAMED \ - --add-opens java.desktop/sun.awt.X11=ALL-UNNAMED ${CP} \ - -Djava.awt.headless=true \ - TestWrapped sun.awt.X11.XToolkit - status=$? - if [ ! $status -eq "0" ]; then - fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.xawt.XToolkit"; - fi - ;; - - Darwin) - ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \ - --add-opens java.desktop/sun.awt=ALL-UNNAMED \ - --add-opens java.desktop/sun.lwawt.macosx=ALL-UNNAMED ${CP} \ - TestWrapped sun.lwawt.macosx.LWCToolkit - status=$? - if [ ! $status -eq "0" ]; then - fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.lwawt.macosx.LWCToolkit"; - fi - ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \ - --add-opens java.desktop/sun.awt=ALL-UNNAMED \ - --add-opens java.desktop/sun.lwawt.macosx=ALL-UNNAMED ${CP} \ - -Dawt.toolkit=sun.lwawt.macosx.LWCToolkit \ - TestWrapped sun.lwawt.macosx.LWCToolkit - status=$? - if [ ! $status -eq "0" ]; then - fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.lwawt.macosx.LWCToolkit"; - fi - ;; - -esac - -pass "All the tests are PASSED"; - -#For additional examples of how to write platform independent KSH scripts, -# see the jtreg file itself. It is a KSH script for both Solaris and Win32 diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/SerializationSpecTest.java openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/SerializationSpecTest.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/SerializationSpecTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/SerializationSpecTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,99 @@ +/* + * Copyright Amazon.com Inc. 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. + */ + +import java.io.File; +import java.io.FileInputStream; +import java.io.InvalidObjectException; +import java.io.ObjectInputStream; +import java.io.OptionalDataException; + +/** + * @test + * @bug 8367384 + * @summary Verify ICC_Profile serialization per spec, all name/data cases + */ +public final class SerializationSpecTest { + + public static void main(String[] args) throws Exception { + // Serialization form for ICC_Profile includes version, profile name, + // and profile data. If the name is invalid or does not match a standard + // profile, the data is used. An exception is thrown only if both the + // name and the data are invalid, or if one of them is missing or is of + // the wrong type. + + // Naming conventions used in test file names: + // null : null reference + // valid : valid standard profile name or valid profile data (byte[]) + // invalid : unrecognized name or data with incorrect ICC header + // wrongType: incorrect type, e.g., int[] instead of String or byte[] + + // No name or data + test("empty", OptionalDataException.class); + + // Cases where only the profile name is present (no profile data) + test("null", OptionalDataException.class); + test("valid", OptionalDataException.class); + test("invalid", OptionalDataException.class); + test("wrongType", InvalidObjectException.class); + + // The test files are named as _.ser + test("null_null", InvalidObjectException.class); + test("null_valid", null); // valid data is enough if name is null + test("null_invalid", InvalidObjectException.class); + test("null_wrongType", InvalidObjectException.class); + + test("invalid_null", InvalidObjectException.class); + test("invalid_valid", null); // valid data is enough if name is invalid + test("invalid_invalid", InvalidObjectException.class); + test("invalid_wrongType", InvalidObjectException.class); + + test("wrongType_null", InvalidObjectException.class); + test("wrongType_valid", InvalidObjectException.class); + test("wrongType_invalid", InvalidObjectException.class); + test("wrongType_wrongType", InvalidObjectException.class); + + test("valid_null", null); // the valid name is enough + test("valid_valid", null); // the valid name is enough + test("valid_invalid", null); // the valid name is enough + test("valid_wrongType", InvalidObjectException.class); + } + + private static void test(String test, Class expected) { + String fileName = test + ".ser"; + File file = new File(System.getProperty("test.src", "."), fileName); + Class actual = null; + try (var fis = new FileInputStream(file); + var ois = new ObjectInputStream(fis)) + { + ois.readObject(); + } catch (Exception e) { + actual = e.getClass(); + } + if (actual != expected) { + System.err.println("Test: " + test); + System.err.println("Expected: " + expected); + System.err.println("Actual: " + actual); + throw new RuntimeException("Test failed"); + } + } +} Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/empty.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/empty.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid_invalid.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid_invalid.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid_null.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid_null.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid_valid.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid_valid.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid_wrongType.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/invalid_wrongType.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null_invalid.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null_invalid.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null_null.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null_null.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null_valid.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null_valid.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null_wrongType.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/null_wrongType.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid_invalid.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid_invalid.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid_null.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid_null.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid_valid.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid_valid.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid_wrongType.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/valid_wrongType.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType_invalid.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType_invalid.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType_null.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType_null.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType_valid.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType_valid.ser differ Binary files /srv/release.debian.org/tmp/_xnZMyH4cd/openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType_wrongType.ser and /srv/release.debian.org/tmp/rRDi31zHuu/openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/SerializationSpecTest/wrongType_wrongType.ser differ diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/StandardProfilesRoundTrip.java openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/StandardProfilesRoundTrip.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/Serialization/StandardProfilesRoundTrip.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/Serialization/StandardProfilesRoundTrip.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,73 @@ +/* + * Copyright Amazon.com Inc. 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. + */ + +import java.awt.color.ColorSpace; +import java.awt.color.ICC_Profile; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; + +/** + * @test + * @bug 8367384 + * @summary Checks ICC_Profile serialization for standard profiles + */ +public final class StandardProfilesRoundTrip { + + private static final ICC_Profile[] PROFILES = { + ICC_Profile.getInstance(ColorSpace.CS_sRGB), + ICC_Profile.getInstance(ColorSpace.CS_LINEAR_RGB), + ICC_Profile.getInstance(ColorSpace.CS_CIEXYZ), + ICC_Profile.getInstance(ColorSpace.CS_PYCC), + ICC_Profile.getInstance(ColorSpace.CS_GRAY) + }; + + public static void main(String[] args) throws Exception { + // Test profiles one by one + for (ICC_Profile profile : PROFILES) { + test(profile); + } + // Test all profiles at once + test(PROFILES); + } + + private static void test(ICC_Profile... profiles) throws Exception { + byte[] data; + try (var bos = new ByteArrayOutputStream(); + var oos = new ObjectOutputStream(bos)) + { + for (ICC_Profile p : profiles) { + oos.writeObject(p); + } + data = bos.toByteArray(); + } + try (var ois = new ObjectInputStream(new ByteArrayInputStream(data))) { + for (ICC_Profile p : profiles) { + if (p != ois.readObject()) { + throw new RuntimeException("Wrong deserialized object"); + } + } + } + } +} diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/ValidateICCHeaderData/ValidateICCHeaderData.java openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/ValidateICCHeaderData/ValidateICCHeaderData.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/color/ICC_Profile/ValidateICCHeaderData/ValidateICCHeaderData.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/color/ICC_Profile/ValidateICCHeaderData/ValidateICCHeaderData.java 2025-12-18 08:04:02.000000000 +0000 @@ -161,8 +161,8 @@ testProfileCreation(false); System.out.println("CASE 14: Passed \n"); - System.out.println("CASE 15: Testing Deserialization of ICC_Profile ..."); - testDeserialization(); + System.out.println("CASE 15: Testing loading of ICC_Profile from file ..."); + testLoading(); System.out.println("CASE 15: Passed \n"); System.out.println("Successfully completed testing all 15 cases. Test Passed !!"); @@ -261,9 +261,9 @@ } } - private static void testDeserialization() throws IOException { - //invalidSRGB.icc is serialized on older version of JDK - //Upon deserialization, the invalid profile is expected to throw IAE + private static void testLoading() throws IOException { + // invalidSRGB.icc is a profile file that was produced by an older JDK + // When attempting to load it, the current JDK is expected to throw IAE try { ICC_Profile.getInstance("./invalidSRGB.icc"); throw new RuntimeException("Test Failed ! Expected IAE NOT thrown"); diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java openjdk-25-25.0.2+10/test/jdk/java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -22,51 +22,57 @@ */ /* - @test - @bug 8041928 8158616 - @requires (os.family != "mac") - @summary Confirm that the Alt-Gr Modifier bit is set correctly. - @run main/manual AltGraphModifierTest + * @test + * @bug 8041928 8158616 + * @requires (os.family != "mac") + * @summary Confirm that the Alt-Gr Modifier bit is set correctly. + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @run main/manual AltGraphModifierTest */ -import java.awt.Button; -import java.awt.Dialog; import java.awt.Frame; -import java.awt.Panel; -import java.awt.TextArea; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.awt.event.InputEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; public class AltGraphModifierTest { - private static void init() throws Exception { - String[] instructions - = { - "This test is for verifying Alt-Gr modifier of an event.", - "Linux :-", - "1. Please check if Alt-Gr key is present on keyboard.", - "2. If present, press the Alt-Gr key and perform", - " mouse click on the TestWindow.", - "3. Navigate to System Settings-> Keyboard-> Shortcuts->", - " Typing.", - "4. Select an option for the Alternative Characters Key", - " For example. Right Alt", - "5. Close the settings and navigate to test", - "6. Press Right Alt Key & perform mouse click on the", - " TestWindow", - "7. Test will exit by itself with appropriate result.", - " ", - }; - Sysout.createDialog(); - Sysout.printInstructions(instructions); + public static void main(String[] args) throws Exception { + String INSTRUCTIONS = """ + This test is for verifying Alt-Gr modifier of an event. + Please check if Alt-Gr key is present on keyboard. + If not present, press Pass. + On Windows: + Press Alt-Gr or Right Alt key and simultaneously + perform mouse click on the "TestWindow". + On Linux: + Navigate to + System Settings-> Keyboard-> Special Character Entry + Select "Right Alt" option for the "Alternate Characters Key" + Close the settings and navigate to test + Press Right Alt Key & simultaneously + perform mouse click on the "TestWindow". + + If the system does not have such setting, press Pass. + After the test, change the Setting of "Alternate Characters Key" + back to "Layout default". + + If "Alt-Gr Modifier bit is set" message is displayed in logArea, + press Pass else press Fail. + """; + + PassFailJFrame.builder() + .instructions(INSTRUCTIONS) + .columns(35) + .testUI(AltGraphModifierTest::initTestWindow) + .logArea() + .build() + .awaitAndCheck(); } - static Frame mainFrame; - public static void initTestWindow() { - mainFrame = new Frame(); + public static Frame initTestWindow() { + Frame mainFrame = new Frame(); mainFrame.setTitle("TestWindow"); mainFrame.setBounds(700, 10, 300, 300); mainFrame.addMouseListener(new MouseAdapter() { @@ -74,186 +80,12 @@ public void mousePressed(MouseEvent e) { int ex = e.getModifiersEx(); if ((ex & InputEvent.ALT_GRAPH_DOWN_MASK) == 0) { - AltGraphModifierTest.fail("Alt-Gr Modifier bit is not set."); + PassFailJFrame.log("Alt-Gr Modifier bit is not set."); } else { - AltGraphModifierTest.pass(); + PassFailJFrame.log("Alt-Gr Modifier bit is set"); } } }); - mainFrame.setVisible(true); - } - - public static void dispose() { - Sysout.dispose(); - mainFrame.dispose(); - } - - /** - * *************************************************** - * Standard Test Machinery Section DO NOT modify anything in this section -- - * it's a standard chunk of code which has all of the synchronisation - * necessary for the test harness. By keeping it the same in all tests, it - * is easier to read and understand someone else's test, as well as insuring - * that all tests behave correctly with the test harness. There is a section - * following this for test-defined classes - * **************************************************** - */ - private static boolean theTestPassed = false; - private static boolean testGeneratedInterrupt = false; - private static String failureMessage = ""; - private static Thread mainThread = null; - final private static int sleepTime = 300000; - - public static void main(String args[]) throws Exception { - mainThread = Thread.currentThread(); - try { - init(); - initTestWindow(); - } catch (Exception e) { - e.printStackTrace(); - } - try { - mainThread.sleep(sleepTime); - } catch (InterruptedException e) { - dispose(); - if (testGeneratedInterrupt && !theTestPassed) { - throw new Exception(failureMessage); - } - } - if (!testGeneratedInterrupt) { - dispose(); - throw new RuntimeException("Timed out after " + sleepTime / 1000 - + " seconds"); - } - } - - public static synchronized void pass() { - theTestPassed = true; - testGeneratedInterrupt = true; - mainThread.interrupt(); - } - - public static synchronized void fail(String whyFailed) { - theTestPassed = false; - testGeneratedInterrupt = true; - failureMessage = whyFailed; - mainThread.interrupt(); - } -} - -// *********** End Standard Test Machinery Section ********** -/** - * ************************************************** - * Standard Test Machinery DO NOT modify anything below -- it's a standard chunk - * of code whose purpose is to make user interaction uniform, and thereby make - * it simpler to read and understand someone else's test. - * ************************************************** - */ -/** - * This is part of the standard test machinery. It creates a dialog (with the - * instructions), and is the interface for sending text messages to the user. To - * print the instructions, send an array of strings to Sysout.createDialog - * WithInstructions method. Put one line of instructions per array entry. To - * display a message for the tester to see, simply call Sysout.println with the - * string to be displayed. This mimics System.out.println but works within the - * test harness as well as standalone. - */ -class Sysout { - private static TestDialog dialog; - private static Frame frame; - - public static void createDialog() { - frame = new Frame(); - dialog = new TestDialog(frame, "Instructions"); - String[] defInstr = {"Instructions will appear here. ", ""}; - dialog.printInstructions(defInstr); - dialog.show(); - println("Any messages for the tester will display here."); - } - - public static void printInstructions(String[] instructions) { - dialog.printInstructions(instructions); - } - - public static void println(String messageIn) { - dialog.displayMessage(messageIn); - } - - public static void dispose() { - dialog.dispose(); - frame.dispose(); - } -} - -/** - * This is part of the standard test machinery. It provides a place for the test - * instructions to be displayed, and a place for interactive messages to the - * user to be displayed. To have the test instructions displayed, see Sysout. To - * have a message to the user be displayed, see Sysout. Do not call anything in - * this dialog directly. - */ -class TestDialog extends Dialog implements ActionListener { - TextArea instructionsText; - TextArea messageText; - int maxStringLength = 80; - Panel buttonP; - Button failB; - - // DO NOT call this directly, go through Sysout - public TestDialog(Frame frame, String name) { - super(frame, name); - int scrollBoth = TextArea.SCROLLBARS_BOTH; - instructionsText = new TextArea("", 15, maxStringLength, scrollBoth); - add("North", instructionsText); - - messageText = new TextArea("", 5, maxStringLength, scrollBoth); - add("Center", messageText); - - buttonP = new Panel(); - failB = new Button("Fail"); - failB.setActionCommand("fail"); - failB.addActionListener(this); - buttonP.add("Center", failB); - - add("South", buttonP); - pack(); - setVisible(true); - } - - // DO NOT call this directly, go through Sysout - public void printInstructions(String[] instructions) { - instructionsText.setText(""); - String printStr, remainingStr; - for (int i = 0; i < instructions.length; i++) { - remainingStr = instructions[i]; - while (remainingStr.length() > 0) { - if (remainingStr.length() >= maxStringLength) { - int posOfSpace = remainingStr. - lastIndexOf(' ', maxStringLength - 1); - - if (posOfSpace <= 0) { - posOfSpace = maxStringLength - 1; - } - - printStr = remainingStr.substring(0, posOfSpace + 1); - remainingStr = remainingStr.substring(posOfSpace + 1); - } - else { - printStr = remainingStr; - remainingStr = ""; - } - instructionsText.append(printStr + "\n"); - } - } - } - - public void displayMessage(String messageIn) { - messageText.append(messageIn + "\n"); - } - - public void actionPerformed(ActionEvent e) { - if (e.getActionCommand() == "fail") { - AltGraphModifierTest.fail("User Clicked Fail"); - } + return mainFrame; } } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/font/FontNames/LocaleFamilyNames.java openjdk-25-25.0.2+10/test/jdk/java/awt/font/FontNames/LocaleFamilyNames.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/font/FontNames/LocaleFamilyNames.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/font/FontNames/LocaleFamilyNames.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2011, 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 @@ -26,29 +26,32 @@ * @bug 4935798 6521210 6901159 * @summary Tests that all family names that are reported in all locales * correspond to some font returned from getAllFonts(). - * @run main LocaleFamilyNames + * @run main/othervm/timeout=360 LocaleFamilyNames */ import java.awt.*; import java.util.*; public class LocaleFamilyNames { public static void main(String[] args) throws Exception { + System.out.println("Start time: " + java.time.LocalDateTime.now()); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); - Font[] all_fonts = ge.getAllFonts(); - Locale[] all_locales = Locale.getAvailableLocales(); + System.out.println("Number of fonts: " + all_fonts.length); + System.out.println("Number of locales: " + all_locales.length); + HashSet all_families = new HashSet(); for (int i=0; i FONT_CANDIDATES = + List.of("Myanmar MN", + "Padauk", + "Myanmar Text", + "Noto Sans Myanmar"); private static final String FONT_NAME = selectFontName(); @@ -61,12 +68,8 @@ public static void main(String[] args) throws Exception { if (FONT_NAME == null) { - System.err.println("Unsupported OS: exiting"); - return; - } - if (!fontExists()) { - System.err.println("Required font is not installed: " + FONT_NAME); - return; + throw new SkippedException("No suitable font found out of the list: " + + String.join(", ", FONT_CANDIDATES)); } try { @@ -130,22 +133,12 @@ } private static String selectFontName() { - String osName = System.getProperty("os.name").toLowerCase(); - if (osName.contains("windows")) { - return FONT_WINDOWS; - } else if (osName.contains("linux")) { - return FONT_LINUX; - } else if (osName.contains("mac")) { - return FONT_MACOS; - } else { - return null; - } + return Arrays.stream(GraphicsEnvironment + .getLocalGraphicsEnvironment() + .getAvailableFontFamilyNames()) + .filter(FONT_CANDIDATES::contains) + .findFirst() + .orElse(null); } - private static boolean fontExists() { - String[] fontFamilyNames = GraphicsEnvironment - .getLocalGraphicsEnvironment() - .getAvailableFontFamilyNames(); - return Arrays.asList(fontFamilyNames).contains(FONT_NAME); - } } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/image/XBMDecoder/XBMDecoderTest.java openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/XBMDecoderTest.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/image/XBMDecoder/XBMDecoderTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/XBMDecoderTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,77 @@ +/* + * 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 8361748 + * @summary Tests XBM image size limits and if XBMImageDecoder.produceImage() + * throws appropriate error when parsing invalid XBM image data. + * @run main XBMDecoderTest + */ + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.PrintStream; +import javax.swing.ImageIcon; + +public class XBMDecoderTest { + + public static void main(String[] args) throws Exception { + String dir = System.getProperty("test.src"); + PrintStream originalErr = System.err; + boolean validCase; + + File currentDir = new File(dir); + File[] files = currentDir.listFiles((File d, String s) + -> s.endsWith(".xbm")); + + for (File file : files) { + String fileName = file.getName(); + validCase = fileName.startsWith("valid"); + + System.out.println("--- Testing " + fileName + " ---"); + try (FileInputStream fis = new FileInputStream(file); + ByteArrayOutputStream errContent = new ByteArrayOutputStream()) { + System.setErr(new PrintStream(errContent)); + + ImageIcon icon = new ImageIcon(fis.readAllBytes()); + boolean isErrEmpty = errContent.toString().isEmpty(); + if (!isErrEmpty) { + System.out.println("Expected ImageFormatException occurred."); + System.out.print(errContent); + } + + if (validCase && !isErrEmpty) { + throw new RuntimeException("Test failed: Error stream not empty"); + } else if (!validCase && isErrEmpty) { + throw new RuntimeException("Test failed: ImageFormatException" + + " expected but not thrown"); + } + System.out.println("PASSED\n"); + } finally { + System.setErr(originalErr); + } + } + } +} diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/image/XBMDecoder/invalid.xbm openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid.xbm --- openjdk-25-25.0.1+8/test/jdk/java/awt/image/XBMDecoder/invalid.xbm 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid.xbm 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,2 @@ +#define k_ht 3 +h` k[] = { 01x0, 42222222222236319330:: diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/image/XBMDecoder/invalid_hex.xbm openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid_hex.xbm --- openjdk-25-25.0.1+8/test/jdk/java/awt/image/XBMDecoder/invalid_hex.xbm 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid_hex.xbm 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,3 @@ +#define k_wt 16 +#define k_ht 1 +k[] = { 0x10, 1234567890}; diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/image/XBMDecoder/invalid_ht.xbm openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid_ht.xbm --- openjdk-25-25.0.1+8/test/jdk/java/awt/image/XBMDecoder/invalid_ht.xbm 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/invalid_ht.xbm 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,3 @@ +#define k_wt 16 +#define k_ht 0 +k[] = { 0x10, 0x12}; diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/image/XBMDecoder/valid.xbm openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/valid.xbm --- openjdk-25-25.0.1+8/test/jdk/java/awt/image/XBMDecoder/valid.xbm 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/valid.xbm 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,6 @@ +#define test_width 16 +#define test_height 3 +#define ht_x 1 +#define ht_y 2 +static unsigned char test_bits[] = { +0x13, 0x11, 0x15, 0x00, 0xAB, 0xcd }; diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/image/XBMDecoder/valid_hex.xbm openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/valid_hex.xbm --- openjdk-25-25.0.1+8/test/jdk/java/awt/image/XBMDecoder/valid_hex.xbm 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/image/XBMDecoder/valid_hex.xbm 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,4 @@ +#define test_width 16 +#define test_height 2 +static unsigned char test_bits[] = { 0x13, 0x11, + 0xAB, 0xff }; diff -Nru openjdk-25-25.0.1+8/test/jdk/java/awt/print/Dialog/DialogType.java openjdk-25-25.0.2+10/test/jdk/java/awt/print/Dialog/DialogType.java --- openjdk-25-25.0.1+8/test/jdk/java/awt/print/Dialog/DialogType.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/awt/print/Dialog/DialogType.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 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,49 +26,63 @@ * @bug 6568874 * @key printer * @summary Verify the native dialog works with attribute sets. - * @run main/manual=yesno DialogType + * @library /java/awt/regtesthelpers /test/lib + * @build PassFailJFrame + * @run main/manual DialogType */ -import java.awt.print.*; -import javax.print.attribute.*; -import javax.print.attribute.standard.*; +import java.awt.print.PrinterJob; + +import javax.print.attribute.Attribute; +import javax.print.attribute.HashPrintRequestAttributeSet; +import javax.print.attribute.PrintRequestAttributeSet; +import javax.print.attribute.standard.DialogTypeSelection; + +import jtreg.SkippedException; public class DialogType { + private static PrinterJob job; - static String[] instructions = { - "This test assumes and requires that you have a printer installed", - "It verifies that the dialogs behave properly when using new API", - "to optionally select a native dialog where one is present.", - "Two dialogs are shown in succession.", - "The test passes as long as no exceptions are thrown, *AND*", - "if running on Windows only, the first dialog is a native windows", - "control which differs in appearance from the second dialog", - "" - }; - - public static void main(String[] args) { - - for (int i=0;i"}, the * instructions are displayed as HTML, as supported by Swing, which - * provides richer formatting options. + * provides richer formatting options. To handle navigating links in the + * instructions, call {@link Builder#hyperlinkListener} to install a listener. *

    * The instructions are displayed in a text component with word-wrapping * so that there's no horizontal scroll bar. If the text doesn't fit, a @@ -592,6 +594,7 @@ frame.add(createInstructionUIPanel(instructions, testTimeOut, rows, columns, + null, false, false, 0), BorderLayout.CENTER); @@ -610,6 +613,7 @@ createInstructionUIPanel(builder.instructions, builder.testTimeOut, builder.rows, builder.columns, + builder.hyperlinkListener, builder.screenCapture, builder.addLogArea, builder.logAreaRows); @@ -631,6 +635,7 @@ private static JComponent createInstructionUIPanel(String instructions, long testTimeOut, int rows, int columns, + HyperlinkListener hyperlinkListener, boolean enableScreenCapture, boolean addLogArea, int logAreaRows) { @@ -643,6 +648,9 @@ JTextComponent text = instructions.startsWith("") ? configureHTML(instructions, rows, columns) : configurePlainText(instructions, rows, columns); + if (hyperlinkListener != null && text instanceof JEditorPane ep) { + ep.addHyperlinkListener(hyperlinkListener); + } text.setEditable(false); text.setBorder(createTextBorder()); text.setCaretPosition(0); @@ -716,7 +724,7 @@ // Reduce the list default margins styles.addRule("ol, ul { margin-left-ltr: 30; margin-left-rtl: 30 }"); // Make the size of code (and other elements) the same as other text - styles.addRule("code, kbd, samp, pre { font-size: inherit }"); + styles.addRule("code, kbd, samp, pre { font-size: inherit; background: #DDD; }"); return text; } @@ -1398,6 +1406,7 @@ private int rows; private int columns; private boolean screenCapture; + private HyperlinkListener hyperlinkListener; private boolean addLogArea; private int logAreaRows = 10; @@ -1478,6 +1487,18 @@ return this; } + /** + * Sets a {@link HyperlinkListener} for navigating links inside + * the instructions pane. + * + * @param hyperlinkListener the listener + * @return this builder + */ + public Builder hyperlinkListener(HyperlinkListener hyperlinkListener) { + this.hyperlinkListener = hyperlinkListener; + return this; + } + public Builder screenCapture() { this.screenCapture = true; return this; diff -Nru openjdk-25-25.0.1+8/test/jdk/java/foreign/TestUpcallStructScope.java openjdk-25-25.0.2+10/test/jdk/java/foreign/TestUpcallStructScope.java --- openjdk-25-25.0.1+8/test/jdk/java/foreign/TestUpcallStructScope.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/foreign/TestUpcallStructScope.java 2025-12-18 08:04:02.000000000 +0000 @@ -43,13 +43,18 @@ import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; import java.util.concurrent.atomic.AtomicReference; +import java.util.function.BiConsumer; import java.util.function.Consumer; import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.assertEquals; public class TestUpcallStructScope extends NativeTestHelper { static final MethodHandle MH_do_upcall; + static final MethodHandle MH_do_upcall_ptr; static final MethodHandle MH_Consumer_accept; + static final MethodHandle MH_BiConsumer_accept; static { System.loadLibrary("TestUpcallStructScope"); @@ -57,17 +62,29 @@ findNativeOrThrow("do_upcall"), FunctionDescriptor.ofVoid(C_POINTER, S_PDI_LAYOUT) ); + MH_do_upcall_ptr = LINKER.downcallHandle( + findNativeOrThrow("do_upcall_ptr"), + FunctionDescriptor.ofVoid(C_POINTER, S_PDI_LAYOUT, C_POINTER) + ); try { MH_Consumer_accept = MethodHandles.publicLookup().findVirtual(Consumer.class, "accept", MethodType.methodType(void.class, Object.class)); + MH_BiConsumer_accept = MethodHandles.publicLookup().findVirtual(BiConsumer.class, "accept", + MethodType.methodType(void.class, Object.class, Object.class)); } catch (NoSuchMethodException | IllegalAccessException e) { throw new RuntimeException(e); } } - private static MethodHandle methodHandle (Consumer callback) { - return MH_Consumer_accept.bindTo(callback).asType(MethodType.methodType(void.class, MemorySegment.class)); + private static MethodHandle methodHandle(Consumer callback) { + return MH_Consumer_accept.bindTo(callback) + .asType(MethodType.methodType(void.class, MemorySegment.class)); + } + + private static MethodHandle methodHandle(BiConsumer callback) { + return MH_BiConsumer_accept.bindTo(callback) + .asType(MethodType.methodType(void.class, MemorySegment.class, MemorySegment.class)); } @Test @@ -85,4 +102,22 @@ assertFalse(captured.scope().isAlive()); } + @Test + public void testOtherPointer() throws Throwable { + AtomicReference capturedSegment = new AtomicReference<>(); + MethodHandle target = methodHandle((_, addr) -> capturedSegment.set(addr)); + FunctionDescriptor upcallDesc = FunctionDescriptor.ofVoid(S_PDI_LAYOUT, C_POINTER); + MemorySegment argAddr = MemorySegment.ofAddress(42); + try (Arena arena = Arena.ofConfined()) { + MemorySegment upcallStub = LINKER.upcallStub(target, upcallDesc, arena); + MemorySegment argSegment = arena.allocate(S_PDI_LAYOUT); + MH_do_upcall_ptr.invoke(upcallStub, argSegment, argAddr); + } + + // We've captured the address '42' from the upcall. This should have + // the global scope, so it should still be alive here. + MemorySegment captured = capturedSegment.get(); + assertEquals(argAddr, captured); + assertTrue(captured.scope().isAlive()); + } } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/foreign/libTestUpcallStructScope.c openjdk-25-25.0.2+10/test/jdk/java/foreign/libTestUpcallStructScope.c --- openjdk-25-25.0.1+8/test/jdk/java/foreign/libTestUpcallStructScope.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/foreign/libTestUpcallStructScope.c 2025-12-18 08:04:02.000000000 +0000 @@ -28,3 +28,7 @@ EXPORT void do_upcall(void (*cb)(struct S_PDI), struct S_PDI a0) { cb(a0); } + +EXPORT void do_upcall_ptr(void (*cb)(struct S_PDI, void*), struct S_PDI a0, void* ptr) { + cb(a0, ptr); +} diff -Nru openjdk-25-25.0.1+8/test/jdk/java/io/File/MaxPathLength.java openjdk-25-25.0.2+10/test/jdk/java/io/File/MaxPathLength.java --- openjdk-25-25.0.1+8/test/jdk/java/io/File/MaxPathLength.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/io/File/MaxPathLength.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2013, 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 @@ -24,30 +24,31 @@ /* @test @bug 4759207 4403166 4165006 4403166 6182812 6274272 7160013 @summary Test to see if win32 path length can be greater than 260 + @library .. /test/lib */ import java.io.*; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.DirectoryNotEmptyException; +import jdk.test.lib.Platform; public class MaxPathLength { private static String sep = File.separator; private static String pathComponent = sep + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; private static String fileName = - "areallylongfilenamethatsforsur"; - private static boolean isWindows = false; + "areallylongfilenamethatsforsur"; private static final int MAX_LENGTH = 256; + private static final int FILE_EXISTS_SLEEP = 100; + + private static final int MAX_PATH_COMPONENTS_WINDOWS = 20; + private static int counter = 0; public static void main(String[] args) throws Exception { - String osName = System.getProperty("os.name"); - if (osName.startsWith("Windows")) { - isWindows = true; - } for (int i = 4; i < 7; i++) { String name = fileName; @@ -59,14 +60,9 @@ } // test long paths on windows - // And these long pathes cannot be handled on Solaris and Mac platforms - if (isWindows) { - String name = fileName; - while (name.length() < MAX_LENGTH) { - testLongPath (20, name, false); - testLongPath (20, name, true); - name = getNextName(name); - } + // And these long paths cannot be handled on Linux and Mac platforms + if (Platform.isWindows()) { + testLongPath(); } } @@ -146,7 +142,7 @@ if (flist == null || !fn.equals(flist[0].getName())) throw new RuntimeException ("File.listFiles() failed"); - if (isWindows && + if (Platform.isWindows() && !fu.getCanonicalPath().equals(f.getCanonicalPath())) throw new RuntimeException ("getCanonicalPath() failed"); @@ -162,7 +158,7 @@ String abPath = f.getAbsolutePath(); if (!abPath.startsWith("\\\\") || abPath.length() < 1093) { - throw new RuntimeException ("File.renameTo() failed for lenth=" + throw new RuntimeException ("File.renameTo() failed for length=" + abPath.length()); } } else { @@ -189,7 +185,7 @@ Files.deleteIfExists(p); // Test if the file is really deleted and wait for 1 second at most for (int j = 0; j < 10 && Files.exists(p); j++) { - Thread.sleep(100); + Thread.sleep(FILE_EXISTS_SLEEP); } } catch (DirectoryNotEmptyException ex) { // Give up the clean-up, let jtreg handle it. @@ -199,4 +195,13 @@ } } } -} + + private static void testLongPath () throws Exception { + String name = fileName; + while (name.length() < MAX_LENGTH) { + testLongPath(MAX_PATH_COMPONENTS_WINDOWS, name, false); + testLongPath(MAX_PATH_COMPONENTS_WINDOWS, name, true); + name = getNextName(name); + } + } +} \ No newline at end of file diff -Nru openjdk-25-25.0.1+8/test/jdk/java/io/File/SymLinks.java openjdk-25-25.0.2+10/test/jdk/java/io/File/SymLinks.java --- openjdk-25-25.0.1+8/test/jdk/java/io/File/SymLinks.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/io/File/SymLinks.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 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 @@ -281,22 +281,7 @@ assertTrue(link2dir.isDirectory()); assertTrue(link2link2dir.isDirectory()); - // on Windows we test with the DOS hidden attribute set - if (System.getProperty("os.name").startsWith("Windows")) { - DosFileAttributeView view = Files - .getFileAttributeView(file.toPath(), DosFileAttributeView.class); - view.setHidden(true); - try { - assertTrue(file.isHidden()); - assertTrue(link2file.isHidden()); - assertTrue(link2link2file.isHidden()); - } finally { - view.setHidden(false); - } - assertFalse(file.isHidden()); - assertFalse(link2file.isHidden()); - assertFalse(link2link2file.isHidden()); - } + testDOSHiddenAttributes(); header("length"); @@ -362,6 +347,26 @@ } } + static void testDOSHiddenAttributes() throws IOException { + // on Windows we test with the DOS hidden attribute set + if (System.getProperty("os.name").startsWith("Windows")) { + header("testDOSHiddenAttributes"); + DosFileAttributeView view = Files + .getFileAttributeView(file.toPath(), DosFileAttributeView.class); + view.setHidden(true); + try { + assertTrue(file.isHidden()); + assertTrue(link2file.isHidden()); + assertTrue(link2link2file.isHidden()); + } finally { + view.setHidden(false); + } + assertFalse(file.isHidden()); + assertFalse(link2file.isHidden()); + assertFalse(link2link2file.isHidden()); + } + } + public static void main(String[] args) throws IOException { if (supportsSymLinks(top)) { try { diff -Nru openjdk-25-25.0.1+8/test/jdk/java/io/FileDescriptor/Sync.java openjdk-25-25.0.2+10/test/jdk/java/io/FileDescriptor/Sync.java --- openjdk-25-25.0.1+8/test/jdk/java/io/FileDescriptor/Sync.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/io/FileDescriptor/Sync.java 2025-12-18 08:04:02.000000000 +0000 @@ -39,7 +39,7 @@ public class Sync { static final String TEST_DIR = System.getProperty("test.dir", "."); - static final int TRIES = 10_000; + static final int TRIES = 1_000; public static void testWith(File file) throws Exception { try (FileOutputStream fos = new FileOutputStream(file)) { diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/Math/FusedMultiplyAddTests.java openjdk-25-25.0.2+10/test/jdk/java/lang/Math/FusedMultiplyAddTests.java --- openjdk-25-25.0.1+8/test/jdk/java/lang/Math/FusedMultiplyAddTests.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/Math/FusedMultiplyAddTests.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2022, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 4851642 8253409 + * @bug 4851642 8253409 8362207 * @summary Tests for Math.fusedMac and StrictMath.fusedMac. * @build Tests * @build FusedMultiplyAddTests @@ -352,8 +352,9 @@ {1.0f+Math.ulp(1.0f), 1.0f+Math.ulp(1.0f), -1.0f-2.0f*Math.ulp(1.0f), Math.ulp(1.0f)*Math.ulp(1.0f)}, - // Double-rounding if done in double precision - {0x1.fffffep23f, 0x1.000004p28f, 0x1.fep5f, 0x1.000002p52f} + // Double-rounding if done in double precision and/or double fma + {0x1.fffffep23f, 0x1.000004p28f, 0x1.fep5f, 0x1.000002p52f}, + {0x1.001p0f, 0x1.001p0f, 0x1p-100f, 0x1.002002p0f}, }; for (float[] testCase: testCases) diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/ProcessBuilder/Basic.java openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessBuilder/Basic.java --- openjdk-25-25.0.1+8/test/jdk/java/lang/ProcessBuilder/Basic.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessBuilder/Basic.java 2025-12-18 08:04:02.000000000 +0000 @@ -28,7 +28,7 @@ * 6464154 6523983 6206031 4960438 6631352 6631966 6850957 6850958 * 4947220 7018606 7034570 4244896 5049299 8003488 8054494 8058464 * 8067796 8224905 8263729 8265173 8272600 8231297 8282219 8285517 - * 8352533 + * 8352533 8368192 * @key intermittent * @summary Basic tests for Process and Environment Variable code * @modules java.base/java.lang:open @@ -696,7 +696,7 @@ public static String path() { return path; } private static final String path = path0(); private static String path0(){ - if (!Platform.isBusybox("/bin/true")) { + if (!Files.isSymbolicLink(Paths.get("/bin/true"))) { return "/bin/true"; } else { File trueExe = new File("true"); @@ -711,7 +711,7 @@ public static String path() { return path; } private static final String path = path0(); private static String path0(){ - if (!Platform.isBusybox("/bin/false")) { + if (!Files.isSymbolicLink(Paths.get("/bin/false"))) { return "/bin/false"; } else { File falseExe = new File("false"); @@ -777,30 +777,29 @@ return Pattern.compile(regex).matcher(str).find(); } - private static String matchAndExtract(String str, String regex) { - Matcher matcher = Pattern.compile(regex).matcher(str); - if (matcher.find()) { - return matcher.group(); - } else { - return ""; - } + // Return the string with the matching regex removed + private static String matchAndRemove(String str, String regex) { + return Pattern.compile(regex) + .matcher(str) + .replaceAll(""); } /* Only used for Mac OS X -- - * Mac OS X (may) add the variable __CF_USER_TEXT_ENCODING to an empty - * environment. The environment variable JAVA_MAIN_CLASS_ may also - * be set in Mac OS X. - * Remove them both from the list of env variables + * Mac OS X (may) add the variables: __CF_USER_TEXT_ENCODING, JAVA_MAIN_CLASS_, + * and TMPDIR. + * Remove them from the list of env variables */ private static String removeMacExpectedVars(String vars) { // Check for __CF_USER_TEXT_ENCODING - String cleanedVars = vars.replace("__CF_USER_TEXT_ENCODING=" - +cfUserTextEncoding+",",""); + String cleanedVars = matchAndRemove(vars, + "__CF_USER_TEXT_ENCODING=" + cfUserTextEncoding + ","); // Check for JAVA_MAIN_CLASS_ - String javaMainClassStr - = matchAndExtract(cleanedVars, - "JAVA_MAIN_CLASS_\\d+=Basic.JavaChild,"); - return cleanedVars.replace(javaMainClassStr,""); + cleanedVars = matchAndRemove(cleanedVars, + "JAVA_MAIN_CLASS_\\d+=Basic.JavaChild,"); + // Check and remove TMPDIR + cleanedVars = matchAndRemove(cleanedVars, + "TMPDIR=[^,]*,"); + return cleanedVars; } /* Only used for AIX -- diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/TestChildSignalDisposition.java openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/TestChildSignalDisposition.java --- openjdk-25-25.0.1+8/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/TestChildSignalDisposition.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/TestChildSignalDisposition.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,70 @@ +/* + * 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 id=posix_spawn + * @bug 8364611 + * @summary Check that childs start with SIG_DFL as SIGPIPE disposition + * @requires os.family != "windows" + * @library /test/lib + * @run main/othervm/native -Djdk.lang.Process.launchMechanism=posix_spawn -agentlib:ChangeSignalDisposition TestChildSignalDisposition + */ + +/** + * @test id=fork + * @bug 8364611 + * @summary Check that childs start with SIG_DFL as SIGPIPE disposition + * @requires os.family != "windows" + * @library /test/lib + * @run main/othervm/native -Djdk.lang.Process.launchMechanism=fork -agentlib:ChangeSignalDisposition TestChildSignalDisposition + */ + +/** + * @test id=vfork + * @bug 8364611 + * @summary Check that childs start with SIG_DFL as SIGPIPE disposition + * @requires os.family == "linux" + * @library /test/lib + * @run main/othervm/native -Djdk.lang.Process.launchMechanism=vfork -agentlib:ChangeSignalDisposition TestChildSignalDisposition + */ + +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; +public class TestChildSignalDisposition { + // This test has two native parts: + // - a library injected into the JVM with -agentlib changes signal disposition of the VM process for SIGPIPE to + // SIG_IGN + // - a small native executable that prints out, in its main function, all signal handler dispositions, to be executed + // as a child process. + // + // What should happen: In child process, SIGPIPE should be set to default. + public static void main(String[] args) throws Exception { + ProcessBuilder pb = ProcessTools.createNativeTestProcessBuilder("PrintSignalDisposition"); + OutputAnalyzer output = ProcessTools.executeProcess(pb); + output.shouldHaveExitValue(0); + output.shouldNotMatch("SIGPIPE: +ignore"); + output.shouldNotMatch("SIGPIPE: +block"); + output.shouldMatch("SIGPIPE: +default"); + output.reportDiagnosticSummary(); + } +} diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/exePrintSignalDisposition.c openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/exePrintSignalDisposition.c --- openjdk-25-25.0.1+8/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/exePrintSignalDisposition.c 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/exePrintSignalDisposition.c 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2021, 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 +#include "jvmti.h" +#include +#include +#include + +static const struct { int sig; const char* name; } signals[] = { + { SIGABRT, "SIGABRT" }, { SIGALRM, "SIGALRM" }, { SIGBUS, "SIGBUS" }, { SIGCHLD, "SIGCHLD" }, { SIGCONT, "SIGCONT" }, + { SIGFPE, "SIGFPE" }, { SIGHUP, "SIGHUP" }, { SIGILL, "SIGILL" }, { SIGINT, "SIGINT" }, { SIGKILL, "SIGKILL" }, + { SIGPIPE, "SIGPIPE" }, { SIGQUIT, "SIGQUIT" }, { SIGSEGV, "SIGSEGV" }, { SIGSTOP, "SIGSTOP" }, { SIGTERM, "SIGTERM" }, + { SIGTSTP, "SIGTSTP" }, { SIGTTIN, "SIGTTIN" }, { SIGTTOU, "SIGTTOU" }, { SIGUSR1, "SIGUSR1" }, { SIGUSR2, "SIGUSR2" }, +#ifdef SIGPOLL + { SIGPOLL, "SIGPOLL" }, +#endif + { SIGPROF, "SIGPROF" }, { SIGSYS, "SIGSYS" }, { SIGTRAP, "SIGTRAP" }, { SIGURG, "SIGURG" }, { SIGVTALRM, "SIGVTALRM" }, + { SIGXCPU, "SIGXCPU" }, { SIGXFSZ, "SIGXFSZ" }, { -1, NULL } +}; + +int main(int argc, char** argv) { + + printf("PID: %d\n", getpid()); + + sigset_t current_mask; + sigemptyset(¤t_mask); + if (sigprocmask(SIG_BLOCK /* ignored */, NULL, ¤t_mask) != 0) { + printf("sigprocmask %d\n", errno); + return -1; + } + + for (int n = 0; signals[n].sig != -1; n++) { + printf("%s: ", signals[n].name); + if (sigismember(¤t_mask, signals[n].sig)) { + printf("blocked "); + } + struct sigaction act; + if (sigaction(signals[n].sig, NULL, &act) != 0) { + printf("sigaction %d\n", errno); + printf("\n"); + continue; + } + const void* const handler = (act.sa_flags & SA_SIGINFO ? + (void*)act.sa_sigaction : (void*)act.sa_handler); + if (handler == (void*)SIG_DFL) { + printf("default "); + } else if (handler == (void*)SIG_IGN) { + printf("ignore "); + } else if (handler == (void*)SIG_HOLD) { + printf("hold "); + } else { + printf("%p ", handler); + } +#ifdef _AIX + printf("%X\n", act.sa_flags); +#else + printf("%X %X\n", act.sa_flags, act.sa_mask); +#endif + } + + return 0; +} diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/libChangeSignalDisposition.c openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/libChangeSignalDisposition.c --- openjdk-25-25.0.1+8/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/libChangeSignalDisposition.c 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessBuilder/childSignalDisposition/libChangeSignalDisposition.c 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,40 @@ +/* + * 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. + */ + +#include +#include "jvmti.h" +#include +#include + +JNIEXPORT jint JNICALL +Agent_OnLoad(JavaVM *jvm, char *options, void *reserved) { + + if (signal(SIGPIPE, SIG_IGN) != SIG_ERR) { + printf("changed signal disposition for SIGPIPE to SIG_IGN\n"); + } else { + printf("FAILED to change signal disposition for SIGPIPE to SIG_IGN (%d)\n", errno); + return JNI_ERR; + } + + return JNI_OK; +} diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/ProcessHandle/InfoTest.java openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessHandle/InfoTest.java --- openjdk-25-25.0.1+8/test/jdk/java/lang/ProcessHandle/InfoTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/ProcessHandle/InfoTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -295,10 +295,12 @@ String expected = "sleep"; if (Platform.isWindows()) { expected = "sleep.exe"; - } else if (Platform.isBusybox("/bin/sleep")) { - // With busybox sleep is just a sym link to busybox. - // The busbox executable is seen as ProcessHandle.Info command. - expected = "busybox"; + } else if (Files.isSymbolicLink(Paths.get("/bin/sleep"))) { + // Busybox sleep is a symbolic link to /bin/busybox. + // Rust coreutils sleep is a symbolic link to coreutils + // The busbox/coreutils executables are seen as ProcessHandle.Info command. + Path executable = Files.readSymbolicLink(Paths.get("/bin/sleep")); + expected = executable.getFileName().toString(); } Assert.assertTrue(command.endsWith(expected), "Command: expected: \'" + expected + "\', actual: " + command); diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/ExitLogging-ALL.properties openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-ALL.properties --- openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/ExitLogging-ALL.properties 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-ALL.properties 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,8 @@ +############################################################ +# java.lang.Runtime logging level to console to ALL +############################################################ + +handlers= java.util.logging.ConsoleHandler + +java.util.logging.ConsoleHandler.level = ALL +java.lang.Runtime.level = ALL diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/ExitLogging-FINE.properties openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-FINE.properties --- openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/ExitLogging-FINE.properties 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-FINE.properties 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ ############################################################ -# Enable logging java.lang.Runtime to the console +# java.lang.Runtime logging level to console to FINE ############################################################ handlers= java.util.logging.ConsoleHandler diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/ExitLogging-FINER.properties openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-FINER.properties --- openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/ExitLogging-FINER.properties 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-FINER.properties 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,8 @@ +############################################################ +# java.lang.Runtime logging level to console to FINER +############################################################ + +handlers= java.util.logging.ConsoleHandler + +java.util.logging.ConsoleHandler.level = ALL +java.lang.Runtime.level = FINER diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/ExitLogging-INFO.properties openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-INFO.properties --- openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/ExitLogging-INFO.properties 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-INFO.properties 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ ############################################################ -# Enable logging java.lang.Runtime to the console +# java.lang.Runtime logging level to console to INFO ############################################################ handlers= java.util.logging.ConsoleHandler diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/ExitLogging-OFF.properties openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-OFF.properties --- openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/ExitLogging-OFF.properties 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-OFF.properties 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,8 @@ +############################################################ +# java.lang.Runtime logging level to console to OFF +############################################################ + +handlers= java.util.logging.ConsoleHandler + +java.util.logging.ConsoleHandler.level = ALL +java.lang.Runtime.level = OFF diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/ExitLogging-SEVERE.properties openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-SEVERE.properties --- openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/ExitLogging-SEVERE.properties 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-SEVERE.properties 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,8 @@ +############################################################ +# java.lang.Runtime logging level to console to SEVERE +############################################################ + +handlers= java.util.logging.ConsoleHandler + +java.util.logging.ConsoleHandler.level = ALL +java.lang.Runtime.level = SEVERE diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/ExitLogging-WARNING.properties openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-WARNING.properties --- openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/ExitLogging-WARNING.properties 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/ExitLogging-WARNING.properties 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,8 @@ +############################################################ +# java.lang.Runtime logging level to console to WARNING +############################################################ + +handlers= java.util.logging.ConsoleHandler + +java.util.logging.ConsoleHandler.level = ALL +java.lang.Runtime.level = WARNING diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/RuntimeExitLogTest.java openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/RuntimeExitLogTest.java --- openjdk-25-25.0.1+8/test/jdk/java/lang/RuntimeTests/RuntimeExitLogTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/RuntimeTests/RuntimeExitLogTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 @@ -49,7 +49,7 @@ private static final String TEST_JDK = System.getProperty("test.jdk"); private static final String TEST_SRC = System.getProperty("test.src"); - + private static final String NEW_LINE = System.lineSeparator(); private static Object HOLD_LOGGER; /** @@ -65,30 +65,79 @@ } /** + * Generate a regular expression pattern that match the expected log output for a Runtime.exit() call. + * The pattern includes the method call stack trace and the exit status. + * @param status the exit status passed to the Runtime.exit() call + * @return the regex pattern as a string + */ + private static String generateStackTraceLogPattern(int status) { + return "(?s)^.+ java\\.lang\\.Shutdown logRuntimeExit\\n" + + ".*: Runtime\\.exit\\(\\) called with status: " + status + "\\n" + + "java\\.lang\\.Throwable: Runtime\\.exit\\(" + status + "\\)\\n" + + "\\s+at java\\.base/java\\.lang\\.Shutdown\\.logRuntimeExit\\(Shutdown\\.java:\\d+\\)\\n" + + "\\s+at(?: .+)"; + } + + /** * Test various log level settings, and none. * @return a stream of arguments for parameterized test */ private static Stream logParamProvider() { return Stream.of( - // Logging enabled with level DEBUG + // Logging configuration using the java.util.logging.config.file property + Arguments.of(List.of("-Djava.util.logging.config.file=" + + Path.of(TEST_SRC, "ExitLogging-ALL.properties").toString()), 1, + generateStackTraceLogPattern(1)), + Arguments.of(List.of("-Djava.util.logging.config.file=" + + Path.of(TEST_SRC, "ExitLogging-FINER.properties").toString()), 2, + generateStackTraceLogPattern(2)), Arguments.of(List.of("-Djava.util.logging.config.file=" + - Path.of(TEST_SRC, "ExitLogging-FINE.properties").toString()), 1, - "Runtime.exit() called with status: 1"), - // Logging disabled due to level + Path.of(TEST_SRC, "ExitLogging-FINE.properties").toString()), 3, + generateStackTraceLogPattern(3)), + Arguments.of(List.of("-Djava.util.logging.config.file=" + + Path.of(TEST_SRC, "ExitLogging-INFO.properties").toString()), 4, + ""), + Arguments.of(List.of("-Djava.util.logging.config.file=" + + Path.of(TEST_SRC, "ExitLogging-WARNING.properties").toString()), 5, + ""), + Arguments.of(List.of("-Djava.util.logging.config.file=" + + Path.of(TEST_SRC, "ExitLogging-SEVERE.properties").toString()), 6, + ""), Arguments.of(List.of("-Djava.util.logging.config.file=" + - Path.of(TEST_SRC, "ExitLogging-INFO.properties").toString()), 2, + Path.of(TEST_SRC, "ExitLogging-OFF.properties").toString()), 7, ""), - // Console logger + + // Logging configuration using the jdk.system.logger.level property + Arguments.of(List.of("--limit-modules", "java.base", + "-Djdk.system.logger.level=ALL"), 8, + generateStackTraceLogPattern(8)), + Arguments.of(List.of("--limit-modules", "java.base", + "-Djdk.system.logger.level=TRACE"), 9, + generateStackTraceLogPattern(9)), + Arguments.of(List.of("--limit-modules", "java.base", + "-Djdk.system.logger.level=DEBUG"), 10, + generateStackTraceLogPattern(10)), Arguments.of(List.of("--limit-modules", "java.base", - "-Djdk.system.logger.level=DEBUG"), 3, - "Runtime.exit() called with status: 3"), - // Console logger - Arguments.of(List.of(), 4, ""), + "-Djdk.system.logger.level=INFO"), 11, + ""), + Arguments.of(List.of("--limit-modules", "java.base", + "-Djdk.system.logger.level=WARNING"), 12, + ""), + Arguments.of(List.of("--limit-modules", "java.base", + "-Djdk.system.logger.level=ERROR"), 13, + ""), + Arguments.of(List.of("--limit-modules", "java.base", + "-Djdk.system.logger.level=OFF"), 14, + ""), + // Throwing Handler Arguments.of(List.of("-DThrowingHandler", "-Djava.util.logging.config.file=" + - Path.of(TEST_SRC, "ExitLogging-FINE.properties").toString()), 5, - "Runtime.exit(5) logging failed: Exception in publish") + Path.of(TEST_SRC, "ExitLogging-FINE.properties").toString()), 15, + "Runtime\\.exit\\(15\\) logging failed: Exception in publish"), + + // Default console logging configuration with no additional parameters + Arguments.of(List.of(), 16, "") ); } @@ -115,13 +164,14 @@ try (BufferedReader reader = process.inputReader()) { List lines = reader.lines().toList(); boolean match = (expectMessage.isEmpty()) - ? lines.size() == 0 - : lines.stream().filter(s -> s.contains(expectMessage)).findFirst().isPresent(); + ? lines.isEmpty() + : String.join("\n", lines).matches(expectMessage); if (!match) { // Output lines for debug - System.err.println("Expected: \"" + expectMessage + "\""); + System.err.println("Expected pattern (line-break):"); + System.err.println(expectMessage.replaceAll("\\n", NEW_LINE)); System.err.println("---- Actual output begin"); - lines.forEach(l -> System.err.println(l)); + lines.forEach(System.err::println); System.err.println("---- Actual output end"); fail("Unexpected log contents"); } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/String/nativeEncoding/libstringPlatformChars.c openjdk-25-25.0.2+10/test/jdk/java/lang/String/nativeEncoding/libstringPlatformChars.c --- openjdk-25-25.0.1+8/test/jdk/java/lang/String/nativeEncoding/libstringPlatformChars.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/String/nativeEncoding/libstringPlatformChars.c 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -58,19 +58,23 @@ char* str; int len = (*env)->GetArrayLength(env, bytes); int i; - jbyte* jbytes; - - str = (char*)malloc(len + 1); - jbytes = (*env)->GetPrimitiveArrayCritical(env, bytes, NULL); + jbyte* jbytes = (*env)->GetPrimitiveArrayCritical(env, bytes, NULL); if (jbytes == NULL) { return NULL; } + str = (char*)malloc(len + 1); + if (str == NULL) { + (*env)->ReleasePrimitiveArrayCritical(env, bytes, (void*)jbytes, 0); + return NULL; + } for (i = 0; i < len; i++) { str[i] = (char)jbytes[i]; } str[len] = '\0'; (*env)->ReleasePrimitiveArrayCritical(env, bytes, (void*)jbytes, 0); - return JNU_NewStringPlatform(env, str); + jstring res = JNU_NewStringPlatform(env, str); + free(str); + return res; } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/Thread/virtual/ParkWithFixedThreadPool.java openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/ParkWithFixedThreadPool.java --- openjdk-25-25.0.1+8/test/jdk/java/lang/Thread/virtual/ParkWithFixedThreadPool.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/ParkWithFixedThreadPool.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenBlocking.java openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenBlocking.java --- openjdk-25-25.0.1+8/test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenBlocking.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenBlocking.java 2025-12-18 08:04:02.000000000 +0000 @@ -53,8 +53,8 @@ int iterations; int value = Integer.parseInt(args[0]); - if (Platform.isOSX() && Platform.isX64()) { - // reduced iterations on macosx-x64 + if (Platform.isOSX()) { + // reduced iterations on macosx iterations = Math.max(value / 4, 1); } else { iterations = value; diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java --- openjdk-25-25.0.1+8/test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java 2025-12-18 08:04:02.000000000 +0000 @@ -56,8 +56,8 @@ int iterations; int value = Integer.parseInt(args[0]); - if (Platform.isOSX() && Platform.isX64()) { - // reduced iterations on macosx-x64 + if (Platform.isOSX()) { + // reduced iterations on macosx iterations = Math.max(value / 4, 1); } else { iterations = value; diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/Thread/virtual/stress/ParkALot.java openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/stress/ParkALot.java --- openjdk-25-25.0.1+8/test/jdk/java/lang/Thread/virtual/stress/ParkALot.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/Thread/virtual/stress/ParkALot.java 2025-12-18 08:04:02.000000000 +0000 @@ -49,8 +49,8 @@ public static void main(String[] args) throws Exception { int iterations; int value = Integer.parseInt(args[0]); - if (Platform.isOSX() && Platform.isX64()) { - // reduced iterations on macosx-x64 + if (Platform.isOSX()) { + // reduced iterations on macosx iterations = Math.max(value / 4, 1); } else { iterations = value; diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/instrument/RetransformBigClassTest.java openjdk-25-25.0.2+10/test/jdk/java/lang/instrument/RetransformBigClassTest.java --- openjdk-25-25.0.1+8/test/jdk/java/lang/instrument/RetransformBigClassTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/instrument/RetransformBigClassTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,161 @@ +/* + * Copyright Amazon.com Inc. 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 8277444 + * + * @library /test/lib + * @compile SimpleIdentityTransformer.java + * @run shell MakeJAR.sh retransformAgent + * @run main/othervm -javaagent:retransformAgent.jar RetransformBigClassTest + */ + +import jdk.test.lib.compiler.InMemoryJavaCompiler; + +/* + * JvmtiClassFileReconstituter::copy_bytecodes restores bytecodes rewritten + * by the linking process. It is used by RetransformClasses. + * JDK-8277444 is a data race between copy_bytecodes and the linking process. + * This test puts the linking process in one thread and the retransforming process + * in another thread. The test uses Class.forName("BigClass", false, classLoader) + * which does not link the class. When the class is used, the linking process starts. + * In another thread retransforming of the class is happening. + * We generate a class with big methods. A number of methods and their size are + * chosen to make the linking and retransforming processes run concurrently. + * We delay the retransforming process to follow the linking process. + * If there is no synchronization between the processes, a data race will happen. + */ +public class RetransformBigClassTest extends AInstrumentationTestCase { + + private static final Object LOCK = new Object(); + private static final int COUNTER_INC_COUNT = 2000; // A number of 'c+=1;' statements in methods of a class. + private static final int MIN_LINK_TIME_MS = 60; // Large enough so the linking and retransforming processes run in parallel. + private static final int RETRANSFORM_CLASSES_DELAY_MS = 37; // We manage to create a data race when a delay is in the range 0.52x - 0.62x of MIN_LINK_TIME_MS. + + private static Class bigClass; + private static byte[] bigClassBytecode; + + private Thread retransformThread; + + RetransformBigClassTest() { + super("RetransformBigClassTest"); + } + + public static void main(String[] args) throws Throwable { + new RetransformBigClassTest().runTest(); + } + + protected final void doRunTest() throws Throwable { + ClassLoader classLoader = new ClassLoader() { + @Override + protected Class findClass(String name) throws ClassNotFoundException { + if (name.equals("BigClass")) { + return defineClass(name, bigClassBytecode, 0, bigClassBytecode.length); + } + + return super.findClass(name); + } + }; + synchronized (LOCK) { + bigClass = Class.forName("BigClass", false, classLoader); + LOCK.notify(); + } + // Make a use of the BigClass + assertTrue(bigClass.getConstructor().newInstance().hashCode() != 0); + retransformThread.join(); + } + + private byte[] createClassBytecode(String className, int methodCount) throws Exception { + String methodBody = ""; + for (int j = 0; j < COUNTER_INC_COUNT; j++) { + methodBody += "c+=1;"; + } + + String classSrc = "public class " + className + " { int c;"; + + for (int i = 0; i < methodCount; i++) { + classSrc += "\npublic void m" + i + "(){"; + classSrc += methodBody; + classSrc += "\n}"; + } + classSrc += "\n}"; + + return InMemoryJavaCompiler.compile(className, classSrc); + } + + // We need a number of methods such that the linking time is greater than + // or equal to MIN_LINK_TIME_MS. + // We create a class having 5 methods and trigger the linking process. + // We measure the time taken and use it to calculate the needed number. + private int findMethodCount() throws Exception { + int methodCount = 5; + final String className = "BigClass" + methodCount; + final byte[] bytecode = createClassBytecode(className, methodCount); + ClassLoader classLoader = new ClassLoader() { + @Override + protected Class findClass(String name) throws ClassNotFoundException { + if (name.equals(className)) { + return defineClass(name, bytecode, 0, bytecode.length); + } + + return super.findClass(name); + } + }; + var bigClass = Class.forName(className, false, classLoader); + long startTime = System.nanoTime(); + assertTrue(bigClass.getConstructor().newInstance().hashCode() != 0); + double linkTimeMs = (System.nanoTime() - startTime) / 1000000.0; + System.out.println("Link time for a class with " + methodCount + " methods each having " + COUNTER_INC_COUNT + " counter increments: " + Math.round(linkTimeMs)); + if (linkTimeMs < MIN_LINK_TIME_MS) { + methodCount = (int)Math.round((MIN_LINK_TIME_MS * methodCount) / linkTimeMs); + } + System.out.println("The number of methods to exceed " + MIN_LINK_TIME_MS + " ms linking time: " + methodCount); + return methodCount; + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + + bigClassBytecode = createClassBytecode("BigClass", findMethodCount()); + fInst.addTransformer(new SimpleIdentityTransformer()); + retransformThread = new Thread(() -> { + try { + synchronized (LOCK) { + while (bigClass == null) { + System.out.println("[retransformThread]: Waiting for bigClass"); + LOCK.wait(); + } + } + Thread.sleep(RETRANSFORM_CLASSES_DELAY_MS); + fInst.retransformClasses(bigClass); + } catch (Exception e) { + e.printStackTrace(); + } + }); + retransformThread.start(); + Thread.sleep(100); + } +} diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/invoke/ClassValueTest.java openjdk-25-25.0.2+10/test/jdk/java/lang/invoke/ClassValueTest.java --- openjdk-25-25.0.1+8/test/jdk/java/lang/invoke/ClassValueTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/invoke/ClassValueTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -23,23 +23,23 @@ /* * @test - * @bug 8351045 8351996 - * @enablePreview - * @comment Remove preview if ScopedValue is finalized + * @bug 8351045 8351996 8358535 * @summary tests for class-specific values + * @modules java.base/java.lang:+open * @library /test/lib * @run junit ClassValueTest */ import java.lang.classfile.ClassFile; import java.lang.constant.ClassDesc; +import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; import java.lang.ref.WeakReference; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.Arrays; -import java.util.Iterator; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ThreadLocalRandom; @@ -49,9 +49,7 @@ import jdk.test.lib.util.ForceGC; import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.RepeatedTest; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.Timeout; import static org.junit.jupiter.api.Assertions.*; @@ -479,4 +477,67 @@ awaitThreads(t); assertEquals(42, clv.get(int.class), "slow computation reinstalled value"); } + + // ClassValue cache invalidated and not reinstated when another + // unrelated entry is removed + @Test + public void testCacheRefresh() throws Throwable { + // Setup + var lookup = MethodHandles.privateLookupIn(ClassValue.class, MethodHandles.lookup()); + var classValueEntryClass = Class.forName("java.lang.ClassValue$Entry"); + MethodHandle getCacheCarefully = lookup.findStatic(ClassValue.class, "getCacheCarefully", + MethodType.methodType(classValueEntryClass.arrayType(), Class.class)); + var classValueMapClass = Class.forName("java.lang.ClassValue$ClassValueMap"); + MethodHandle probeHomeLocation = lookup.findStatic(classValueMapClass, "probeHomeLocation", + MethodType.methodType(classValueEntryClass, classValueEntryClass.arrayType(), ClassValue.class)); + MethodHandle match = lookup.findVirtual(ClassValue.class, "match", + MethodType.methodType(boolean.class, classValueEntryClass)); + + // Work + ClassValue clv = new ClassValue<>() { + @Override + protected String computeValue(Class type) { + return ""; + } + }; + // A class that shouldn't have arbitrary values stuffing the cache + var cleanClass = clv.getClass(); + clv.get(cleanClass); // create cache on clean class + assertTrue(checkDirectCacheMatch( + getCacheCarefully, + probeHomeLocation, + match, + clv, + cleanClass + )); + clv.get(int.class); + clv.remove(int.class); // invalidate cache on clean class + assertFalse(checkDirectCacheMatch( + getCacheCarefully, + probeHomeLocation, + match, + clv, + cleanClass + )); + clv.get(cleanClass); + assertTrue(checkDirectCacheMatch( + getCacheCarefully, + probeHomeLocation, + match, + clv, + cleanClass + )); + } + + private static boolean checkDirectCacheMatch( + MethodHandle getCacheCarefully, + MethodHandle probeHomeLocation, + MethodHandle match, + ClassValue clv, + Class cl + ) throws Throwable { + Object cache = getCacheCarefully.invoke(cl); + Object entry = probeHomeLocation.invoke(cache, clv); + return (boolean) match.invoke(clv, entry); + } } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/lang/invoke/MethodTypeTest.java openjdk-25-25.0.2+10/test/jdk/java/lang/invoke/MethodTypeTest.java --- openjdk-25-25.0.1+8/test/jdk/java/lang/invoke/MethodTypeTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/lang/invoke/MethodTypeTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -22,6 +22,7 @@ */ /* @test + * @bug 8366028 * @summary unit tests for java.lang.invoke.MethodType * @compile MethodTypeTest.java * @run testng/othervm test.java.lang.invoke.MethodTypeTest @@ -35,6 +36,8 @@ import java.util.*; import org.testng.*; + +import static org.testng.Assert.assertThrows; import static org.testng.AssertJUnit.*; import org.testng.annotations.*; @@ -218,6 +221,24 @@ return sb.toString().replace('.', '/'); } + @DataProvider(name = "badMethodDescriptorStrings") + public String[] badMethodDescriptorStrings() { + return new String[] { + "(I)", + "(V)V", + "([V)V", + "(" + "[".repeat(256) + "J)I", + "(java/lang/Object)V", + "()java/lang/Object", + }; + } + + // JDK-8366028 + @Test(dataProvider = "badMethodDescriptorStrings", expectedExceptions = IllegalArgumentException.class) + public void testFromMethodDescriptorStringNegatives(String desc) { + MethodType.fromMethodDescriptorString(desc, null); + } + @Test public void testHasPrimitives() { System.out.println("hasPrimitives"); diff -Nru openjdk-25-25.0.1+8/test/jdk/java/net/CookieHandler/B6644726.java openjdk-25-25.0.2+10/test/jdk/java/net/CookieHandler/B6644726.java --- openjdk-25-25.0.1+8/test/jdk/java/net/CookieHandler/B6644726.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/net/CookieHandler/B6644726.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -46,8 +46,8 @@ // Let's test the default path lst.add("myCookie1=foo"); // Then some alternate expires format - lst.add("myCookie2=bar; path=/dir; expires=Tue, 19 Aug 2025 16:00:00 GMT"); - lst.add("myCookie3=test; path=/dir; expires=Tue Aug 19 2025 16:00:00 GMT-0100"); + lst.add("myCookie2=bar; path=/dir; expires=Fri, 19 Aug 4242 16:00:00 GMT"); + lst.add("myCookie3=test; path=/dir; expires=Fri Aug 19 4242 16:00:00 GMT-0100"); // Then Netscape draft cookies and domains lst.add("myCookie4=test; domain=.sun.com; path=/dir/foo"); HashMap> map = new HashMap>(); @@ -64,7 +64,8 @@ List cookies = cs.getCookies(); // There should be 5 cookies if all dates parsed correctly if (cookies.size() != 5) { - fail("Should have 5 cookies. Got only "+ cookies.size() + ", expires probably didn't parse correctly"); + fail("unexpected cookies: " + cookies + ", should have 5 cookies. Got only " + + cookies.size() + ", expires probably didn't parse correctly"); } // Check Path for first Cookie for (HttpCookie c : cookies) { diff -Nru openjdk-25-25.0.1+8/test/jdk/java/net/CookieStoreTest.java openjdk-25-25.0.2+10/test/jdk/java/net/CookieStoreTest.java --- openjdk-25-25.0.1+8/test/jdk/java/net/CookieStoreTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/net/CookieStoreTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,113 @@ +/* + * 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. + */ + +import java.net.CookieManager; +import java.net.CookieStore; +import java.net.HttpCookie; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; + +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; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; + +/* + * @test + * @bug 8365086 + * @summary verify that the implementation of java.net.CookieStore works + * as expected + * @run junit CookieStoreTest + */ +class CookieStoreTest { + + // neither the scheme, host nor the port matters in this test + private static final URI COOKIE_TEST_URI = URI.create("https://127.0.0.1:12345"); + + static List cookieStores() { + final List params = new ArrayList<>(); + // empty CookieStore + params.add(Arguments.of(new CookieManager().getCookieStore(), true)); + + final CookieStore cookieStore = new CookieManager().getCookieStore(); + cookieStore.add(COOKIE_TEST_URI, new HttpCookie("foo", "bar")); + // non-empty CookieStore + params.add(Arguments.of(cookieStore, false)); + + return params; + } + + /* + * Verify that the List returned by CookieStore.getURIs() is immutable. + */ + @ParameterizedTest + @MethodSource("cookieStores") + void testImmutableGetURIs(final CookieStore cookieStore, final boolean expectEmpty) { + final List uris = cookieStore.getURIs(); + assertNotNull(uris, "CookieStore.getURIs() returned null"); + assertEquals(expectEmpty, uris.isEmpty(), "CookieStore.getURIs() returned: " + uris); + assertImmutableList(uris, COOKIE_TEST_URI); + } + + /* + * Verify that the List returned by CookieStore.getCookies() is immutable. + */ + @ParameterizedTest + @MethodSource("cookieStores") + void testImmutableGetCookies(final CookieStore cookieStore, final boolean expectEmpty) { + final List cookies = cookieStore.getCookies(); + assertNotNull(cookies, "CookieStore.getCookies() returned null"); + assertEquals(expectEmpty, cookies.isEmpty(), "CookieStore.getCookies() returned: " + cookies); + assertImmutableList(cookies, new HttpCookie("hello", "world")); + } + + /* + * Verify that the List returned by CookieStore.get(URI) is immutable. + */ + @ParameterizedTest + @MethodSource("cookieStores") + void testImmutableGetCookiesForURI(final CookieStore cookieStore, final boolean expectEmpty) { + final List cookies = cookieStore.get(COOKIE_TEST_URI); + assertNotNull(cookies, "CookieStore.get(URI) returned null"); + assertEquals(expectEmpty, cookies.isEmpty(), "CookieStore.get(URI) returned: " + cookies); + assertImmutableList(cookies, new HttpCookie("hello", "world")); + } + + /* + * Verifies that the attempt to modify the contents of the list will fail + * due to the list being immutable. + */ + private static void assertImmutableList(final List list, T elementToAddOrRemove) { + // the list is expected to be immutable, so each of these operations must fail + assertThrows(UnsupportedOperationException.class, () -> list.add(elementToAddOrRemove)); + assertThrows(UnsupportedOperationException.class, () -> list.remove(elementToAddOrRemove)); + assertThrows(UnsupportedOperationException.class, list::clear); + // even try the replace operation when the list isn't empty + if (!list.isEmpty()) { + assertThrows(UnsupportedOperationException.class, () -> list.set(0, elementToAddOrRemove)); + } + } +} diff -Nru openjdk-25-25.0.1+8/test/jdk/java/net/InetAddress/ptr/Lookup.java openjdk-25-25.0.2+10/test/jdk/java/net/InetAddress/ptr/Lookup.java --- openjdk-25-25.0.1+8/test/jdk/java/net/InetAddress/ptr/Lookup.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/net/InetAddress/ptr/Lookup.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2024, 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 @@ -46,6 +46,7 @@ import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; +import jtreg.SkippedException; public class Lookup { private static final String HOST = "icann.org"; @@ -91,8 +92,7 @@ String tmp = lookupWithIPv4Prefer(); System.out.println("IPv4 lookup results: [" + tmp + "]"); if (SKIP.equals(tmp)) { - System.out.println(HOST + " can't be resolved - test skipped."); - return; + throw new SkippedException(HOST + " can't be resolved - test skipped."); } String[] strs = tmp.split(":"); @@ -104,8 +104,7 @@ tmp = reverseWithIPv4Prefer(addr); System.out.println("IPv4 reverse lookup results: [" + tmp + "]"); if (SKIP.equals(tmp)) { - System.out.println(addr + " can't be resolved with preferIPv4 - test skipped."); - return; + throw new SkippedException(addr + " can't be resolved with preferIPv4 - test skipped."); } strs = tmp.split(":"); diff -Nru openjdk-25-25.0.1+8/test/jdk/java/net/NetworkInterface/IPv4Only.java openjdk-25-25.0.2+10/test/jdk/java/net/NetworkInterface/IPv4Only.java --- openjdk-25-25.0.1+8/test/jdk/java/net/NetworkInterface/IPv4Only.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/net/NetworkInterface/IPv4Only.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 @@ -29,12 +29,18 @@ */ -import java.net.*; -import java.util.*; + import jdk.test.lib.net.IPSupport; +import java.net.Inet6Address; +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.SocketException; +import java.util.Enumeration; + public class IPv4Only { public static void main(String[] args) throws Exception { + IPSupport.printPlatformSupport(System.out); if (IPSupport.hasIPv4()) { System.out.println("Testing IPv4"); Enumeration nifs = NetworkInterface.getNetworkInterfaces(); @@ -43,7 +49,7 @@ Enumeration addrs = nif.getInetAddresses(); while (addrs.hasMoreElements()) { InetAddress hostAddr = addrs.nextElement(); - if ( hostAddr instanceof Inet6Address ){ + if (hostAddr instanceof Inet6Address){ throw new RuntimeException( "NetworkInterfaceV6List failed - found v6 address " + hostAddr.getHostAddress() ); } } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/net/Socket/DeadlockTest.java openjdk-25-25.0.2+10/test/jdk/java/net/Socket/DeadlockTest.java --- openjdk-25-25.0.1+8/test/jdk/java/net/Socket/DeadlockTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/net/Socket/DeadlockTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -31,12 +31,19 @@ * @run main/othervm -Djava.net.preferIPv4Stack=true DeadlockTest */ -import java.net.*; -import java.io.*; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutput; +import java.io.ObjectOutputStream; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.ServerSocket; +import java.net.Socket; + import jdk.test.lib.net.IPSupport; public class DeadlockTest { - public static void main(String [] argv) throws Exception { + public static void main(String[] argv) throws Exception { IPSupport.throwSkippedExceptionIfNonOperational(); ServerSocket ss = new ServerSocket(0, 0, InetAddress.getLoopbackAddress()); @@ -52,16 +59,9 @@ Thread c1 = new Thread(ct); c1.start(); - // Wait for the client thread to finish - c1.join(20000); - - // If timeout, we assume there is a deadlock - if (c1.isAlive() == true) { - // Close the socket to force the server thread - // terminate too - s1.stop(); - throw new Exception("Takes too long. Dead lock"); - } + // Wait for the client thread to finish. + // If it doesn't finish then it's a sign of a deadlock + c1.join(); } finally { ss.close(); clientSocket.close(); @@ -73,7 +73,7 @@ private static boolean dbg = false; - ObjectInputStream in; + ObjectInputStream in; ObjectOutputStream out; ServerSocket server; diff -Nru openjdk-25-25.0.1+8/test/jdk/java/net/httpclient/CancelRequestTest.java openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/CancelRequestTest.java --- openjdk-25-25.0.1+8/test/jdk/java/net/httpclient/CancelRequestTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/CancelRequestTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 @@ -273,8 +273,12 @@ // rewrap in "Request Cancelled" when the multi exchange was aborted... private static boolean isCancelled(Throwable t) { while (t instanceof ExecutionException) t = t.getCause(); - if (t instanceof CancellationException) return true; - if (t instanceof IOException) return String.valueOf(t).contains("Request cancelled"); + Throwable cause = t; + while (cause != null) { + if (cause instanceof CancellationException) return true; + if (cause instanceof IOException && String.valueOf(cause).contains("Request cancelled")) return true; + cause = cause.getCause(); + } out.println("Not a cancellation exception: " + t); t.printStackTrace(out); return false; diff -Nru openjdk-25-25.0.1+8/test/jdk/java/net/httpclient/HttpsTunnelAuthTest.java openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/HttpsTunnelAuthTest.java --- openjdk-25-25.0.1+8/test/jdk/java/net/httpclient/HttpsTunnelAuthTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/HttpsTunnelAuthTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -37,12 +37,11 @@ import java.util.stream.Stream; import javax.net.ssl.SSLContext; import jdk.httpclient.test.lib.common.HttpServerAdapters; -import jdk.httpclient.test.lib.http2.Http2TestServer; import jdk.test.lib.net.SimpleSSLContext; import static java.lang.System.out; -/** +/* * @test * @bug 8262027 * @summary Verify that it's possible to handle proxy authentication manually @@ -62,7 +61,7 @@ //-Djdk.internal.httpclient.debug=true -Dtest.debug=true public class HttpsTunnelAuthTest implements HttpServerAdapters, AutoCloseable { - static final String data[] = { + static final String[] data = { "Lorem ipsum", "dolor sit amet", "consectetur adipiscing elit, sed do eiusmod tempor", @@ -150,7 +149,7 @@ @Override public void close() throws Exception { - if (proxy != null) close(proxy::stop); + if (proxy != null) close(proxy); if (http1Server != null) close(http1Server::stop); if (https1Server != null) close(https1Server::stop); if (https2Server != null) close(https2Server::stop); @@ -160,7 +159,8 @@ try { closeable.close(); } catch (Exception x) { - // OK. + // OK to ignore and just log + System.err.println("ignoring failure during close() of " + closeable + " due to: " + x); } } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/net/httpclient/ManyRequests.java openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ManyRequests.java --- openjdk-25-25.0.1+8/test/jdk/java/net/httpclient/ManyRequests.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ManyRequests.java 2025-12-18 08:04:02.000000000 +0000 @@ -24,6 +24,7 @@ /* * @test * @bug 8087112 8180044 8256459 + * @key intermittent * @modules java.net.http * java.logging * jdk.httpserver diff -Nru openjdk-25-25.0.1+8/test/jdk/java/net/httpclient/ProxyServer.java openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ProxyServer.java --- openjdk-25-25.0.1+8/test/jdk/java/net/httpclient/ProxyServer.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/net/httpclient/ProxyServer.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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,7 +40,7 @@ * Two threads are created per client connection. So, it's not * intended for large numbers of parallel connections. */ -public class ProxyServer extends Thread implements Closeable { +public final class ProxyServer implements Closeable { // could use the test library here - Platform.isWindows(), // but it would force all tests that use ProxyServer to @@ -97,9 +97,7 @@ this(port, debug, null); } - public ProxyServer(Integer port, - Boolean debug, - Credentials credentials) + private ProxyServer(Integer port, Boolean debug, Credentials credentials) throws IOException { this.debug = debug; @@ -108,15 +106,8 @@ listener.bind(new InetSocketAddress(InetAddress.getLoopbackAddress(), port)); this.port = ((InetSocketAddress)listener.getLocalAddress()).getPort(); this.credentials = credentials; - setName("ProxyListener"); - setDaemon(true); - connections = new CopyOnWriteArrayList(); - start(); - } - - public ProxyServer(String s) { - credentials = null; connections = new CopyOnWriteArrayList(); + Thread.ofPlatform().name("ProxyListener").daemon().start(this::run); } /** @@ -148,7 +139,7 @@ volatile boolean done; - public void run() { + private void run() { int id = 0; try { while (!done) { @@ -656,10 +647,11 @@ int port = Integer.parseInt(args[0]); boolean debug = args.length > 1 && args[1].equals("-debug"); System.out.println("Debugging : " + debug); - ProxyServer ps = new ProxyServer(port, debug); - System.out.println("Proxy server listening on port " + ps.getPort()); - while (true) { - Thread.sleep(5000); + try (ProxyServer ps = new ProxyServer(port, debug)) { + System.out.println("Proxy server listening on port " + ps.getPort()); + while (true) { + Thread.sleep(5000); + } } } } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/net/ipv6tests/TcpTest.java openjdk-25-25.0.2+10/test/jdk/java/net/ipv6tests/TcpTest.java --- openjdk-25-25.0.1+8/test/jdk/java/net/ipv6tests/TcpTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/net/ipv6tests/TcpTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -31,6 +31,7 @@ * @library /test/lib * @build jdk.test.lib.NetworkConfiguration * jdk.test.lib.Platform + * jtreg.SkippedException * @run main TcpTest -d */ @@ -38,6 +39,8 @@ import java.io.*; import java.util.concurrent.TimeUnit; +import jtreg.SkippedException; + public class TcpTest extends Tests { static ServerSocket server, server1, server2; static Socket c1, c2, c3, s1, s2, s3; @@ -62,12 +65,10 @@ public static void main (String[] args) throws Exception { checkDebug(args); if (ia4addr == null) { - System.out.println ("No IPV4 addresses: exiting test"); - return; + throw new SkippedException("No IPV4 addresses: exiting test"); } if (ia6addr == null) { - System.out.println ("No IPV6 addresses: exiting test"); - return; + throw new SkippedException("No IPV6 addresses: exiting test"); } dprintln ("Local Addresses"); dprintln (ia4addr.toString()); diff -Nru openjdk-25-25.0.1+8/test/jdk/java/net/vthread/HttpALot.java openjdk-25-25.0.2+10/test/jdk/java/net/vthread/HttpALot.java --- openjdk-25-25.0.1+8/test/jdk/java/net/vthread/HttpALot.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/net/vthread/HttpALot.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test * @bug 8284161 * @summary Stress test the HTTP protocol handler and HTTP server @@ -44,6 +44,7 @@ import java.net.InetSocketAddress; import java.net.Proxy; import java.net.URL; +import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; @@ -52,6 +53,8 @@ public class HttpALot { + private static final String HELLO = "Hello"; + public static void main(String[] args) throws Exception { int requests = 25_000; if (args.length > 0) { @@ -65,12 +68,20 @@ InetAddress lb = InetAddress.getLoopbackAddress(); HttpServer server = HttpServer.create(new InetSocketAddress(lb, 0), 1024); ThreadFactory factory = Thread.ofVirtual().factory(); - server.setExecutor(Executors.newThreadPerTaskExecutor(factory)); + final ExecutorService serverExecutor = Executors.newThreadPerTaskExecutor(factory); + server.setExecutor(serverExecutor); server.createContext("/hello", e -> { - byte[] response = "Hello".getBytes("UTF-8"); - e.sendResponseHeaders(200, response.length); - try (OutputStream out = e.getResponseBody()) { - out.write(response); + try { + byte[] response = HELLO.getBytes("UTF-8"); + e.sendResponseHeaders(200, response.length); + try (OutputStream out = e.getResponseBody()) { + out.write(response); + } + } catch (Throwable t) { + System.err.println("failed to handle request " + e.getRequestURI() + + " due to: " + t); + t.printStackTrace(); + throw t; // let it propagate } requestsHandled.incrementAndGet(); }); @@ -85,15 +96,21 @@ // go server.start(); - try { - factory = Thread.ofVirtual().name("fetcher-", 0).factory(); - try (var executor = Executors.newThreadPerTaskExecutor(factory)) { - for (int i = 1; i <= requests; i++) { - executor.submit(() -> fetch(url)).get(); + try (serverExecutor) { + try { + factory = Thread.ofVirtual().name("fetcher-", 0).factory(); + try (var executor = Executors.newThreadPerTaskExecutor(factory)) { + for (int i = 1; i <= requests; i++) { + final String actual = executor.submit(() -> fetch(url)).get(); + if (!HELLO.equals(actual)) { + throw new RuntimeException("unexpected response: \"" + actual + + "\" for request " + i); + } + } } + } finally { + server.stop(1); } - } finally { - server.stop(1); } if (requestsHandled.get() < requests) { diff -Nru openjdk-25-25.0.1+8/test/jdk/java/nio/Buffer/AllocateDirectInit.java openjdk-25-25.0.2+10/test/jdk/java/nio/Buffer/AllocateDirectInit.java --- openjdk-25-25.0.1+8/test/jdk/java/nio/Buffer/AllocateDirectInit.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/nio/Buffer/AllocateDirectInit.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,29 +23,60 @@ /** * @test - * @bug 4490253 6535542 + * @bug 4490253 6535542 8357959 + * @key randomness + * @library /test/lib + * @build jdk.test.lib.RandomFactory * @summary Verify that newly allocated direct buffers are initialized. + * @run main/othervm AllocateDirectInit */ import java.nio.ByteBuffer; +import java.util.Random; + +import jdk.test.lib.RandomFactory; public class AllocateDirectInit { + private static final int MAX_BIN_LIMIT = 16 * 1024 * 1024; + private static final int MAX_DEC_LIMIT = 10 * 1000 * 1000; + private static final int TRIES_PER_LIMIT = 1024; + + private static final Random RND = RandomFactory.getRandom(); + public static void main(String [] args){ - for (int i = 0; i < 1024; i++) { - ByteBuffer bb = ByteBuffer.allocateDirect(1024); -// printByteBuffer(bb); - for (bb.position(0); bb.position() < bb.limit(); ) { - if ((bb.get() & 0xff) != 0) - throw new RuntimeException("uninitialized buffer, position = " - + bb.position()); + // Try power of two limits + for (int limit = 1; limit < MAX_BIN_LIMIT; limit *= 2) { + check(ByteBuffer.allocateDirect(limit - 1)); + check(ByteBuffer.allocateDirect(limit)); + check(ByteBuffer.allocateDirect(limit + 1)); + } + + // Try power of ten limits + for (int limit = 1; limit < MAX_DEC_LIMIT; limit *= 10) { + check(ByteBuffer.allocateDirect(limit - 1)); + check(ByteBuffer.allocateDirect(limit)); + check(ByteBuffer.allocateDirect(limit + 1)); + } + + // Try random sizes within power of two limits + for (int limit = 1; limit < MAX_BIN_LIMIT; limit *= 2) { + for (int t = 0; t < TRIES_PER_LIMIT; t++) { + check(ByteBuffer.allocateDirect(RND.nextInt(limit))); } } } - private static void printByteBuffer(ByteBuffer bb) { - System.out.print("byte ["); - for (bb.position(0); bb.position() < bb.limit(); ) - System.out.print(" " + Integer.toHexString(bb.get() & 0xff)); - System.out.println(" ]"); + private static void check(ByteBuffer bb) { + while (bb.hasRemaining()) { + if (bb.get() != 0) { + int mismatchPos = bb.position(); + System.out.print("byte ["); + for (bb.position(0); bb.position() < bb.limit(); ) { + System.out.print(" " + Integer.toHexString(bb.get() & 0xff)); + } + System.out.println(" ]"); + throw new RuntimeException("uninitialized buffer, position = " + mismatchPos); + } + } } } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/nio/channels/DatagramChannel/PromiscuousIPv6.java openjdk-25-25.0.2+10/test/jdk/java/nio/channels/DatagramChannel/PromiscuousIPv6.java --- openjdk-25-25.0.1+8/test/jdk/java/nio/channels/DatagramChannel/PromiscuousIPv6.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/nio/channels/DatagramChannel/PromiscuousIPv6.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -30,6 +30,7 @@ * PromiscuousIPv6 * @run main PromiscuousIPv6 * @key randomness + * @requires (os.family == "linux") | (os.family == "mac") */ import java.nio.ByteBuffer; @@ -201,26 +202,15 @@ } } - /* - * returns true if platform allows an IPv6 socket join an IPv4 multicast group - */ - private static boolean supportedByPlatform() { - return Platform.isOSX() || Platform.isLinux(); - } - public static void main(String[] args) throws IOException { boolean hasIPV6MulticastAll; - if (!supportedByPlatform()) { - throw new SkippedException("This test should not be run on this platform"); - } else { - int major = Platform.getOsVersionMajor(); - int minor = Platform.getOsVersionMinor(); - hasIPV6MulticastAll = - Platform.isOSX() || - (Platform.isLinux() && ((major > 4) || ((major == 4 && minor >= 20)))); - } + int major = Platform.getOsVersionMajor(); + int minor = Platform.getOsVersionMinor(); + hasIPV6MulticastAll = + Platform.isOSX() || + (Platform.isLinux() && ((major > 4) || ((major == 4 && minor >= 20)))); NetworkConfiguration.printSystemConfiguration(System.out); List nifs = NetworkConfiguration.probe() diff -Nru openjdk-25-25.0.1+8/test/jdk/java/nio/channels/DatagramChannel/StressNativeSignal.java openjdk-25-25.0.2+10/test/jdk/java/nio/channels/DatagramChannel/StressNativeSignal.java --- openjdk-25-25.0.1+8/test/jdk/java/nio/channels/DatagramChannel/StressNativeSignal.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/nio/channels/DatagramChannel/StressNativeSignal.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2024, 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 @@ -36,42 +36,23 @@ import java.util.concurrent.CountDownLatch; public class StressNativeSignal { - private UDPThread udpThread; - private ServerSocketThread serverSocketThread; + private final UDPThread udpThread; + private final ServerSocketThread serverSocketThread; - StressNativeSignal() { + StressNativeSignal() throws IOException { serverSocketThread = initServerSocketThread(); - if (serverSocketThread != null) { - serverSocketThread.start(); - } + serverSocketThread.start(); udpThread = initUDPThread(); - if (udpThread != null) { - udpThread.start(); - } + udpThread.start(); } - private UDPThread initUDPThread() { - UDPThread aUDPThread = null; - try { - aUDPThread = new UDPThread(); - } catch (Exception z) { - System.err.println("failed to create and start a UDPThread"); - z.printStackTrace(); - } - return aUDPThread; + private UDPThread initUDPThread() throws IOException { + return new UDPThread(); } - private ServerSocketThread initServerSocketThread() { - ServerSocketThread aServerSocketThread = null; - try { - aServerSocketThread = new ServerSocketThread(); - - } catch (Exception z) { - System.err.println("failed to create and start a ServerSocketThread"); - z.printStackTrace(); - } - return aServerSocketThread; + private ServerSocketThread initServerSocketThread() throws IOException { + return new ServerSocketThread(); } public static void main(String[] args) throws Throwable { @@ -80,46 +61,39 @@ test.shutdown(); } - public void shutdown() { - if ((udpThread != null) && udpThread.isAlive()) { + public void shutdown() throws InterruptedException, IOException { + if (udpThread != null && udpThread.isAlive()) { udpThread.terminate(); - try { - udpThread.join(); - } catch (Exception z) { - z.printStackTrace(System.err); - } + udpThread.join(); + } else { System.out.println("UDPThread test scenario was not run"); } - if ((serverSocketThread != null) && (serverSocketThread.isAlive())) { + if (serverSocketThread != null && serverSocketThread.isAlive()) { serverSocketThread.terminate(); - try { - serverSocketThread.join(); - } catch (Exception z) { - z.printStackTrace(System.err); - } + serverSocketThread.join(); } else { System.out.println("ServerSocketThread test scenario was not run"); } } - public void waitForTestThreadsToStart() { - if ((udpThread != null) && udpThread.isAlive()) { + public void waitForTestThreadsToStart() throws InterruptedException { + if (udpThread != null && udpThread.isAlive()) { udpThread.waitTestThreadStart(); } - if ((serverSocketThread != null) && (serverSocketThread.isAlive())) { + if (serverSocketThread != null && serverSocketThread.isAlive()) { serverSocketThread.waitTestThreadStart(); } } public class ServerSocketThread extends Thread { private volatile boolean shouldTerminate; - private ServerSocket socket; + private final ServerSocket socket; private final CountDownLatch threadStarted = new CountDownLatch(1); - public ServerSocketThread () throws Exception { - socket = new ServerSocket(1122); + public ServerSocketThread() throws IOException { + socket = new ServerSocket(0); } public void run() { @@ -129,7 +103,7 @@ Socket client = socket.accept(); client.close(); throw new RuntimeException("Unexpected return from accept call"); - } catch (Exception z) { + } catch (IOException z) { System.err.println("ServerSocketThread: caught exception " + z.getClass().getName()); if (!shouldTerminate) { z.printStackTrace(System.err); @@ -141,7 +115,7 @@ shouldTerminate = true; try { socket.close(); - } catch (Exception z) { + } catch (IOException z) { z.printStackTrace(System.err); // ignore } @@ -150,7 +124,7 @@ public void waitTestThreadStart() { try { threadStarted.await(); - } catch (Exception z) { + } catch (InterruptedException z) { z.printStackTrace(System.err); // ignore } @@ -158,15 +132,14 @@ } public class UDPThread extends Thread { - private DatagramChannel channel; + private final DatagramChannel channel; private volatile boolean shouldTerminate; private final CountDownLatch threadStarted = new CountDownLatch(1); - public UDPThread () throws Exception { - + public UDPThread() throws IOException { channel = DatagramChannel.open(); channel.setOption(StandardSocketOptions.SO_RCVBUF, 6553600); - channel.bind(new InetSocketAddress(19870)); + channel.bind(new InetSocketAddress(0)); } @Override @@ -191,7 +164,7 @@ shouldTerminate = true; try { channel.close(); - } catch (Exception z) { + } catch (IOException z) { System.err.println("UDPThread: caught exception " + z.getClass().getName()); z.printStackTrace(System.err); // ignore @@ -201,7 +174,7 @@ public void waitTestThreadStart() { try { threadStarted.await(); - } catch (Exception z) { + } catch (InterruptedException z) { z.printStackTrace(System.err); // ignore } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/nio/channels/FileChannel/directio/DirectIOTest.java openjdk-25-25.0.2+10/test/jdk/java/nio/channels/FileChannel/directio/DirectIOTest.java --- openjdk-25-25.0.1+8/test/jdk/java/nio/channels/FileChannel/directio/DirectIOTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/nio/channels/FileChannel/directio/DirectIOTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -27,11 +27,13 @@ * @summary Test for ExtendedOpenOption.DIRECT flag * @requires (os.family == "linux" | os.family == "aix") * @library /test/lib + * @modules java.base/sun.nio.ch:+open java.base/java.io:+open * @build jdk.test.lib.Platform * @run main/native DirectIOTest */ import java.io.*; +import java.lang.reflect.Field; import java.nio.ByteBuffer; import java.nio.CharBuffer; import java.nio.channels.*; @@ -47,10 +49,25 @@ public class DirectIOTest { private static final int BASE_SIZE = 4096; + private static final int TRIES = 3; + + public static int getFD(FileChannel channel) throws Exception { + Field fFdFd = channel.getClass().getDeclaredField("fd"); + fFdFd.setAccessible(true); + FileDescriptor fd = (FileDescriptor) fFdFd.get(channel); + + Field fFd = FileDescriptor.class.getDeclaredField("fd"); + fFd.setAccessible(true); + return fFd.getInt(fd); + } + + private static void testWrite(Path p, long blockSize) throws Exception { + try (FileChannel fc = FileChannel.open(p, + StandardOpenOption.READ, + StandardOpenOption.WRITE, + ExtendedOpenOption.DIRECT)) { + int fd = getFD(fc); - private static int testWrite(Path p, long blockSize) throws Exception { - try (FileChannel fc = FileChannel.open(p, StandardOpenOption.WRITE, - ExtendedOpenOption.DIRECT)) { int bs = (int)blockSize; int size = Math.max(BASE_SIZE, bs); int alignment = bs; @@ -60,22 +77,55 @@ for (int j = 0; j < size; j++) { src.put((byte)0); } - src.flip(); - fc.write(src); - return size; + + // If there is AV or other FS tracing software, it may cache the file + // contents on first access, even though we have asked for DIRECT here. + // Do several attempts to make test more resilient. + + for (int t = 0; t < TRIES; t++) { + flushFileCache(size, fd); + src.flip(); + fc.position(0); + fc.write(src); + if (!isFileInCache(size, fd)) { + return; + } + } + + throw new RuntimeException("DirectIO is not working properly with " + + "write. File still exists in cache!"); } } - private static int testRead(Path p, long blockSize) throws Exception { - try (FileChannel fc = FileChannel.open(p, ExtendedOpenOption.DIRECT)) { + private static void testRead(Path p, long blockSize) throws Exception { + try (FileChannel fc = FileChannel.open(p, + StandardOpenOption.READ, + ExtendedOpenOption.DIRECT)) { + int fd = getFD(fc); + int bs = (int)blockSize; int size = Math.max(BASE_SIZE, bs); int alignment = bs; ByteBuffer dest = ByteBuffer.allocateDirect(size + alignment - 1) .alignedSlice(alignment); assert dest.capacity() != 0; - fc.read(dest); - return size; + + // If there is AV or other FS tracing software, it may cache the file + // contents on first access, even though we have asked for DIRECT here. + // Do several attempts to make test more resilient. + + for (int t = 0; t < TRIES; t++) { + flushFileCache(size, fd); + dest.clear(); + fc.position(0); + fc.read(dest); + if (!isFileInCache(size, fd)) { + return; + } + } + + throw new RuntimeException("DirectIO is not working properly with " + + "read. File still exists in cache!"); } } @@ -84,12 +134,8 @@ Paths.get(System.getProperty("test.dir", ".")), "test", null); } - private static boolean isFileInCache(int size, Path p) { - String path = p.toString(); - return isFileInCache0(size, path); - } - - private static native boolean isFileInCache0(int size, String path); + private static native boolean flushFileCache(int size, int fd); + private static native boolean isFileInCache(int size, int fd); public static void main(String[] args) throws Exception { Path p = createTempFile(); @@ -98,16 +144,8 @@ System.loadLibrary("DirectIO"); try { - int size = testWrite(p, blockSize); - if (isFileInCache(size, p)) { - throw new RuntimeException("DirectIO is not working properly with " - + "write. File still exists in cache!"); - } - size = testRead(p, blockSize); - if (isFileInCache(size, p)) { - throw new RuntimeException("DirectIO is not working properly with " - + "read. File still exists in cache!"); - } + testWrite(p, blockSize); + testRead(p, blockSize); } finally { Files.delete(p); } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/nio/channels/FileChannel/directio/libDirectIO.c openjdk-25-25.0.2+10/test/jdk/java/nio/channels/FileChannel/directio/libDirectIO.c --- openjdk-25-25.0.1+8/test/jdk/java/nio/channels/FileChannel/directio/libDirectIO.c 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/nio/channels/FileChannel/directio/libDirectIO.c 2025-12-18 08:04:02.000000000 +0000 @@ -45,13 +45,27 @@ /* * Class: DirectIO - * Method: isFileInCache0 - * Signature: (ILjava/lang/String;)Z + * Method: flushFileCache + * Signature: (II;)V */ -JNIEXPORT jboolean Java_DirectIOTest_isFileInCache0(JNIEnv *env, +JNIEXPORT void Java_DirectIOTest_flushFileCache(JNIEnv *env, jclass cls, jint file_size, - jstring file_path) { + jint fd) { +#ifdef __linux__ + posix_fadvise(fd, 0, file_size, POSIX_FADV_DONTNEED); +#endif +} + +/* + * Class: DirectIO + * Method: isFileInCache + * Signature: (II;)Z + */ +JNIEXPORT jboolean Java_DirectIOTest_isFileInCache(JNIEnv *env, + jclass cls, + jint file_size, + jint fd) { void *f_mmap; #ifdef __linux__ unsigned char *f_seg; @@ -69,17 +83,10 @@ size_t index = (file_size + page_size - 1) /page_size; jboolean result = JNI_FALSE; - const char* path = (*env)->GetStringUTFChars(env, file_path, JNI_FALSE); - - int fd = open(path, O_RDWR); - - (*env)->ReleaseStringUTFChars(env, file_path, path); - f_mmap = mmap(0, file_size, PROT_NONE, MAP_SHARED, fd, 0); if (f_mmap == MAP_FAILED) { - close(fd); ThrowException(env, "java/io/IOException", - "test of whether file exists in cache failed"); + "test of whether file exists in cache failed: mmap failed"); } f_seg = malloc(index); if (f_seg != NULL) { @@ -95,9 +102,8 @@ free(f_seg); } else { ThrowException(env, "java/io/IOException", - "test of whether file exists in cache failed"); + "test of whether file exists in cache failed: malloc failed"); } - close(fd); munmap(f_mmap, file_size); return result; } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/nio/channels/vthread/BlockingChannelOps.java openjdk-25-25.0.2+10/test/jdk/java/nio/channels/vthread/BlockingChannelOps.java --- openjdk-25-25.0.1+8/test/jdk/java/nio/channels/vthread/BlockingChannelOps.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/nio/channels/vthread/BlockingChannelOps.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -21,7 +21,7 @@ * questions. */ -/** +/* * @test id=default * @bug 8284161 * @summary Test virtual threads doing blocking I/O on NIO channels @@ -29,7 +29,7 @@ * @run junit BlockingChannelOps */ -/** +/* * @test id=poller-modes * @requires (os.family == "linux") | (os.family == "mac") * @library /test/lib @@ -37,7 +37,7 @@ * @run junit/othervm -Djdk.pollerMode=2 BlockingChannelOps */ -/** +/* * @test id=no-vmcontinuations * @requires vm.continuations * @library /test/lib @@ -62,6 +62,7 @@ import java.nio.channels.ServerSocketChannel; import java.nio.channels.SocketChannel; import java.nio.channels.WritableByteChannel; +import java.util.concurrent.locks.LockSupport; import jdk.test.lib.thread.VThreadRunner; import org.junit.jupiter.api.Test; @@ -162,6 +163,22 @@ } /** + * SocketChannel shutdownInput while virtual thread blocked in read. + */ + @Test + void testSocketChannelReadAsyncShutdownInput() throws Exception { + VThreadRunner.run(() -> { + try (var connection = new Connection()) { + SocketChannel sc = connection.channel1(); + runAfterParkedAsync(sc::shutdownInput); + int n = sc.read(ByteBuffer.allocate(100)); + assertEquals(-1, n); + assertTrue(sc.isOpen()); + } + }); + } + + /** * Virtual thread interrupted while blocked in SocketChannel read. */ @Test @@ -190,13 +207,15 @@ @Test void testSocketChannelWriteAsyncClose() throws Exception { VThreadRunner.run(() -> { - boolean retry = true; - while (retry) { + boolean done = false; + while (!done) { try (var connection = new Connection()) { SocketChannel sc = connection.channel1(); // close sc when current thread blocks in write - runAfterParkedAsync(sc::close); + runAfterParkedAsync(sc::close, true); + + // write until channel is closed try { ByteBuffer bb = ByteBuffer.allocate(100*1024); for (;;) { @@ -206,11 +225,39 @@ } } catch (AsynchronousCloseException expected) { // closed when blocked in write - retry = false; + done = true; } catch (ClosedChannelException e) { - // closed when not blocked in write, need to retry test + // closed but not blocked in write, need to retry test + System.err.format("%s, need to retry!%n", e); + } + } + } + }); + } + + + /** + * SocketChannel shutdownOutput while virtual thread blocked in write. + */ + @Test + void testSocketChannelWriteAsyncShutdownOutput() throws Exception { + VThreadRunner.run(() -> { + try (var connection = new Connection()) { + SocketChannel sc = connection.channel1(); + + // shutdown output when current thread blocks in write + runAfterParkedAsync(sc::shutdownOutput); + try { + ByteBuffer bb = ByteBuffer.allocate(100*1024); + for (;;) { + int n = sc.write(bb); + assertTrue(n > 0); + bb.clear(); } + } catch (ClosedChannelException e) { + // expected } + assertTrue(sc.isOpen()); } }); } @@ -221,15 +268,16 @@ @Test void testSocketChannelWriteInterrupt() throws Exception { VThreadRunner.run(() -> { - boolean retry = true; - while (retry) { + boolean done = false; + while (!done) { try (var connection = new Connection()) { SocketChannel sc = connection.channel1(); // interrupt current thread when it blocks in write Thread thisThread = Thread.currentThread(); - runAfterParkedAsync(thisThread::interrupt); + runAfterParkedAsync(thisThread::interrupt, true); + // write until channel is closed try { ByteBuffer bb = ByteBuffer.allocate(100*1024); for (;;) { @@ -240,9 +288,10 @@ } catch (ClosedByInterruptException e) { // closed when blocked in write assertTrue(Thread.interrupted()); - retry = false; + done = true; } catch (ClosedChannelException e) { - // closed when not blocked in write, need to retry test + // closed but not blocked in write, need to retry test + System.err.format("%s, need to retry!%n", e); } } } @@ -734,14 +783,16 @@ @Test void testPipeWriteAsyncClose() throws Exception { VThreadRunner.run(() -> { - boolean retry = true; - while (retry) { + boolean done = false; + while (!done) { Pipe p = Pipe.open(); try (Pipe.SinkChannel sink = p.sink(); Pipe.SourceChannel source = p.source()) { // close sink when current thread blocks in write - runAfterParkedAsync(sink::close); + runAfterParkedAsync(sink::close, true); + + // write until channel is closed try { ByteBuffer bb = ByteBuffer.allocate(100*1024); for (;;) { @@ -751,9 +802,10 @@ } } catch (AsynchronousCloseException e) { // closed when blocked in write - retry = false; + done = true; } catch (ClosedChannelException e) { - // closed when not blocked in write, need to retry test + // closed but not blocked in write, need to retry test + System.err.format("%s, need to retry!%n", e); } } } @@ -766,16 +818,17 @@ @Test void testPipeWriteInterrupt() throws Exception { VThreadRunner.run(() -> { - boolean retry = true; - while (retry) { + boolean done = false; + while (!done) { Pipe p = Pipe.open(); try (Pipe.SinkChannel sink = p.sink(); Pipe.SourceChannel source = p.source()) { // interrupt current thread when it blocks in write Thread thisThread = Thread.currentThread(); - runAfterParkedAsync(thisThread::interrupt); + runAfterParkedAsync(thisThread::interrupt, true); + // write until channel is closed try { ByteBuffer bb = ByteBuffer.allocate(100*1024); for (;;) { @@ -786,9 +839,10 @@ } catch (ClosedByInterruptException expected) { // closed when blocked in write assertTrue(Thread.interrupted()); - retry = false; + done = true; } catch (ClosedChannelException e) { - // closed when not blocked in write, need to retry test + // closed but not blocked in write, need to retry test + System.err.format("%s, need to retry!%n", e); } } } @@ -848,26 +902,50 @@ } /** - * Runs the given task asynchronously after the current virtual thread has parked. + * Runs the given task asynchronously after the current virtual thread parks. + * @param writing if the thread will block in write * @return the thread started to run the task */ - static Thread runAfterParkedAsync(ThrowingRunnable task) { + private static Thread runAfterParkedAsync(ThrowingRunnable task, boolean writing) { Thread target = Thread.currentThread(); if (!target.isVirtual()) throw new WrongThreadException(); return Thread.ofPlatform().daemon().start(() -> { try { - Thread.State state = target.getState(); - while (state != Thread.State.WAITING - && state != Thread.State.TIMED_WAITING) { + // wait for target thread to park + while (!isWaiting(target)) { Thread.sleep(20); - state = target.getState(); } - Thread.sleep(20); // give a bit more time to release carrier + + // if the target thread is parked in write then we nudge it a few times + // to avoid wakeup with some bytes written + if (writing) { + for (int i = 0; i < 3; i++) { + LockSupport.unpark(target); + while (!isWaiting(target)) { + Thread.sleep(20); + } + } + } + task.run(); + } catch (Exception e) { e.printStackTrace(); } }); } + + private static Thread runAfterParkedAsync(ThrowingRunnable task) { + return runAfterParkedAsync(task, false); + } + + /** + * Return true if the given Thread is parked. + */ + private static boolean isWaiting(Thread target) { + Thread.State state = target.getState(); + assertNotEquals(Thread.State.TERMINATED, state); + return (state == Thread.State.WAITING || state == Thread.State.TIMED_WAITING); + } } diff -Nru openjdk-25-25.0.1+8/test/jdk/java/nio/charset/Charset/IllegalCharsetName.java openjdk-25-25.0.2+10/test/jdk/java/nio/charset/Charset/IllegalCharsetName.java --- openjdk-25-25.0.1+8/test/jdk/java/nio/charset/Charset/IllegalCharsetName.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/nio/charset/Charset/IllegalCharsetName.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 @@ -50,7 +50,7 @@ assertThrows(IllegalCharsetNameException.class, () -> Charset.forName(name)); assertThrows(IllegalCharsetNameException.class, - () -> Charset.forName(name)); + () -> Charset.isSupported(name)); } // Charset.forName, Charset.isSupported, and the Charset constructor should @@ -60,7 +60,7 @@ assertThrows(IllegalCharsetNameException.class, () -> Charset.forName("")); assertThrows(IllegalCharsetNameException.class, - () -> Charset.forName("")); + () -> Charset.isSupported("")); assertThrows(IllegalCharsetNameException.class, () -> new Charset("", new String[]{}) { @Override diff -Nru openjdk-25-25.0.1+8/test/jdk/java/nio/file/DirectoryStream/SecureDS.java openjdk-25-25.0.2+10/test/jdk/java/nio/file/DirectoryStream/SecureDS.java --- openjdk-25-25.0.1+8/test/jdk/java/nio/file/DirectoryStream/SecureDS.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/nio/file/DirectoryStream/SecureDS.java 2025-12-18 08:04:02.000000000 +0000 @@ -24,7 +24,7 @@ /* @test * @bug 4313887 6838333 8343020 8357425 * @summary Unit test for java.nio.file.SecureDirectoryStream - * @requires (os.family == "linux" | os.family == "mac") + * @requires (os.family == "linux" | os.family == "mac" | os.family == "aix") * @library .. /test/lib * @build jdk.test.lib.Platform * @run main SecureDS diff -Nru openjdk-25-25.0.1+8/test/jdk/java/nio/file/FileStore/Basic.java openjdk-25-25.0.2+10/test/jdk/java/nio/file/FileStore/Basic.java --- openjdk-25-25.0.1+8/test/jdk/java/nio/file/FileStore/Basic.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/nio/file/FileStore/Basic.java 2025-12-18 08:04:02.000000000 +0000 @@ -38,6 +38,7 @@ import jdk.test.lib.Platform; import jdk.test.lib.util.FileUtils; +import static jdk.test.lib.Asserts.*; public class Basic { @@ -52,11 +53,6 @@ } } - static void assertTrue(boolean okay) { - if (!okay) - throw new RuntimeException("Assertion failed"); - } - static void checkWithin1GB(String space, long expected, long actual) { long diff = Math.abs(actual - expected); if (diff > G) { @@ -73,8 +69,11 @@ FileStore store = Files.getFileStore(file); boolean supported = store.supportsFileAttributeView(viewClass); assertTrue(store.supportsFileAttributeView(viewName) == supported); - boolean haveView = Files.getFileAttributeView(file, viewClass) != null; - assertTrue(haveView == supported); + // If the file attribute view is supported by the FileStore then + // Files.getFileAttributeView should return that view + if (supported) { + assertNotNull(Files.getFileAttributeView(file, viewClass)); + } } static void doTests(Path dir) throws IOException { diff -Nru openjdk-25-25.0.1+8/test/jdk/java/security/SignedJar/spi-calendar-provider/TestSPISigned.java openjdk-25-25.0.2+10/test/jdk/java/security/SignedJar/spi-calendar-provider/TestSPISigned.java --- openjdk-25-25.0.1+8/test/jdk/java/security/SignedJar/spi-calendar-provider/TestSPISigned.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/security/SignedJar/spi-calendar-provider/TestSPISigned.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 2022, Red Hat, Inc. + * 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 @@ -30,6 +31,7 @@ import java.util.Locale; import java.util.List; import java.util.ArrayList; +import java.net.URI; import java.nio.file.Paths; import java.nio.file.Path; import java.nio.file.Files; @@ -54,12 +56,9 @@ */ public class TestSPISigned { - private static final String TEST_CLASSES = System.getProperty("test.classes", "."); private static final String TEST_SRC = System.getProperty("test.src", "."); private static final Path META_INF_DIR = Paths.get(TEST_SRC, "provider", "meta"); - private static final Path PROVIDER_PARENT = Paths.get(TEST_CLASSES, ".."); - private static final Path PROVIDER_DIR = PROVIDER_PARENT.resolve("provider"); private static final Path MODS_DIR = Paths.get("mods"); private static final Path UNSIGNED_JAR = MODS_DIR.resolve("unsigned-with-locale.jar"); private static final Path SIGNED_JAR = MODS_DIR.resolve("signed-with-locale.jar"); @@ -81,7 +80,9 @@ // Set up signed jar with custom calendar data provider // // 1. Create jar with custom CalendarDataProvider - JarUtils.createJarFile(UNSIGNED_JAR, PROVIDER_DIR); + var codeSource = baz.CalendarDataProviderImpl.class.getProtectionDomain().getCodeSource(); + var providerDir = Path.of(URI.create(codeSource.getLocation().toString())); + JarUtils.createJarFile(UNSIGNED_JAR, providerDir); JarUtils.updateJarFile(UNSIGNED_JAR, META_INF_DIR); // create signer's keypair SecurityTools.keytool("-genkeypair -keyalg RSA -keystore ks " + diff -Nru openjdk-25-25.0.1+8/test/jdk/java/util/TimeZone/DefaultTimeZoneTest.java openjdk-25-25.0.2+10/test/jdk/java/util/TimeZone/DefaultTimeZoneTest.java --- openjdk-25-25.0.1+8/test/jdk/java/util/TimeZone/DefaultTimeZoneTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/util/TimeZone/DefaultTimeZoneTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,6 +38,11 @@ import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; +import javax.swing.SwingConstants; +import javax.swing.BoxLayout; +import javax.swing.Box; +import java.awt.Dimension; +import java.awt.Component; import java.awt.BorderLayout; import java.awt.Window; import java.lang.reflect.InvocationTargetException; @@ -98,17 +103,36 @@ private static Window createTest() { var contents = new JFrame("DefaultTimeZoneTest"); - var label = new JLabel(SDF.format(new Date())); + contents.setSize(350, 250); + // Panel with vertical layout var panel = new JPanel(); + panel.setLayout(new BoxLayout(panel, BoxLayout.PAGE_AXIS)); + // Time zone ID label + var timeZoneID = new JLabel("Time zone ID: " + SDF.getTimeZone().getID(), SwingConstants.CENTER); + timeZoneID.setAlignmentX(Component.CENTER_ALIGNMENT); + // Time label + var label = new JLabel(SDF.format(new Date()), SwingConstants.CENTER); + label.setAlignmentX(Component.CENTER_ALIGNMENT); + // Update button var button = new JButton("Update Time Zone"); + button.setAlignmentX(Component.CENTER_ALIGNMENT); + // Add components with spacing + panel.add(Box.createRigidArea(new Dimension(0, 10))); + panel.add(timeZoneID); + panel.add(Box.createRigidArea(new Dimension(0, 5))); + panel.add(label); + panel.add(Box.createRigidArea(new Dimension(0, 10))); panel.add(button); - contents.setSize(350, 250); - contents.add(label, BorderLayout.NORTH); - contents.add(panel, BorderLayout.CENTER); + contents.add(panel); + // Update default time zone on button click button.addActionListener(e -> { + // Clear JVM cached timezone and force reload from OS + TimeZone.setDefault(null); + System.setProperty("user.timezone", ""); TimeZone tz = TimeZone.getDefault(); SDF.setTimeZone(tz); + timeZoneID.setText("Time zone ID: " + tz.getID()); label.setText(SDF.format(new Date())); contents.repaint(); }); diff -Nru openjdk-25-25.0.1+8/test/jdk/java/util/TimeZone/SimpleTimeZoneEqualsHashCodeTest.java openjdk-25-25.0.2+10/test/jdk/java/util/TimeZone/SimpleTimeZoneEqualsHashCodeTest.java --- openjdk-25-25.0.1+8/test/jdk/java/util/TimeZone/SimpleTimeZoneEqualsHashCodeTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/util/TimeZone/SimpleTimeZoneEqualsHashCodeTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,83 @@ +/* + * 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 8369184 + * @summary Checks if equals()/hashCode() of SimpleTimeZone works correctly + * @run junit SimpleTimeZoneEqualsHashCodeTest + */ + +import java.util.SimpleTimeZone; +import static java.util.Calendar.MARCH; +import static java.util.Calendar.NOVEMBER; +import static java.util.Calendar.SUNDAY; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +public class SimpleTimeZoneEqualsHashCodeTest { + private static final SimpleTimeZone STZ_WITH_DST = + new SimpleTimeZone(-288_000_000, "America/Los_Angeles", + MARCH, 8, -SUNDAY, 7_200_000, + NOVEMBER, 1, -SUNDAY, 7_200_000); + private static final SimpleTimeZone STZ_WITHOUT_DST = + new SimpleTimeZone(0, "foo"); + + @Test + void withDSTTest() { + var stz = (SimpleTimeZone)STZ_WITH_DST.clone(); + assertEquals(STZ_WITH_DST, stz); + assertEquals(STZ_WITH_DST.hashCode(), stz.hashCode()); + + stz.setEndRule(NOVEMBER, 8, -SUNDAY, 7_200_000); + assertNotEquals(STZ_WITH_DST, stz); + // From the contract point, hash codes may be the same. + // This tests the implementation which considers DST + // related fields for calculating the hash code. + assertNotEquals(STZ_WITH_DST.hashCode(), stz.hashCode()); + } + + @Test + void withoutDSTTest() { + var stz = (SimpleTimeZone)STZ_WITHOUT_DST.clone(); + + // Only setting start rule. Still considered non-DST zone + stz.setStartRule(MARCH, 8, -SUNDAY, 7_200_000); + assertTrue(!stz.useDaylightTime()); + assertEquals(STZ_WITHOUT_DST, stz); + assertEquals(STZ_WITHOUT_DST.hashCode(), stz.hashCode()); + + // Setting end rule as well. Now it is considered DST zone + stz.setEndRule(NOVEMBER, 8, -SUNDAY, 7_200_000); + assertTrue(stz.useDaylightTime()); + assertNotEquals(STZ_WITHOUT_DST, stz); + // From the contract point, hash codes may be the same. + // This tests the implementation which considers DST + // related fields for calculating the hash code. + assertNotEquals(STZ_WITHOUT_DST.hashCode(), stz.hashCode()); + } +} diff -Nru openjdk-25-25.0.1+8/test/jdk/java/util/concurrent/CopyOnWriteArraySet/SerializationTest.java openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/CopyOnWriteArraySet/SerializationTest.java --- openjdk-25-25.0.1+8/test/jdk/java/util/concurrent/CopyOnWriteArraySet/SerializationTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/CopyOnWriteArraySet/SerializationTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,84 @@ +/* + * 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 8365058 + * @summary Check basic correctness of de-serialization + * @run junit SerializationTest + */ + +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.List; +import java.util.Set; +import java.util.concurrent.CopyOnWriteArraySet; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class SerializationTest { + + // Ensure basic serialization round trip correctness + @ParameterizedTest + @MethodSource + void roundTripTest(CopyOnWriteArraySet expected) { + var bytes = ser(expected); + var actual = deSer(bytes); + assertEquals(CopyOnWriteArraySet.class, actual.getClass()); + assertEquals(expected, actual); + } + + private static Stream> roundTripTest() { + return Stream.of( + new CopyOnWriteArraySet<>(), + new CopyOnWriteArraySet<>(List.of(1, 2, 3)), + new CopyOnWriteArraySet<>(Set.of("Foo", "Bar", "Baz")) + ); + } + + private static byte[] ser(Object obj) { + return assertDoesNotThrow(() -> { + try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(byteArrayOutputStream)) { + oos.writeObject(obj); + return byteArrayOutputStream.toByteArray(); + } + }, "Unexpected error during serialization"); + } + + private static Object deSer(byte[] bytes) { + return assertDoesNotThrow(() -> { + try (ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bytes); + ObjectInputStream ois = new ObjectInputStream(byteArrayInputStream)) { + return ois.readObject(); + } + }, "Unexpected error during de-serialization"); + } +} diff -Nru openjdk-25-25.0.1+8/test/jdk/java/util/concurrent/Executors/AutoShutdown.java openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/Executors/AutoShutdown.java --- openjdk-25-25.0.1+8/test/jdk/java/util/concurrent/Executors/AutoShutdown.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/Executors/AutoShutdown.java 2025-12-18 08:04:02.000000000 +0000 @@ -23,23 +23,32 @@ /* * @test - * @bug 6399443 8302899 + * @bug 6399443 8302899 8362123 * @summary Test that Executors.newSingleThreadExecutor wraps an ExecutorService that * automatically shuts down and terminates when the wrapper is GC'ed + * @library /test/lib/ * @modules java.base/java.util.concurrent:+open * @run junit AutoShutdown */ +import java.lang.ref.PhantomReference; +import java.lang.ref.Reference; +import java.lang.ref.ReferenceQueue; import java.lang.reflect.Field; import java.time.Duration; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.ThreadFactory; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.Consumer; import java.util.function.Supplier; import java.util.stream.Stream; import java.util.stream.IntStream; +import jdk.test.lib.Utils; +import jdk.test.lib.util.ForceGC; + import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -61,6 +70,13 @@ .mapToObj(i -> Arguments.of(s, i))); } + private static Stream shutdownMethods() { + return Stream.>of( + e -> e.shutdown(), + e -> e.shutdownNow() + ).map(Arguments::of); + } + /** * SingleThreadExecutor with no worker threads. */ @@ -110,6 +126,28 @@ assertEquals(ntasks, completedTaskCount.get()); } + @ParameterizedTest + @MethodSource("shutdownMethods") + void testShutdownUnlinksCleaner(Consumer shutdown) throws Exception { + ClassLoader classLoader = + Utils.getTestClassPathURLClassLoader(ClassLoader.getPlatformClassLoader()); + + ReferenceQueue queue = new ReferenceQueue<>(); + Reference reference = new PhantomReference(classLoader, queue); + try { + Class isolatedClass = classLoader.loadClass("AutoShutdown$IsolatedClass"); + assertSame(isolatedClass.getClassLoader(), classLoader); + isolatedClass.getDeclaredMethod("shutdown", Consumer.class).invoke(null, shutdown); + + isolatedClass = null; + classLoader = null; + + assertTrue(ForceGC.wait(() -> queue.poll() != null)); + } finally { + Reference.reachabilityFence(reference); + } + } + /** * Returns the delegate for the given ExecutorService. The given ExecutorService * must be a Executors$DelegatedExecutorService. @@ -132,5 +170,22 @@ terminated = executor.awaitTermination(100, TimeUnit.MILLISECONDS); } } -} + public static class IsolatedClass { + + private static final ExecutorService executor = + Executors.newSingleThreadExecutor(new IsolatedThreadFactory()); + + public static void shutdown(Consumer shutdown) { + shutdown.accept(executor); + } + } + + public static class IsolatedThreadFactory implements ThreadFactory { + + @Override + public Thread newThread(Runnable r) { + return new Thread(r); + } + } +} diff -Nru openjdk-25-25.0.1+8/test/jdk/java/util/concurrent/tck/CompletableFutureTest.java openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/tck/CompletableFutureTest.java --- openjdk-25-25.0.1+8/test/jdk/java/util/concurrent/tck/CompletableFutureTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/java/util/concurrent/tck/CompletableFutureTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -58,6 +58,7 @@ import java.util.concurrent.Executor; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.ForkJoinTask; +import java.util.concurrent.ForkJoinWorkerThread; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; @@ -5133,4 +5134,46 @@ checkCompletedWithWrappedException(g.toCompletableFuture(), r.ex); r.assertInvoked(); }} + + public void testOnlyHelpsIfInTheSamePool() throws Exception { + class Logic { + interface Extractor { ForkJoinPool pool(CompletableFuture cf) throws Exception; } + static final List executeInnerOuter( + ForkJoinPool outer, ForkJoinPool inner, Logic.Extractor extractor + ) throws Exception { + return CompletableFuture.supplyAsync(() -> + Stream.iterate(1, i -> i + 1) + .limit(64) + .map(i -> CompletableFuture.supplyAsync( + () -> Thread.currentThread() instanceof ForkJoinWorkerThread wt ? wt.getPool() : null, inner) + ) + .map(cf -> { + try { + return extractor.pool(cf); + } catch (Exception ex) { + throw new AssertionError("Unexpected", ex); + } + }) + .toList() + , outer).join(); + } + } + + List extractors = + List.of( + c -> c.get(60, SECONDS), + CompletableFuture::get, + CompletableFuture::join + ); + + try (var pool = new ForkJoinPool(2)) { + for (var extractor : extractors) { + for (var p : Logic.executeInnerOuter(pool, ForkJoinPool.commonPool(), extractor)) + assertTrue(p != pool); // The inners should have all been executed by commonPool + + for (var p : Logic.executeInnerOuter(pool, pool, extractor)) + assertTrue(p == pool); // The inners could have been helped by the outer + } + } + } } diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/management/security/SecurityTest.java openjdk-25-25.0.2+10/test/jdk/javax/management/security/SecurityTest.java --- openjdk-25-25.0.1+8/test/jdk/javax/management/security/SecurityTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/management/security/SecurityTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -399,6 +399,8 @@ opts.add(JDKToolFinder.getJDKTool("java")); opts.addAll(Arrays.asList(jdk.test.lib.Utils.getTestJavaOpts())); + opts.add("-Djdk.rmi.ssl.client.enableEndpointIdentification=false"); + // We need to forward some properties to the client side opts.add("-Dtest.src=" + System.getProperty("test.src")); diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/DTLS/DTLSNamedGroups.java openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/DTLSNamedGroups.java --- openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/DTLS/DTLSNamedGroups.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/DTLSNamedGroups.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -140,4 +140,3 @@ } } } - diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/DTLS/DTLSOverDatagram.java openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/DTLSOverDatagram.java --- openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/DTLS/DTLSOverDatagram.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/DTLSOverDatagram.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 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 @@ -52,7 +52,6 @@ */ public class DTLSOverDatagram { - private static final int SOCKET_TIMEOUT = 10 * 1000; // in millis private static final int BUFFER_SIZE = 1024; private static final int MAXIMUM_PACKET_SIZE = 1024; @@ -78,6 +77,7 @@ private final AtomicBoolean exceptionOccurred = new AtomicBoolean(false); private final CountDownLatch serverStarted = new CountDownLatch(1); + private int socketTimeout = 10 * 1000; // in millis /* * ============================================================= * The test case @@ -476,6 +476,10 @@ return null; } + public void setSocketTimeout(int socketTimeout) { + this.socketTimeout = socketTimeout; + } + // run delegated tasks void runDelegatedTasks(SSLEngine engine) throws Exception { Runnable runnable; @@ -529,8 +533,8 @@ try (DatagramSocket serverSocket = new DatagramSocket(serverSocketAddress); DatagramSocket clientSocket = new DatagramSocket(clientSocketAddress)) { - serverSocket.setSoTimeout(SOCKET_TIMEOUT); - clientSocket.setSoTimeout(SOCKET_TIMEOUT); + serverSocket.setSoTimeout(socketTimeout); + clientSocket.setSoTimeout(socketTimeout); InetSocketAddress serverSocketAddr = new InetSocketAddress( InetAddress.getLoopbackAddress(), serverSocket.getLocalPort()); diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/DTLS/DTLSSignatureSchemes.java openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/DTLSSignatureSchemes.java --- openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/DTLS/DTLSSignatureSchemes.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/DTLSSignatureSchemes.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 @@ -134,4 +134,3 @@ } } } - diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/DTLS/FragmentedFinished.java openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/FragmentedFinished.java --- openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/DTLS/FragmentedFinished.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/FragmentedFinished.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,72 @@ +/* + * 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. + */ + +// SunJSSE does not support dynamic system properties, no way to re-use +// system properties in samevm/agentvm mode. + +/* + * @test + * @bug 8367133 + * @summary Verify that handshake succeeds when Finished message is fragmented + * @modules java.base/sun.security.util + * @library /test/lib + * @build DTLSOverDatagram + * @run main/othervm FragmentedFinished + */ + +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLParameters; +import java.net.DatagramPacket; +import java.net.SocketAddress; +import java.util.ArrayList; +import java.util.List; + +public class FragmentedFinished extends DTLSOverDatagram { + private SSLEngine serverSSLEngine; + public static void main(String[] args) throws Exception { + FragmentedFinished testCase = new FragmentedFinished(); + testCase.runTest(testCase); + } + + @Override + SSLEngine createSSLEngine(boolean isClient) throws Exception { + SSLEngine sslEngine = super.createSSLEngine(isClient); + if (!isClient) { + serverSSLEngine = sslEngine; + } + return sslEngine; + } + + @Override + DatagramPacket createHandshakePacket(byte[] ba, SocketAddress socketAddr) { + if (ba.length < 30) { // detect ChangeCipherSpec + // Reduce the maximumPacketSize to force fragmentation + // of the Finished message + SSLParameters params = serverSSLEngine.getSSLParameters(); + params.setMaximumPacketSize(53); + serverSSLEngine.setSSLParameters(params); + } + + return super.createHandshakePacket(ba, socketAddr); + } +} diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/DTLS/PacketLossRetransmission.java openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/PacketLossRetransmission.java --- openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/DTLS/PacketLossRetransmission.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/DTLS/PacketLossRetransmission.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2021, 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 @@ -32,37 +32,16 @@ * @library /test/lib * @build DTLSOverDatagram * - * @run main/othervm PacketLossRetransmission client 0 hello_request * @run main/othervm PacketLossRetransmission client 1 client_hello - * @run main/othervm PacketLossRetransmission client 2 server_hello - * @run main/othervm PacketLossRetransmission client 3 hello_verify_request - * @run main/othervm -Djdk.tls.client.enableSessionTicketExtension=false PacketLossRetransmission client 4 new_session_ticket - * @run main/othervm PacketLossRetransmission client 11 certificate - * @run main/othervm PacketLossRetransmission client 12 server_key_exchange - * @run main/othervm PacketLossRetransmission client 13 certificate_request - * @run main/othervm PacketLossRetransmission client 14 server_hello_done - * @run main/othervm PacketLossRetransmission client 15 certificate_verify * @run main/othervm PacketLossRetransmission client 16 client_key_exchange * @run main/othervm PacketLossRetransmission client 20 finished - * @run main/othervm PacketLossRetransmission client 21 certificate_url - * @run main/othervm PacketLossRetransmission client 22 certificate_status - * @run main/othervm PacketLossRetransmission client 23 supplemental_data * @run main/othervm PacketLossRetransmission client -1 change_cipher_spec - * @run main/othervm PacketLossRetransmission server 0 hello_request - * @run main/othervm PacketLossRetransmission server 1 client_hello * @run main/othervm PacketLossRetransmission server 2 server_hello * @run main/othervm PacketLossRetransmission server 3 hello_verify_request - * @run main/othervm -Djdk.tls.client.enableSessionTicketExtension=false PacketLossRetransmission server 4 new_session_ticket * @run main/othervm PacketLossRetransmission server 11 certificate * @run main/othervm PacketLossRetransmission server 12 server_key_exchange - * @run main/othervm PacketLossRetransmission server 13 certificate_request * @run main/othervm PacketLossRetransmission server 14 server_hello_done - * @run main/othervm PacketLossRetransmission server 15 certificate_verify - * @run main/othervm PacketLossRetransmission server 16 client_key_exchange * @run main/othervm PacketLossRetransmission server 20 finished - * @run main/othervm PacketLossRetransmission server 21 certificate_url - * @run main/othervm PacketLossRetransmission server 22 certificate_status - * @run main/othervm PacketLossRetransmission server 23 supplemental_data * @run main/othervm PacketLossRetransmission server -1 change_cipher_spec */ @@ -79,6 +58,7 @@ public class PacketLossRetransmission extends DTLSOverDatagram { private static boolean isClient; private static byte handshakeType; + private static final int TIMEOUT = 500; private boolean needPacketLoss = true; @@ -87,6 +67,7 @@ handshakeType = Byte.parseByte(args[1]); PacketLossRetransmission testCase = new PacketLossRetransmission(); + testCase.setSocketTimeout(TIMEOUT); testCase.runTest(testCase); } @@ -102,7 +83,7 @@ if (packet != null) { needPacketLoss = false; - System.out.println("Loss a packet of handshake messahe"); + System.out.println("Loss a packet of handshake message"); packets.remove(packet); } } diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/SSLException/CheckSSLHandshakeException.java openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLException/CheckSSLHandshakeException.java --- openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/SSLException/CheckSSLHandshakeException.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLException/CheckSSLHandshakeException.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/SSLException/CheckSSLKeyException.java openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLException/CheckSSLKeyException.java --- openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/SSLException/CheckSSLKeyException.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLException/CheckSSLKeyException.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/SSLException/CheckSSLPeerUnverifiedException.java openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLException/CheckSSLPeerUnverifiedException.java --- openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/SSLException/CheckSSLPeerUnverifiedException.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLException/CheckSSLPeerUnverifiedException.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/SSLException/CheckSSLProtocolException.java openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLException/CheckSSLProtocolException.java --- openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/SSLException/CheckSSLProtocolException.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLException/CheckSSLProtocolException.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/SSLParameters/NamedGroups.java openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLParameters/NamedGroups.java --- openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/SSLParameters/NamedGroups.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLParameters/NamedGroups.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/SSLParameters/NamedGroupsSpec.java openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLParameters/NamedGroupsSpec.java --- openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/SSLParameters/NamedGroupsSpec.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLParameters/NamedGroupsSpec.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/SSLParameters/SignatureSchemes.java openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLParameters/SignatureSchemes.java --- openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/SSLParameters/SignatureSchemes.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/SSLParameters/SignatureSchemes.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/ServerName/EndingDotHostname.java openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/ServerName/EndingDotHostname.java --- openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/ServerName/EndingDotHostname.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/ServerName/EndingDotHostname.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 @@ -248,4 +248,3 @@ sslIS.read(); } } - diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/templates/SSLExampleCert.java openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/templates/SSLExampleCert.java --- openjdk-25-25.0.1+8/test/jdk/javax/net/ssl/templates/SSLExampleCert.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/net/ssl/templates/SSLExampleCert.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/print/PrintServiceLookup/CountPrintServices.java openjdk-25-25.0.2+10/test/jdk/javax/print/PrintServiceLookup/CountPrintServices.java --- openjdk-25-25.0.1+8/test/jdk/javax/print/PrintServiceLookup/CountPrintServices.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/print/PrintServiceLookup/CountPrintServices.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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,25 +25,21 @@ import java.io.InputStreamReader; import javax.print.PrintService; import javax.print.PrintServiceLookup; -import javax.print.attribute.AttributeSet; -import javax.print.attribute.HashAttributeSet; -import javax.print.attribute.standard.PrinterName; +import java.io.IOException; + +import jtreg.SkippedException; /* * @test * @bug 8032693 * @key printer + * @library /test/lib/ + * @requires (os.family == "linux") * @summary Test that lpstat and JDK agree whether there are printers. */ public class CountPrintServices { public static void main(String[] args) throws Exception { - String os = System.getProperty("os.name").toLowerCase(); - System.out.println("OS is " + os); - if (!os.equals("linux")) { - System.out.println("Linux specific test. No need to continue"); - return; - } PrintService services[] = PrintServiceLookup.lookupPrintServices(null, null); if (services.length > 0) { @@ -51,7 +47,16 @@ return; } String[] lpcmd = { "lpstat", "-a" }; - Process proc = Runtime.getRuntime().exec(lpcmd); + Process proc; + try { + proc = Runtime.getRuntime().exec(lpcmd); + } catch (IOException e) { + if (e.getMessage().contains("No such file or directory")) { + throw new SkippedException("Cannot find lpstat"); + } else { + throw e; + } + } proc.waitFor(); InputStreamReader ir = new InputStreamReader(proc.getInputStream()); BufferedReader br = new BufferedReader(ir); @@ -66,4 +71,3 @@ } } } - diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java openjdk-25-25.0.2+10/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java --- openjdk-25-25.0.1+8/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004, 2023, 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 @@ -134,6 +134,7 @@ } public static void main(String[] args) throws Exception { + System.setProperty("jdk.rmi.ssl.client.enableEndpointIdentification", "false"); // Set keystore properties (server-side) // final String keystore = System.getProperty("test.src") + @@ -153,4 +154,4 @@ SSLSocketParametersTest test = new SSLSocketParametersTest(); test.runTest(Integer.parseInt(args[0])); } -} \ No newline at end of file +} diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/security/auth/callback/PasswordCallback/CheckCleanerBound.java openjdk-25-25.0.2+10/test/jdk/javax/security/auth/callback/PasswordCallback/CheckCleanerBound.java --- openjdk-25-25.0.1+8/test/jdk/javax/security/auth/callback/PasswordCallback/CheckCleanerBound.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/security/auth/callback/PasswordCallback/CheckCleanerBound.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 @@ -55,4 +55,3 @@ } } } - diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/security/auth/callback/PasswordCallback/PasswordCleanup.java openjdk-25-25.0.2+10/test/jdk/javax/security/auth/callback/PasswordCallback/PasswordCleanup.java --- openjdk-25-25.0.1+8/test/jdk/javax/security/auth/callback/PasswordCallback/PasswordCleanup.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/security/auth/callback/PasswordCallback/PasswordCleanup.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 @@ -49,4 +49,3 @@ } } } - diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/swing/JCheckBox/4449413/bug4449413.java openjdk-25-25.0.2+10/test/jdk/javax/swing/JCheckBox/4449413/bug4449413.java --- openjdk-25-25.0.1+8/test/jdk/javax/swing/JCheckBox/4449413/bug4449413.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/swing/JCheckBox/4449413/bug4449413.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2021, 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 @@ -24,7 +24,6 @@ /* @test * @bug 4449413 * @summary Tests that checkbox and radiobuttons' check marks are visible when background is black - * @author Ilya Boyandin * @run main/manual bug4449413 */ @@ -56,8 +55,16 @@ public class bug4449413 extends JFrame { + private static boolean isWindowsLF; + + private static String INSTRUCTIONS_WINDOWSLF = + "There are eight controls, JCheckBox/JRadioButton with black background\n" + + "and JRadioButtonMenuItem/JCheckboxMenuItem with gray background\n"; + private static final String INSTRUCTIONS = - "There are eight controls with black backgrounds.\n" + + "There are eight controls with black backgrounds.\n"; + + private static final String INSTRUCTIONS_COMMON = "Four enabled (on the left side) and four disabled (on the right side)\n" + "checkboxes and radiobuttons.\n\n" + "1. If at least one of the controls' check marks is not visible:\n" + @@ -82,6 +89,8 @@ } public static void main(String[] args) throws Exception { + isWindowsLF = "Windows".equals(UIManager.getLookAndFeel().getID()); + SwingUtilities.invokeLater(() -> { instance = new bug4449413(); instance.createAndShowGUI(); @@ -150,8 +159,10 @@ JTextArea instructionArea = new JTextArea( isMetalLookAndFeel() - ? INSTRUCTIONS + INSTRUCTIONS_ADDITIONS_METAL - : INSTRUCTIONS + ? INSTRUCTIONS + INSTRUCTIONS_COMMON + INSTRUCTIONS_ADDITIONS_METAL + : isWindowsLF + ? (INSTRUCTIONS_WINDOWSLF + INSTRUCTIONS_COMMON) + : (INSTRUCTIONS + INSTRUCTIONS_COMMON) ); instructionArea.setEditable(false); @@ -189,7 +200,13 @@ }; b.setOpaque(true); - b.setBackground(Color.black); + if (isWindowsLF + && ((b instanceof JRadioButtonMenuItem) + || (b instanceof JCheckBoxMenuItem))) { + b.setBackground(Color.lightGray); + } else { + b.setBackground(Color.black); + } b.setForeground(Color.white); b.setEnabled(enabled == 1); b.setSelected(true); diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/swing/JFileChooser/HTMLFileName.java openjdk-25-25.0.2+10/test/jdk/javax/swing/JFileChooser/HTMLFileName.java --- openjdk-25-25.0.1+8/test/jdk/javax/swing/JFileChooser/HTMLFileName.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/swing/JFileChooser/HTMLFileName.java 2025-12-18 08:04:02.000000000 +0000 @@ -41,7 +41,7 @@ /* * @test id=system - * @bug 8139228 + * @bug 8139228 8358532 * @summary JFileChooser should not render Directory names in HTML format * @library /java/awt/regtesthelpers * @build PassFailJFrame @@ -52,24 +52,35 @@ private static final String INSTRUCTIONS = """

      -
    1. FileChooser shows up a virtual directory and file with name -

      Swing Rocks!. -
    2. On "HTML disabled" frame : +
    3. JFileChooser shows a virtual directory. + The first file in the list has the following name: + <html><h1 color=#ff00ff><font + face="Serif">Swing Rocks! +
      +
      +
    4. In HTML disabled frame:
        -
      1. Verify that the folder and file name must be plain text. -
      2. If the name in file pane window and also in directory - ComboBox remains in plain text, then press Pass. - If it appears to be in HTML format with Pink color as - shown, then press Fail. +
      3. Verify that the first file name displays + as plain text, + that is you see the HTML tags in the file name. +
      4. If the file name in the file pane and + in the navigation combo box above is displayed + as HTML, that is in large font and magenta color, + then press Fail.
      -
    5. On "HTML enabled" frame : +
    6. In HTML enabled frame:
        -
      1. Verify that the folder and file name remains in HTML - format with name "Swing Rocks!" pink in color as shown. -
      2. If the name in file pane window and also in directory - ComboBox remains in HTML format string, then press Pass. - If it appears to be in plain text, then press Fail. +
      3. Verify that the first file name displays as HTML, + that is Swing Rocks! in large font + and magenta color.
        + Note: On macOS in Aqua L&F, the file name with + HTML displays as an empty file name. It is not an error. +
      4. If the file name in the file pane and + in the navigation combo box above is displayed + as HTML, then press Pass.
        + If it is in plain text, then press Fail.
    @@ -99,6 +110,7 @@ PassFailJFrame.builder() .instructions(INSTRUCTIONS) .columns(45) + .rows(20) .testUI(HTMLFileName::initialize) .positionTestUIBottomRowCentered() .build() @@ -110,18 +122,25 @@ return List.of(createFileChooser(true), createFileChooser(false)); } - private static JFrame createFileChooser(boolean htmlEnabled) { + private static JFrame createFileChooser(boolean htmlDisabled) { JFileChooser jfc = new JFileChooser(new VirtualFileSystemView()); - jfc.putClientProperty("html.disable", htmlEnabled); + jfc.putClientProperty("html.disable", htmlDisabled); jfc.setControlButtonsAreShown(false); - JFrame frame = new JFrame((htmlEnabled) ? "HTML enabled" : "HTML disabled"); + JFrame frame = new JFrame(htmlDisabled ? "HTML disabled" : "HTML enabled"); frame.add(jfc); frame.pack(); return frame; } private static class VirtualFileSystemView extends FileSystemView { + private final File[] files = { + new File("/", "

    Swing Rocks!"), + new File("/", "virtualFile1.txt"), + new File("/", "virtualFile2.log") + }; + @Override public File createNewFolder(File containingDir) { return null; @@ -129,12 +148,7 @@ @Override public File[] getRoots() { - return new File[]{ - new File("/", "

    Swing Rocks!"), - new File("/", "virtualFile2.txt"), - new File("/", "virtualFolder") - }; + return files; } @Override @@ -150,12 +164,7 @@ @Override public File[] getFiles(File dir, boolean useFileHiding) { // Simulate a virtual folder structure - return new File[]{ - new File("/", "

    Swing Rocks!"), - new File(dir, "virtualFile2.txt"), - new File(dir, "virtualFolder") - }; + return files; } @Override diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java openjdk-25-25.0.2+10/test/jdk/javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java --- openjdk-25-25.0.1+8/test/jdk/javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2018, 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 @@ -21,6 +21,7 @@ * questions. */ +import java.io.File; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Point; @@ -28,6 +29,7 @@ import java.awt.Robot; import java.awt.event.InputEvent; import java.awt.image.BufferedImage; +import javax.imageio.ImageIO; import javax.swing.JDesktopPane; import javax.swing.JFrame; import javax.swing.JInternalFrame; @@ -51,6 +53,7 @@ private static JInternalFrame internalFrame; private static int FRAME_SIZE = 500; private static Color BACKGROUND_COLOR = Color.ORANGE; + private static final int tolerance = 10; public static void main(String[] args) throws Exception { try { @@ -69,14 +72,24 @@ BufferedImage img = robot.createScreenCapture(rect); int testRGB = BACKGROUND_COLOR.getRGB(); + Color testColor = new Color(testRGB); for (int i = 1; i < size; i++) { int rgbCW = img.getRGB(i, size / 2); int rgbCH = img.getRGB(size / 2, i); - if (rgbCW != testRGB || rgbCH != testRGB) { + Color rgbCWColor = new Color(rgbCW); + Color rgbCHColor = new Color(rgbCH); + + if (Math.abs(rgbCWColor.getRed() - testColor.getRed()) > tolerance + || Math.abs(rgbCWColor.getGreen() - testColor.getGreen()) > tolerance + || Math.abs(rgbCWColor.getBlue() - testColor.getBlue()) > tolerance + || Math.abs(rgbCHColor.getRed() - testColor.getRed()) > tolerance + || Math.abs(rgbCHColor.getGreen() - testColor.getGreen()) > tolerance + || Math.abs(rgbCHColor.getBlue() - testColor.getBlue()) > tolerance) { System.out.println("i " + i + " rgbCW " + Integer.toHexString(rgbCW) + " testRGB " + Integer.toHexString(testRGB) + " rgbCH " + Integer.toHexString(rgbCH)); + ImageIO.write(img, "png", new File("JInternalFrameDraggingTest.png")); throw new RuntimeException("Background color is wrong!"); } } diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/swing/JMenuBar/RightLeftOrientation.java openjdk-25-25.0.2+10/test/jdk/javax/swing/JMenuBar/RightLeftOrientation.java --- openjdk-25-25.0.1+8/test/jdk/javax/swing/JMenuBar/RightLeftOrientation.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/swing/JMenuBar/RightLeftOrientation.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 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 @@ -20,75 +20,76 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + /* * @test * @bug 4211731 4214512 * @summary * This test checks if menu bars lay out correctly when their - * ComponentOrientation property is set to RIGHT_TO_LEFT. This test is - * manual. The tester is asked to compare left-to-right and - * right-to-left menu bars and judge whether they are mirror images of each - * other. + * ComponentOrientation property is set to RIGHT_TO_LEFT. + * The tester is asked to compare left-to-right and + * right-to-left menu bars and decide whether they are mirror + * images of each other. * @library /test/jdk/java/awt/regtesthelpers * @build PassFailJFrame * @run main/manual RightLeftOrientation */ import java.awt.ComponentOrientation; -import java.awt.Point; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.util.List; + import javax.swing.ButtonGroup; import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.SwingUtilities; import javax.swing.UIManager; -public class RightLeftOrientation { +public final class RightLeftOrientation { - static JFrame ltrFrame; - static JFrame rtlFrame; + private static List frames; private static final String INSTRUCTIONS = """ - This test checks menu bars for correct Right-To-Left Component Orientation. - - You should see two frames, each containing a menu bar. + This test checks menu bars for correct Right-To-Left component orientation. - One frame will be labelled "Left To Right" and will contain + You should see two frames, each contains a menu bar. + One frame is labelled "Left To Right" and contains a menu bar with menus starting on its left side. - The other frame will be labelled "Right To Left" and will - contain a menu bar with menus starting on its right side. + The other frame is labelled "Right To Left" and + contains a menu bar with menus starting on its right side. - The test will also contain radio buttons that can be used to set - the look and feel of the menu bars. - For each look and feel, you should compare the two menu - bars and make sure they are mirror images of each other. """; + The test also displays a frame with radio buttons + to change the look and feel of the menu bars. + For each look and feel, compare the two menu bars + in LTR and RTL orientation and make sure they are mirror + images of each other."""; public static void main(String[] args) throws Exception { PassFailJFrame.builder() - .title("RTL test Instructions") + .title("Menu Bar RTL Instructions") .instructions(INSTRUCTIONS) - .rows((int) INSTRUCTIONS.lines().count() + 2) .columns(30) .testUI(RightLeftOrientation::createTestUI) + .positionTestUIRightColumn() .build() .awaitAndCheck(); } - private static JFrame createTestUI() { - JFrame frame = new JFrame("RightLeftOrientation"); + private static JFrame createPlafChangerFrame() { + JFrame frame = new JFrame("Change Look and Feel"); JPanel panel = new JPanel(); ButtonGroup group = new ButtonGroup(); - JRadioButton rb; ActionListener plafChanger = new PlafChanger(); UIManager.LookAndFeelInfo[] lafInfos = UIManager.getInstalledLookAndFeels(); for (int i = 0; i < lafInfos.length; i++) { - rb = new JRadioButton(lafInfos[i].getName()); + JRadioButton rb = new JRadioButton(lafInfos[i].getName()); rb.setActionCommand(lafInfos[i].getClassName()); rb.addActionListener(plafChanger); group.add(rb); @@ -99,33 +100,39 @@ } frame.add(panel); + frame.pack(); + return frame; + } - ltrFrame = new JFrame("Left To Right"); + private static List createTestUI() { + JFrame plafFrame = createPlafChangerFrame(); + + JFrame ltrFrame = new JFrame("Left To Right"); ltrFrame.setJMenuBar(createMenuBar(ComponentOrientation.LEFT_TO_RIGHT)); ltrFrame.setSize(400, 100); - ltrFrame.setLocation(new Point(10, 10)); - ltrFrame.setVisible(true); - rtlFrame = new JFrame("Right To Left"); + JFrame rtlFrame = new JFrame("Right To Left"); rtlFrame.setJMenuBar(createMenuBar(ComponentOrientation.RIGHT_TO_LEFT)); rtlFrame.setSize(400, 100); - rtlFrame.setLocation(new Point(10, 120)); - rtlFrame.setVisible(true); - frame.pack(); - return frame; + + return (frames = List.of(plafFrame, ltrFrame, rtlFrame)); } - static class PlafChanger implements ActionListener { + private static final class PlafChanger implements ActionListener { + @Override public void actionPerformed(ActionEvent e) { String lnfName = e.getActionCommand(); try { UIManager.setLookAndFeel(lnfName); - SwingUtilities.updateComponentTreeUI(ltrFrame); - SwingUtilities.updateComponentTreeUI(rtlFrame); - } - catch (Exception exc) { - System.err.println("Could not load LookAndFeel: " + lnfName); + frames.forEach(SwingUtilities::updateComponentTreeUI); + } catch (Exception exc) { + String message = "Could not set Look and Feel to " + lnfName; + System.err.println(message); + JOptionPane.showMessageDialog(frames.get(0), + message, + "Look and Feel Error", + JOptionPane.ERROR_MESSAGE); } } diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/swing/JMenuItem/RightLeftOrientation.java openjdk-25-25.0.2+10/test/jdk/javax/swing/JMenuItem/RightLeftOrientation.java --- openjdk-25-25.0.1+8/test/jdk/javax/swing/JMenuItem/RightLeftOrientation.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/swing/JMenuItem/RightLeftOrientation.java 2025-12-18 08:04:02.000000000 +0000 @@ -22,18 +22,36 @@ */ /* - * @test + * @test id=metal * @bug 4211052 * @requires (os.family == "windows") - * @summary - * This test checks if menu items lay out correctly when their + * @summary Verifies if menu items lay out correctly when their * ComponentOrientation property is set to RIGHT_TO_LEFT. - * The tester is asked to compare left-to-right and - * right-to-left menus and judge whether they are mirror images of each - * other. * @library /java/awt/regtesthelpers * @build PassFailJFrame - * @run main/manual RightLeftOrientation + * @run main/manual RightLeftOrientation metal + */ + +/* + * @test id=motif + * @bug 4211052 + * @requires (os.family == "windows") + * @summary Verifies if menu items lay out correctly when their + * ComponentOrientation property is set to RIGHT_TO_LEFT. + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @run main/manual RightLeftOrientation motif + */ + +/* + * @test id=windows + * @bug 4211052 8370465 + * @requires (os.family == "windows") + * @summary Verifies if menu items lay out correctly when their + * ComponentOrientation property is set to RIGHT_TO_LEFT. + * @library /java/awt/regtesthelpers + * @build PassFailJFrame + * @run main/manual RightLeftOrientation windows */ import java.awt.Color; @@ -52,29 +70,47 @@ import javax.swing.JMenuItem; import javax.swing.JRadioButtonMenuItem; import javax.swing.KeyStroke; -import javax.swing.LookAndFeel; import javax.swing.SwingConstants; +import javax.swing.SwingUtilities; import javax.swing.UIManager; public class RightLeftOrientation { private static final String INSTRUCTIONS = """ - A menu bar is shown containing a menu for each look and feel. - A disabled menu means that the look and feel is not available for - testing in this environment. - Every effort should be made to run this test - in an environment that covers all look and feels. + A menu bar is shown with a menu. - Each menu is divided into two halves. The upper half is oriented + The menu is divided into two halves. The upper half is oriented left-to-right and the lower half is oriented right-to-left. - For each menu, ensure that the lower half mirrors the upper half. + Ensure that the lower half mirrors the upper half. Note that when checking the positioning of the sub-menus, it helps to position the frame away from the screen edges."""; public static void main(String[] args) throws Exception { + if (args.length < 1) { + throw new IllegalArgumentException("Look-and-Feel keyword is required"); + } + + final String lafClassName; + switch (args[0]) { + case "metal" -> lafClassName = UIManager.getCrossPlatformLookAndFeelClassName(); + case "motif" -> lafClassName = "com.sun.java.swing.plaf.motif.MotifLookAndFeel"; + case "windows" -> lafClassName = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"; + default -> throw new IllegalArgumentException( + "Unsupported Look-and-Feel keyword for this test: " + args[0]); + } + + SwingUtilities.invokeAndWait(() -> { + try { + UIManager.setLookAndFeel(lafClassName); + } catch (Exception e) { + throw new RuntimeException(e); + } + }); + + System.out.println("Test for LookAndFeel " + lafClassName); + PassFailJFrame.builder() - .title("RightLeftOrientation Instructions") .instructions(INSTRUCTIONS) .columns(35) .testUI(RightLeftOrientation::createTestUI) @@ -86,32 +122,19 @@ JFrame frame = new JFrame("RightLeftOrientation"); JMenuBar menuBar = new JMenuBar(); - menuBar.add(createMenu("javax.swing.plaf.metal.MetalLookAndFeel", - "Metal")); - menuBar.add(createMenu("com.sun.java.swing.plaf.motif.MotifLookAndFeel", - "Motif")); - menuBar.add(createMenu("com.sun.java.swing.plaf.windows.WindowsLookAndFeel", - "Windows")); + menuBar.add(createMenu()); frame.setJMenuBar(menuBar); - frame.pack(); + frame.setSize(250, 70); return frame; } - static JMenu createMenu(String laf, String name) { - JMenu menu = new JMenu(name); - try { - LookAndFeel save = UIManager.getLookAndFeel(); - UIManager.setLookAndFeel(laf); - addMenuItems(menu, ComponentOrientation.LEFT_TO_RIGHT); - menu.addSeparator(); - addMenuItems(menu, ComponentOrientation.RIGHT_TO_LEFT); - UIManager.setLookAndFeel(save); - } catch (Exception e) { - menu = new JMenu(name); - menu.setEnabled(false); - } + static JMenu createMenu() { + JMenu menu = new JMenu(UIManager.getLookAndFeel().getID()); + addMenuItems(menu, ComponentOrientation.LEFT_TO_RIGHT); + menu.addSeparator(); + addMenuItems(menu, ComponentOrientation.RIGHT_TO_LEFT); return menu; } @@ -132,6 +155,16 @@ menuItem.setHorizontalTextPosition(SwingConstants.LEADING); menu.add(menuItem); + menuItem = new JMenuItem("Text to the left", new MyMenuItemIcon()); + menuItem.setComponentOrientation(o); + menuItem.setHorizontalTextPosition(SwingConstants.LEFT); + menu.add(menuItem); + + menuItem = new JMenuItem("Text to the right", new MyMenuItemIcon()); + menuItem.setComponentOrientation(o); + menuItem.setHorizontalTextPosition(SwingConstants.RIGHT); + menu.add(menuItem); + menuItem = new JRadioButtonMenuItem("Radio Button Menu Item"); menuItem.setComponentOrientation(o); menuItem.setSelected(true); diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/swing/JOptionPane/TestJOptionHTMLTag.java openjdk-25-25.0.2+10/test/jdk/javax/swing/JOptionPane/TestJOptionHTMLTag.java --- openjdk-25-25.0.1+8/test/jdk/javax/swing/JOptionPane/TestJOptionHTMLTag.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/swing/JOptionPane/TestJOptionHTMLTag.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * 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 5074006 - * @key headful - * @library /java/awt/regtesthelpers - * @build PassFailJFrame - * @summary Swing JOptionPane shows tag as a string after newline - * @run main/manual TestJOptionHTMLTag -*/ - -import javax.swing.JDialog; -import javax.swing.JOptionPane; -import javax.swing.SwingUtilities; - -public class TestJOptionHTMLTag { - static String instructions - = """ - INSTRUCTIONS: - A dialog will be shown. - If it does not contain string, press Pass else press Fail. - """; - static PassFailJFrame passFailJFrame; - - public static void main(String[] args) throws Exception { - - SwingUtilities.invokeAndWait(() -> { - try { - String message = "" + "This is a test\n" + ""; - JOptionPane optionPane = new JOptionPane(); - optionPane.setMessage(message); - optionPane.setMessageType(JOptionPane.INFORMATION_MESSAGE); - JDialog dialog = new JDialog(); - dialog.setContentPane(optionPane); - dialog.pack(); - dialog.setVisible(true); - - passFailJFrame = new PassFailJFrame(instructions); - PassFailJFrame.addTestWindow(dialog); - PassFailJFrame.positionTestWindow(dialog, PassFailJFrame.Position.HORIZONTAL); - } catch (Exception e) { - e.printStackTrace(); - } - }); - passFailJFrame.awaitAndCheck(); - } -} - diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/swing/JPasswordField/PasswordFieldInputMapWordTest.java openjdk-25-25.0.2+10/test/jdk/javax/swing/JPasswordField/PasswordFieldInputMapWordTest.java --- openjdk-25-25.0.1+8/test/jdk/javax/swing/JPasswordField/PasswordFieldInputMapWordTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/swing/JPasswordField/PasswordFieldInputMapWordTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,118 @@ +/* + * 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 + * @key headful + * @bug 8358813 + * @summary Password fields' InputMap should not include any word-related action. + * + * @run main PasswordFieldInputMapWordTest + */ + +import java.util.Collection; +import java.util.Set; + +import javax.swing.InputMap; +import javax.swing.JComponent; +import javax.swing.JPasswordField; +import javax.swing.KeyStroke; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.text.DefaultEditorKit; + +public class PasswordFieldInputMapWordTest { + public static void main(String[] args) throws Exception { + for (UIManager.LookAndFeelInfo laf : + UIManager.getInstalledLookAndFeels()) { + System.out.println("Testing LAF: " + laf.getClassName()); + SwingUtilities.invokeAndWait(() -> { + if (setLookAndFeel(laf)) { + runTest(); + } + }); + } + } + + private static boolean setLookAndFeel(UIManager.LookAndFeelInfo laf) { + try { + UIManager.setLookAndFeel(laf.getClassName()); + return true; + } catch (UnsupportedLookAndFeelException e) { + System.err.println("Skipping unsupported look and feel:"); + e.printStackTrace(); + return false; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + static int[] inputMapConditions = new int[] { + JComponent.WHEN_IN_FOCUSED_WINDOW, + JComponent.WHEN_FOCUSED, + JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT + }; + + /** + * These are all the actions with "word" in their field name. + */ + static Collection wordActions = Set.of( + DefaultEditorKit.deleteNextWordAction, + DefaultEditorKit.deletePrevWordAction, + DefaultEditorKit.beginWordAction, + DefaultEditorKit.endWordAction, + DefaultEditorKit.selectionBeginWordAction, + DefaultEditorKit.selectionEndWordAction, + DefaultEditorKit.previousWordAction, + DefaultEditorKit.nextWordAction, + DefaultEditorKit.selectionPreviousWordAction, + DefaultEditorKit.selectionNextWordAction + ); + + private static void runTest() { + JPasswordField field = new JPasswordField(); + + boolean testPassed = true; + for (int condition : inputMapConditions) { + InputMap inputMap = field.getInputMap(condition); + if (inputMap.allKeys() == null) { + continue; + } + for (KeyStroke keyStroke : inputMap.allKeys()) { + Object actionBinding = inputMap.get(keyStroke); + if (wordActions.contains(actionBinding)) { + if (testPassed) { + System.err.println("The following inputs/actions should not be available in a JPasswordField:"); + } + System.err.println(inputMap.get(keyStroke) + " (try typing " + keyStroke + ")"); + testPassed = false; + } + } + } + + if (!testPassed) { + throw new RuntimeException("One or more input/action binding was observed for a JPasswordField."); + } + } +} diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/swing/JTabbedPane/bug4499556.java openjdk-25-25.0.2+10/test/jdk/javax/swing/JTabbedPane/bug4499556.java --- openjdk-25-25.0.1+8/test/jdk/javax/swing/JTabbedPane/bug4499556.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/swing/JTabbedPane/bug4499556.java 2025-12-18 08:04:02.000000000 +0000 @@ -89,9 +89,10 @@ } static volatile JTabbedPane pane; + static volatile JFrame frame; static JFrame createUI() { - JFrame frame = new JFrame("bug4499556"); + frame = new JFrame("bug4499556"); pane = getTabbedPane(); frame.add(pane); frame.add(getRightPanel(), BorderLayout.EAST); @@ -262,7 +263,7 @@ e.printStackTrace(); return false; } - SwingUtilities.updateComponentTreeUI(pane); + SwingUtilities.updateComponentTreeUI(frame); return true; } diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/swing/SwingUtilities/bug4967768.java openjdk-25-25.0.2+10/test/jdk/javax/swing/SwingUtilities/bug4967768.java --- openjdk-25-25.0.1+8/test/jdk/javax/swing/SwingUtilities/bug4967768.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/swing/SwingUtilities/bug4967768.java 2025-12-18 08:04:02.000000000 +0000 @@ -37,13 +37,19 @@ public class bug4967768 { private static final String INSTRUCTIONS = """ - When the test starts you'll see a button "Oops" - with the "p" letter underlined at the bottom - of the instruction frame. + When the test starts you'll see a button "Oops". + + For Windows and GTK Look and Feel, you will need to + press the ALT key to make the mnemonic visible. + Once the ALT key is pressed, the letter "p" will be + underlined at the bottom of the instruction frame. Ensure the underline cuts through the descender of letter "p", i.e. the underline is painted not below the letter but below the baseline. + + Press Pass if you see the expected behaviour else + press Fail. """; public static void main(String[] args) throws Exception { diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/swing/border/LineBorder/ScaledLineBorderTest.java openjdk-25-25.0.2+10/test/jdk/javax/swing/border/LineBorder/ScaledLineBorderTest.java --- openjdk-25-25.0.1+8/test/jdk/javax/swing/border/LineBorder/ScaledLineBorderTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/swing/border/LineBorder/ScaledLineBorderTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 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 @@ -42,15 +42,18 @@ import javax.swing.JPanel; import javax.swing.SwingUtilities; +import static sun.java2d.pipe.Region.clipRound; + /* * @test - * @bug 8282958 + * @bug 8282958 8349188 * @summary Verify LineBorder edges have the same width * @requires (os.family == "windows") + * @modules java.desktop/sun.java2d.pipe * @run main ScaledLineBorderTest */ public class ScaledLineBorderTest { - private static final Dimension SIZE = new Dimension(120, 25); + private static final Dimension SIZE = new Dimension(250, 50); private static final Color OUTER_COLOR = Color.BLACK; private static final Color BORDER_COLOR = Color.RED; @@ -59,12 +62,19 @@ private static final double[] scales = {1.00, 1.25, 1.50, 1.75, 2.00, 2.50, 3.00}; + private static final int[] thickness = {1, 4, 10, 15}; + + private record TestImage(BufferedImage image, + List panelLocations, + double scale, + int thickness) { + } - private static final List images = - new ArrayList<>(scales.length); + private record TestUI(JComponent content, + List panelLocations, + int thickness) { + } - private static final List panelLocations = - new ArrayList<>(4); public static void main(String[] args) throws Exception { Collection params = Arrays.asList(args); @@ -74,29 +84,38 @@ } private static void testScaling(boolean showFrame, boolean saveImages) { - JComponent content = createUI(); - if (showFrame) { - showFrame(content); + for (int thickness : thickness) { + TestUI testUI = createUI(thickness); + if (showFrame) { + showFrame(testUI.content); + } + + List images = paintToImages(testUI, saveImages); + verifyBorderRendering(images, saveImages); + } + + if (errorCount > 0) { + throw new Error("Test failed: " + + errorCount + " error(s) detected - " + + errorMessage); } - paintToImages(content, saveImages); - verifyBorderRendering(saveImages); } - private static void verifyBorderRendering(final boolean saveImages) { - String errorMessage = null; - int errorCount = 0; - for (int i = 0; i < images.size(); i++) { - BufferedImage img = images.get(i); - double scaling = scales[i]; - try { - int thickness = (int) Math.floor(scaling); + private static String errorMessage = null; + private static int errorCount = 0; - checkVerticalBorders(SIZE.width / 2, thickness, img); + private static void verifyBorderRendering(final List images, + final boolean saveImages) { + for (TestImage test : images) { + final BufferedImage img = test.image; + final int effectiveThickness = clipRound(test.thickness * test.scale); + try { + checkVerticalBorders((int) (SIZE.width * test.scale / 2), effectiveThickness, img); - for (Point p : panelLocations) { - int y = (int) (p.y * scaling) + SIZE.height / 2; - checkHorizontalBorder(y, thickness, img); + for (Point p : test.panelLocations) { + int y = (int) ((p.y + (SIZE.height / 2)) * test.scale); + checkHorizontalBorder(y, effectiveThickness, img); } } catch (Error e) { if (errorMessage == null) { @@ -104,21 +123,13 @@ } errorCount++; - System.err.printf("Scaling: %.2f\n", scaling); + System.err.printf("Scale: %.2f; thickness: %d, effective: %d\n", + test.scale, test.thickness, effectiveThickness); e.printStackTrace(); - // Save the image if it wasn't already saved - if (!saveImages) { - saveImage(img, getImageFileName(scaling)); - } + saveImage(img, getImageFileName(test.scale, test.thickness)); } } - - if (errorCount > 0) { - throw new Error("Test failed: " - + errorCount + " error(s) detected - " - + errorMessage); - } } private static void checkVerticalBorders(final int x, @@ -220,17 +231,19 @@ x, y, color)); } - private static JComponent createUI() { + private static TestUI createUI(int thickness) { Box contentPanel = Box.createVerticalBox(); contentPanel.setBackground(OUTER_COLOR); + List panelLocations = new ArrayList<>(4); + Dimension childSize = null; for (int i = 0; i < 4; i++) { JComponent filler = new JPanel(null); filler.setBackground(INSIDE_COLOR); filler.setPreferredSize(SIZE); filler.setBounds(i, 0, SIZE.width, SIZE.height); - filler.setBorder(BorderFactory.createLineBorder(BORDER_COLOR)); + filler.setBorder(BorderFactory.createLineBorder(BORDER_COLOR, thickness)); JPanel childPanel = new JPanel(new BorderLayout()); childPanel.setBorder(BorderFactory.createEmptyBorder(0, i, 4, 4)); @@ -248,7 +261,7 @@ contentPanel.setSize(childSize.width, childSize.height * 4); - return contentPanel; + return new TestUI(contentPanel, panelLocations, thickness); } private static void showFrame(JComponent content) { @@ -260,28 +273,33 @@ frame.setVisible(true); } - private static void paintToImages(final JComponent content, - final boolean saveImages) { - for (double scaling : scales) { + private static List paintToImages(final TestUI testUI, + final boolean saveImages) { + final List images = new ArrayList<>(scales.length); + final JComponent content = testUI.content; + for (double scale : scales) { BufferedImage image = - new BufferedImage((int) Math.ceil(content.getWidth() * scaling), - (int) Math.ceil(content.getHeight() * scaling), + new BufferedImage((int) Math.ceil(content.getWidth() * scale), + (int) Math.ceil(content.getHeight() * scale), BufferedImage.TYPE_INT_ARGB); Graphics2D g2d = image.createGraphics(); - g2d.scale(scaling, scaling); + g2d.scale(scale, scale); content.paint(g2d); g2d.dispose(); if (saveImages) { - saveImage(image, getImageFileName(scaling)); + saveImage(image, getImageFileName(scale, testUI.thickness)); } - images.add(image); + images.add(new TestImage(image, testUI.panelLocations, + scale, testUI.thickness)); } + return images; } - private static String getImageFileName(final double scaling) { - return String.format("test%.2f.png", scaling); + private static String getImageFileName(final double scaling, + final int thickness) { + return String.format("test%02d@%.2f.png", thickness, scaling); } private static void saveImage(BufferedImage image, String filename) { diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/swing/border/LineBorder/ScaledTextFieldBorderTest.java openjdk-25-25.0.2+10/test/jdk/javax/swing/border/LineBorder/ScaledTextFieldBorderTest.java --- openjdk-25-25.0.1+8/test/jdk/javax/swing/border/LineBorder/ScaledTextFieldBorderTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/swing/border/LineBorder/ScaledTextFieldBorderTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 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,12 +44,15 @@ import javax.swing.SwingUtilities; import javax.swing.border.LineBorder; +import static sun.java2d.pipe.Region.clipRound; + /* * @test - * @bug 8282958 + * @bug 8282958 8349188 * @summary Verify all the borders are rendered consistently for a JTextField * in Windows LaF which uses LineBorder * @requires (os.family == "windows") + * @modules java.desktop/sun.java2d.pipe * @run main ScaledTextFieldBorderTest */ public class ScaledTextFieldBorderTest { @@ -92,7 +95,7 @@ BufferedImage img = images.get(i); double scaling = scales[i]; try { - int thickness = (int) Math.floor(scaling); + int thickness = clipRound(scaling); checkVerticalBorders(textFieldSize.width / 2, thickness, img); diff -Nru openjdk-25-25.0.1+8/test/jdk/javax/swing/plaf/basic/BasicTextUI/PasswordSelectionWordTest.java openjdk-25-25.0.2+10/test/jdk/javax/swing/plaf/basic/BasicTextUI/PasswordSelectionWordTest.java --- openjdk-25-25.0.1+8/test/jdk/javax/swing/plaf/basic/BasicTextUI/PasswordSelectionWordTest.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/javax/swing/plaf/basic/BasicTextUI/PasswordSelectionWordTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,94 @@ +/* + * 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 + * @key headful + * @bug 4231444 8354646 + * @summary Password fields' ActionMap needs to replace + * DefaultEditorKit.selectWordAction with + * DefaultEditorKit.selectLineAction. + * + * @run main PasswordSelectionWordTest + */ + +import javax.swing.Action; +import javax.swing.JPasswordField; +import javax.swing.SwingUtilities; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; +import javax.swing.plaf.basic.BasicTextUI; +import javax.swing.text.DefaultEditorKit; +import java.awt.event.ActionEvent; + +public class PasswordSelectionWordTest { + public static void main(String[] args) throws Exception { + for (UIManager.LookAndFeelInfo laf : + UIManager.getInstalledLookAndFeels()) { + System.out.println("Testing LAF: " + laf.getClassName()); + SwingUtilities.invokeAndWait(() -> { + if (setLookAndFeel(laf)) { + runTest(); + } + }); + } + } + + private static boolean setLookAndFeel(UIManager.LookAndFeelInfo laf) { + try { + UIManager.setLookAndFeel(laf.getClassName()); + return true; + } catch (UnsupportedLookAndFeelException e) { + System.err.println("Skipping unsupported look and feel:"); + e.printStackTrace(); + return false; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + private static void runTest() { + String str = "one two three"; + JPasswordField field = new JPasswordField(str); + if (!(field.getUI() instanceof BasicTextUI)) { + throw new RuntimeException("Unexpected condition: JPasswordField UI was " + field.getUI()); + } + System.out.println("Testing " + field.getUI()); + + // do something (anything) to initialize the Views: + field.setSize(100, 100); + field.addNotify(); + + Action action = field.getActionMap().get( + DefaultEditorKit.selectWordAction); + action.actionPerformed(new ActionEvent(field, 0, "")); + int selectionStart = field.getSelectionStart(); + int selectionEnd = field.getSelectionEnd(); + System.out.println("selectionStart = " + selectionStart); + System.out.println("selectionEnd = " + selectionEnd); + if (selectionStart != 0 || selectionEnd != str.length()) { + throw new RuntimeException("selectionStart = " + selectionStart + + " and selectionEnd = " + selectionEnd); + } + } +} diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/incubator/vector/BasicFloat16ArithTests.java openjdk-25-25.0.2+10/test/jdk/jdk/incubator/vector/BasicFloat16ArithTests.java --- openjdk-25-25.0.1+8/test/jdk/jdk/incubator/vector/BasicFloat16ArithTests.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/incubator/vector/BasicFloat16ArithTests.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2024, 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 @@ -23,7 +23,7 @@ /* * @test - * @bug 8329817 8334432 8339076 8341260 + * @bug 8329817 8334432 8339076 8341260 8362207 * @modules jdk.incubator.vector * @summary Basic tests of Float16 arithmetic and similar operations */ @@ -186,7 +186,7 @@ for(var testCase : testCases) { float arg = testCase[0]; float expected = testCase[1]; - Float16 result = negate(valueOf(arg)); + Float16 result = negate(valueOfExact(arg)); if (Float.compare(expected, result.floatValue()) != 0) { checkFloat16(result, expected, "negate(" + arg + ")"); @@ -213,7 +213,7 @@ for(var testCase : testCases) { float arg = testCase[0]; float expected = testCase[1]; - Float16 result = abs(valueOf(arg)); + Float16 result = abs(valueOfExact(arg)); if (Float.compare(expected, result.floatValue()) != 0) { checkFloat16(result, expected, "abs(" + arg + ")"); @@ -238,7 +238,7 @@ }; for(var testCase : testCases) { - boolean result = isNaN(valueOf(testCase)); + boolean result = isNaN(valueOfExact(testCase)); if (result) { throwRE("isNaN returned true for " + testCase); } @@ -254,8 +254,8 @@ }; for(var infinity : infinities) { - boolean result1 = isFinite(valueOf(infinity)); - boolean result2 = isInfinite(valueOf(infinity)); + boolean result1 = isFinite(valueOfExact(infinity)); + boolean result2 = isInfinite(valueOfExact(infinity)); if (result1) { throwRE("Float16.isFinite returned true for " + infinity); @@ -282,8 +282,8 @@ }; for(var finity : finities) { - boolean result1 = isFinite(valueOf(finity)); - boolean result2 = isInfinite(valueOf(finity)); + boolean result1 = isFinite(valueOfExact(finity)); + boolean result2 = isInfinite(valueOfExact(finity)); if (!result1) { throwRE("Float16.isFinite returned true for " + finity); @@ -301,12 +301,12 @@ float small = 1.0f; float large = 2.0f; - if (min(valueOf(small), valueOf(large)).floatValue() != small) { + if (min(valueOfExact(small), valueOfExact(large)).floatValue() != small) { throwRE(String.format("min(%g, %g) not equal to %g)", small, large, small)); } - if (max(valueOf(small), valueOf(large)).floatValue() != large) { + if (max(valueOfExact(small), valueOfExact(large)).floatValue() != large) { throwRE(String.format("max(%g, %g) not equal to %g)", small, large, large)); } @@ -318,10 +318,10 @@ */ private static void checkArith() { float a = 1.0f; - Float16 a16 = valueOf(a); + Float16 a16 = valueOfExact(a); float b = 2.0f; - Float16 b16 = valueOf(b); + Float16 b16 = valueOfExact(b); if (add(a16, b16).floatValue() != (a + b)) { throwRE("failure with " + a16 + " + " + b16); @@ -371,7 +371,7 @@ for(var testCase : testCases) { float arg = testCase[0]; float expected = testCase[1]; - Float16 result = sqrt(valueOf(arg)); + Float16 result = sqrt(valueOfExact(arg)); if (Float.compare(expected, result.floatValue()) != 0) { checkFloat16(result, expected, "sqrt(" + arg + ")"); @@ -409,7 +409,7 @@ float arg = testCase[0]; float expected = testCase[1]; // Exponents are in-range for Float16 - Float16 result = valueOf(getExponent(valueOf(arg))); + Float16 result = valueOfExact(getExponent(valueOfExact(arg))); if (Float.compare(expected, result.floatValue()) != 0) { checkFloat16(result, expected, "getExponent(" + arg + ")"); @@ -445,7 +445,7 @@ float arg = testCase[0]; float expected = testCase[1]; // Exponents are in-range for Float16 - Float16 result = ulp(valueOf(arg)); + Float16 result = ulp(valueOfExact(arg)); if (Float.compare(expected, result.floatValue()) != 0) { checkFloat16(result, expected, "ulp(" + arg + ")"); @@ -602,7 +602,7 @@ String input = testCase.input(); float expected = testCase.expected(); Float16 result = Float16.valueOf(input); - checkFloat16(result, expected, "Float16.valueOf(String) " + input); + checkFloat16(result, expected, "Float16.valueOfExact(String) " + input); } List negativeCases = List.of("0x1", @@ -747,7 +747,7 @@ } private static void testSimple() { - final float ulpOneFp16 = ulp(valueOf(1.0f)).floatValue(); + final float ulpOneFp16 = ulp(valueOfExact(1.0f)).floatValue(); float [][] testCases = { {1.0f, 2.0f, 3.0f, @@ -781,7 +781,7 @@ } private static void testRounding() { - final float ulpOneFp16 = ulp(valueOf(1.0f)).floatValue(); + final float ulpOneFp16 = ulp(valueOfExact(1.0f)).floatValue(); float [][] testCases = { // The product is equal to @@ -816,6 +816,11 @@ {0x1.ffcp-14f, 0x1.0p-24f, 0x1.0p14f, // *Cannot* be held exactly 0x1.0p14f}, + // Arguments where using float fma or uniform float + // arithmetic gives the wrong result + {0x1.08p7f, 0x1.04p7f, 0x1.0p-24f, + 0x1.0c4p14f}, + // Check values where the exact result cannot be // exactly stored in a double. {0x1.0p-24f, 0x1.0p-24f, 0x1.0p10f, @@ -839,10 +844,10 @@ } private static void testFusedMacCase(float input1, float input2, float input3, float expected) { - Float16 a = valueOf(input1); - Float16 b = valueOf(input2); - Float16 c = valueOf(input3); - Float16 d = valueOf(expected); + Float16 a = valueOfExact(input1); + Float16 b = valueOfExact(input2); + Float16 c = valueOfExact(input3); + Float16 d = valueOfExact(expected); test("Float16.fma(float)", a, b, c, Float16.fma(a, b, c), d); @@ -865,4 +870,20 @@ throw new RuntimeException(); } } + + /** + * {@return a Float16 value converted from the {@code float} + * argument throwing an {@code ArithmeticException} if the + * conversion is inexact}. + * + * @param f the {@code float} value to convert exactly + * @throws ArithmeticException + */ + private static Float16 valueOfExact(float f) { + Float16 f16 = valueOf(f); + if (Float.compare(f16.floatValue(), f) != 0) { + throw new ArithmeticException("Inexact conversion to Float16 of float value " + f); + } + return f16; + } } diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/GetFreeSwapSpaceSize.java openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/GetFreeSwapSpaceSize.java --- openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/GetFreeSwapSpaceSize.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/GetFreeSwapSpaceSize.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020, 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2020, 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestDockerBasic.java openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerBasic.java --- openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestDockerBasic.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerBasic.java 2025-12-18 08:04:02.000000000 +0000 @@ -28,6 +28,7 @@ * @summary Verify that -XshowSettings:system works * @key cgroups * @requires container.support + * @requires !vm.asan * @library /test/lib * @run main/timeout=360 TestDockerBasic */ diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestDockerCpuMetrics.java openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerCpuMetrics.java --- openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestDockerCpuMetrics.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerCpuMetrics.java 2025-12-18 08:04:02.000000000 +0000 @@ -35,6 +35,7 @@ * @key cgroups * @summary Test JDK Metrics class when running inside docker container * @requires container.support + * @requires !vm.asan * @library /test/lib * @modules java.base/jdk.internal.platform * @build MetricsCpuTester diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java --- openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java 2025-12-18 08:04:02.000000000 +0000 @@ -33,6 +33,7 @@ * @key cgroups * @summary Test JDK Metrics class when running inside docker container * @requires container.support + * @requires !vm.asan * @library /test/lib * @modules java.base/jdk.internal.platform * @build MetricsMemoryTester diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetricsSubgroup.java openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetricsSubgroup.java --- openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetricsSubgroup.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetricsSubgroup.java 2025-12-18 08:04:02.000000000 +0000 @@ -40,6 +40,7 @@ * @key cgroups * @summary Cgroup v1 subsystem fails to set subsystem path * @requires container.support + * @requires !vm.asan * @library /test/lib * @modules java.base/jdk.internal.platform * @build MetricsMemoryTester diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestGetFreeSwapSpaceSize.java openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestGetFreeSwapSpaceSize.java --- openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestGetFreeSwapSpaceSize.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestGetFreeSwapSpaceSize.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020, 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2020, 2022, Tencent. All rights reserved. * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -27,6 +27,7 @@ * @key cgroups * @bug 8242480 * @requires container.support + * @requires !vm.asan * @library /test/lib * @build GetFreeSwapSpaceSize * @run driver TestGetFreeSwapSpaceSize diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestLimitsUpdating.java openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestLimitsUpdating.java --- openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestLimitsUpdating.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestLimitsUpdating.java 2025-12-18 08:04:02.000000000 +0000 @@ -30,6 +30,7 @@ * @key cgroups * @summary Test container limits updating as they get updated at runtime without restart * @requires container.support + * @requires !vm.asan * @library /test/lib * @modules java.base/jdk.internal.platform * @build LimitUpdateChecker diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestPidsLimit.java openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestPidsLimit.java --- openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestPidsLimit.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestPidsLimit.java 2025-12-18 08:04:02.000000000 +0000 @@ -28,6 +28,7 @@ * @summary Test JDK Metrics class when running inside a docker container with limited pids * @bug 8266490 * @requires container.support + * @requires !vm.asan * @library /test/lib * @build TestPidsLimit * @run driver TestPidsLimit diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestSystemMetrics.java openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestSystemMetrics.java --- openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestSystemMetrics.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestSystemMetrics.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,6 +26,7 @@ * @key cgroups * @summary Test JDK Metrics class when running inside docker container * @requires container.support + * @requires !vm.asan * @library /test/lib * @modules java.base/jdk.internal.platform * @run main TestSystemMetrics diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestUseContainerSupport.java openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestUseContainerSupport.java --- openjdk-25-25.0.1+8/test/jdk/jdk/internal/platform/docker/TestUseContainerSupport.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/internal/platform/docker/TestUseContainerSupport.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,6 +26,7 @@ * @test * @summary UseContainerSupport flag should reflect Metrics being available * @requires container.support + * @requires !vm.asan * @library /test/lib * @modules java.base/jdk.internal.platform * @build CheckUseContainerSupport diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/jfr/api/flightrecorder/TestSettingsControl.java openjdk-25-25.0.2+10/test/jdk/jdk/jfr/api/flightrecorder/TestSettingsControl.java --- openjdk-25-25.0.1+8/test/jdk/jdk/jfr/api/flightrecorder/TestSettingsControl.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/jfr/api/flightrecorder/TestSettingsControl.java 2025-12-18 08:04:02.000000000 +0000 @@ -28,6 +28,7 @@ import java.util.Set; import jdk.jfr.Event; +import jdk.jfr.Name; import jdk.jfr.Recording; import jdk.jfr.SettingControl; import jdk.jfr.SettingDefinition; @@ -42,7 +43,7 @@ public class TestSettingsControl { static class MySettingsControl extends SettingControl { - public static boolean setWasCalled; + public static boolean myvalueSet; private String value = "default"; @@ -57,7 +58,9 @@ @Override public void setValue(String value) { - setWasCalled = true; + if ("myvalue".equals(value)) { + myvalueSet = true; + } this.value = value; } @@ -67,9 +70,10 @@ } } - + @Name("M") static class MyCustomSettingEvent extends Event { @SettingDefinition + @Name("m") boolean mySetting(MySettingsControl msc) { return true; } @@ -77,13 +81,13 @@ public static void main(String[] args) throws Throwable { Recording r = new Recording(); - r.enable(MyCustomSettingEvent.class).with("mySetting", "myvalue"); + r.enable("M").with("m", "myvalue"); r.start(); MyCustomSettingEvent e = new MyCustomSettingEvent(); e.commit(); r.stop(); r.close(); - assertTrue(MySettingsControl.setWasCalled, "SettingControl.setValue was not called"); + assertTrue(MySettingsControl.myvalueSet, "SettingControl.setValue(\"myvalue\") was not called"); } } diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/gc/configuration/TestGCHeapConfigurationEventWith32BitOops.java openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/gc/configuration/TestGCHeapConfigurationEventWith32BitOops.java --- openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/gc/configuration/TestGCHeapConfigurationEventWith32BitOops.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/gc/configuration/TestGCHeapConfigurationEventWith32BitOops.java 2025-12-18 08:04:02.000000000 +0000 @@ -35,6 +35,8 @@ * @requires vm.gc == "Parallel" | vm.gc == null * @requires os.family == "linux" | os.family == "windows" * @requires sun.arch.data.model == "64" + * @comment Asan changes memory layout and we get a different coops mode + * @requires !vm.asan * @library /test/lib /test/jdk * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/gc/configuration/TestGCHeapConfigurationEventWithZeroBasedOops.java openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/gc/configuration/TestGCHeapConfigurationEventWithZeroBasedOops.java --- openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/gc/configuration/TestGCHeapConfigurationEventWithZeroBasedOops.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/gc/configuration/TestGCHeapConfigurationEventWithZeroBasedOops.java 2025-12-18 08:04:02.000000000 +0000 @@ -33,6 +33,8 @@ * @requires vm.gc == "Parallel" | vm.gc == null * @requires os.family == "linux" | os.family == "windows" * @requires sun.arch.data.model == "64" + * @comment Asan changes memory layout and we get a different coops mode + * @requires !vm.asan * @library /test/lib /test/jdk * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:-UseFastUnorderedTimeStamps -XX:+UseParallelGC -XX:+UseCompressedOops -Xmx4g jdk.jfr.event.gc.configuration.TestGCHeapConfigurationEventWithZeroBasedOops */ diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/gc/detailed/TestGCHeapMemoryUsageEvent.java openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/gc/detailed/TestGCHeapMemoryUsageEvent.java --- openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/gc/detailed/TestGCHeapMemoryUsageEvent.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/gc/detailed/TestGCHeapMemoryUsageEvent.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 @@ -49,7 +49,7 @@ List events = Events.fromRecording(recording); System.out.println(events); assertFalse(events.isEmpty()); - RecordedEvent event = events.getFirst(); + RecordedEvent event = events.getLast(); Events.assertField(event, "used").above(0L); Events.assertField(event, "committed").above(0L); Events.assertField(event, "max").above(0L); diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/io/TestIOTopFrame.java openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/io/TestIOTopFrame.java --- openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/io/TestIOTopFrame.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/io/TestIOTopFrame.java 2025-12-18 08:04:02.000000000 +0000 @@ -52,6 +52,7 @@ import java.util.Map; import java.util.TreeMap; import java.util.concurrent.Callable; +import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -246,8 +247,10 @@ r.enable(EVENT_SOCKET_READ).withStackTrace(); r.enable(EVENT_SOCKET_WRITE).withStackTrace(); r.start(); - Thread readerThread = Thread.ofPlatform().start(() -> readSocketChannel(ssc)); + CountDownLatch latch = new CountDownLatch(1); + Thread readerThread = Thread.ofPlatform().start(() -> readSocketChannel(ssc, latch)); writeSocketChannel(ssc); + latch.countDown(); readerThread.join(); r.stop(); assertTopFrames(r, "readSocket", 6, "readSocketChannel", 2, "writeSocket", 3, "writeSocketChannel", 2); @@ -255,13 +258,14 @@ } } - private static void readSocketChannel(ServerSocketChannel ssc) { + private static void readSocketChannel(ServerSocketChannel ssc, CountDownLatch latch) { 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); + latch.await(); } } catch (Exception ioe) { throw new RuntimeException(ioe); diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/oldobject/TestEmergencyDumpAtOOM.java openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/oldobject/TestEmergencyDumpAtOOM.java --- openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/oldobject/TestEmergencyDumpAtOOM.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/oldobject/TestEmergencyDumpAtOOM.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2025, NTT DATA. + * 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.oldobject; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.atomic.AtomicReference; +import jdk.jfr.consumer.EventStream; +import jdk.jfr.consumer.RecordingFile; + +import jdk.test.lib.Asserts; +import jdk.test.lib.process.OutputAnalyzer; +import jdk.test.lib.process.ProcessTools; + +/** +* @test +* @bug 8364090 +* @summary Tests Dump reason and OldObjectSample events at OOME. +* @requires vm.flagless +* @requires vm.hasJFR +* @library /test/lib +* @run main/othervm jdk.jfr.event.oldobject.TestEmergencyDumpAtOOM +*/ +public class TestEmergencyDumpAtOOM { + + public static List DEFAULT_LEAKER_ARGS = List.of( + "-Xmx64m", + "-XX:TLABSize=2k", + "-XX:StartFlightRecording:dumponexit=true,filename=oom.jfr", + Leaker.class.getName() + ); + + public static class Leaker { + public static void main(String... args) { + List list = new ArrayList<>(); + while (true) { + list.add(new byte[1024]); + } + } + } + + private static void test(boolean shouldCrash) throws Exception { + List args = new ArrayList<>(DEFAULT_LEAKER_ARGS); + if (shouldCrash) { + args.add(0, "-XX:+CrashOnOutOfMemoryError"); + } + + while (true) { + Process p = ProcessTools.createTestJavaProcessBuilder(args).start(); + p.waitFor(); + OutputAnalyzer output = new OutputAnalyzer(p); + if (!output.contains("java.lang.OutOfMemoryError")) { + throw new RuntimeException("OutOfMemoryError did not happen."); + } + + // Check recording file + String jfrFileName = shouldCrash ? String.format("hs_err_pid%d.jfr", p.pid()) : "oom.jfr"; + Path jfrPath = Path.of(jfrFileName); + Asserts.assertTrue(Files.exists(jfrPath), "No jfr recording file " + jfrFileName + " exists"); + + // Check events + AtomicLong oldObjects = new AtomicLong(); + AtomicReference shutdownReason = new AtomicReference<>(); + AtomicReference dumpReason = new AtomicReference<>(); + try (EventStream stream = EventStream.openFile(jfrPath)) { + stream.onEvent("jdk.OldObjectSample", e -> oldObjects.incrementAndGet()); + stream.onEvent("jdk.Shutdown", e -> shutdownReason.set(e.getString("reason"))); + stream.onEvent("jdk.DumpReason", e -> dumpReason.set(e.getString("reason"))); + stream.start(); + } + + // Check OldObjectSample events + if (oldObjects.get() > 0L) { + if (shouldCrash) { + Asserts.assertEquals("VM Error", shutdownReason.get()); + Asserts.assertEquals("Out of Memory", dumpReason.get()); + } else { + Asserts.assertEquals("No remaining non-daemon Java threads", shutdownReason.get()); + } + // Passed this test + return; + } + + System.out.println("Could not find OldObjectSample events. Retrying."); + } + } + + public static void main(String... args) throws Exception { + test(true); + test(false); + } +} diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleThrottling.java openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleThrottling.java --- openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleThrottling.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/profiling/TestCPUTimeSampleThrottling.java 2025-12-18 08:04:02.000000000 +0000 @@ -23,6 +23,7 @@ package jdk.jfr.event.profiling; import java.lang.management.ManagementFactory; +import java.lang.management.ThreadMXBean; import java.time.Duration; import java.time.Instant; import java.util.List; @@ -71,7 +72,7 @@ } /** - * Counting the events that are emitted for a given throttle in a given time. + * Counting the events that are emitted for a given throttle in a given (CPU) time. *

    * The result is wall-clock independent; it only records the CPU-time and the number of * emitted events. The result, therefore, does not depend on the load of the machine. @@ -83,15 +84,9 @@ recording.enable(EventNames.CPUTimeSample) .with("throttle", throttle); - var bean = ManagementFactory.getThreadMXBean(); - recording.start(); - long startThreadCpuTime = bean.getCurrentThreadCpuTime(); - - wasteCPU(timeMs); - - long spendCPUTime = bean.getCurrentThreadCpuTime() - startThreadCpuTime; + long spendCPUTime = wasteCPU(timeMs); recording.stop(); @@ -99,19 +94,20 @@ .filter(e -> e.getThread().getJavaName() .equals(Thread.currentThread().getName())) .count(); - return new EventCount(eventCount, spendCPUTime / 1_000_000_000f); } } - private static void wasteCPU(int durationMs) { - long start = System.currentTimeMillis(); + private static long wasteCPU(int durationMs) { + ThreadMXBean bean = ManagementFactory.getThreadMXBean(); + long start = bean.getCurrentThreadCpuTime(); double i = 0; - while (System.currentTimeMillis() - start < durationMs) { + while (bean.getCurrentThreadCpuTime() - start < durationMs * 1_000_000) { for (int j = 0; j < 100000; j++) { i = Math.sqrt(i * Math.pow(Math.sqrt(Math.random()), Math.random())); } } + return bean.getCurrentThreadCpuTime() - start; } } diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/tracing/TestMethodTrace.java openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/tracing/TestMethodTrace.java --- openjdk-25-25.0.1+8/test/jdk/jdk/jfr/event/tracing/TestMethodTrace.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/jfr/event/tracing/TestMethodTrace.java 2025-12-18 08:04:02.000000000 +0000 @@ -22,6 +22,8 @@ */ package jdk.jfr.event.tracing; +import java.time.Duration; +import java.util.List; import java.util.concurrent.atomic.AtomicReference; import jdk.jfr.Event; @@ -29,7 +31,9 @@ import jdk.jfr.consumer.RecordedEvent; import jdk.jfr.consumer.RecordedMethod; import jdk.jfr.consumer.RecordingStream; +import jdk.jfr.Recording; +import jdk.test.lib.jfr.Events; /** * @test * @summary Basic test of the MethodTrace event. @@ -52,6 +56,31 @@ } public static void main(String... args) throws Exception { + testWithoutThreshold(); + testWithThreshold(); + } + + private static void testWithThreshold() throws Exception { + try (Recording r = new Recording()) { + r.enable(EVENT_NAME) + .with("filter", CLASS_NAME + "::printHello") + .withThreshold(Duration.ofHours(1)); + r.start(); + printHello(); + r.stop(); + List events = Events.fromRecording(r); + if (!events.isEmpty()) { + System.out.println(events); + throw new Exception("Unexpected MethodTrace event"); + } + } + } + + public static void printHello() { + System.out.println("Hello!"); + } + + private static void testWithoutThreshold() throws Exception { AtomicReference o = new AtomicReference<>(); AtomicReference i = new AtomicReference<>(); AtomicReference e = new AtomicReference<>(); diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/jfr/jmx/streaming/TestEnableDisable.java openjdk-25-25.0.2+10/test/jdk/jdk/jfr/jmx/streaming/TestEnableDisable.java --- openjdk-25-25.0.1+8/test/jdk/jdk/jfr/jmx/streaming/TestEnableDisable.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/jfr/jmx/streaming/TestEnableDisable.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 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 @@ -36,7 +36,7 @@ /** * @test * @requires vm.flagless - * @summary Tests that event settings for a RemoteRecordingStream can be changed + * @summary Tests that the enabled setting can be configured for a RemoteRecordingStream * @requires vm.hasJFR * @library /test/lib /test/jdk * @run main/othervm jdk.jfr.jmx.streaming.TestEnableDisable diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/jfr/jmx/streaming/TestWithers.java openjdk-25-25.0.2+10/test/jdk/jdk/jfr/jmx/streaming/TestWithers.java --- openjdk-25-25.0.1+8/test/jdk/jdk/jfr/jmx/streaming/TestWithers.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/jfr/jmx/streaming/TestWithers.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,141 @@ +/* + * 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.jmx.streaming; + +import java.lang.management.ManagementFactory; +import java.time.Duration; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; +import java.util.function.Consumer; +import java.util.function.Predicate; + +import javax.management.MBeanServerConnection; + +import jdk.jfr.Event; +import jdk.jfr.EventSettings; +import jdk.jfr.FlightRecorder; +import jdk.jfr.Name; +import jdk.jfr.Period; +import jdk.jfr.StackTrace; +import jdk.jfr.Threshold; +import jdk.jfr.consumer.RecordedEvent; +import jdk.jfr.consumer.RecordedStackTrace; +import jdk.management.jfr.RemoteRecordingStream; + +/** + * @test + * @requires vm.flagless + * @summary Tests that event settings for a RemoteRecordingStream can be changed + * @requires vm.hasJFR + * @library /test/lib /test/jdk + * @run main/othervm jdk.jfr.jmx.streaming.TestWithers + */ +public class TestWithers { + private static final Set RESULT = Collections.synchronizedSet(new HashSet<>()); + + @Name("AA") + @StackTrace(false) + static class A extends Event { + } + + @Name("BB") + @StackTrace(true) + static class B extends Event { + } + + @Name("CC") + @Threshold("10 h") + static class C extends Event { + } + + @Name("DD") + @Threshold("10 h") + static class D extends Event { + } + + @Name("EE") + @StackTrace(false) + static class E extends Event { + } + + @Name("FF") + @Period("10 h") + static class F extends Event { + } + + public static void main(String... args) throws Exception { + MBeanServerConnection conn = ManagementFactory.getPlatformMBeanServer(); + try (RemoteRecordingStream stream = new RemoteRecordingStream(conn)) { + addCheck(stream, es -> es.withStackTrace(), "AA", TestWithers::hasStackTrace); + addCheck(stream, es -> es.withoutStackTrace(), "BB", e -> !hasStackTrace(e)); + addCheck(stream, es -> es.withThreshold(Duration.ofMillis(0)), "CC", e -> true); + addCheck(stream, es -> es.withoutThreshold(), "DD", e -> true); + addCheck(stream, es -> es.with("stackTrace", "true"), "EE", TestWithers::hasStackTrace); + addCheck(stream, es -> es.withPeriod(Duration.ofMillis(700)), "FF", e -> true); + FlightRecorder.addPeriodicEvent(F.class, () -> { + F f = new F(); + f.commit(); + }); + stream.onFlush(() -> { + System.out.println(RESULT); + if (RESULT.size() == 6) { + stream.close(); + } + }); + + stream.startAsync(); + A a = new A(); + a.commit(); + + B b = new B(); + b.commit(); + + C c = new C(); + c.commit(); + + D d = new D(); + d.commit(); + + E e = new E(); + e.commit(); + + stream.awaitTermination(); + } + } + + private static void addCheck(RemoteRecordingStream stream, Consumer es, String eventName, Predicate validator) { + es.accept(stream.enable(eventName)); + stream.onEvent(eventName, e -> { + System.out.println(e); + if (validator.test(e)) { + RESULT.add(eventName); + } + }); + } + + private static boolean hasStackTrace(RecordedEvent e) { + RecordedStackTrace rs = e.getStackTrace(); + return rs != null && !rs.getFrames().isEmpty(); + } +} \ No newline at end of file diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/jfr/tool/TestPrintContextual.java openjdk-25-25.0.2+10/test/jdk/jdk/jfr/tool/TestPrintContextual.java --- openjdk-25-25.0.1+8/test/jdk/jdk/jfr/tool/TestPrintContextual.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/jfr/tool/TestPrintContextual.java 2025-12-18 08:04:02.000000000 +0000 @@ -410,6 +410,7 @@ private static List readPrintedLines(Path file, String... options) throws Exception { JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jfr"); launcher.addToolArg("print"); + launcher.addToolArg("--exact"); for (String option : options) { launcher.addToolArg(option); } diff -Nru openjdk-25-25.0.1+8/test/jdk/jdk/nio/zipfs/NewFileSystemTests.java openjdk-25-25.0.2+10/test/jdk/jdk/nio/zipfs/NewFileSystemTests.java --- openjdk-25-25.0.1+8/test/jdk/jdk/nio/zipfs/NewFileSystemTests.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/jdk/nio/zipfs/NewFileSystemTests.java 2025-12-18 08:04:02.000000000 +0000 @@ -25,6 +25,7 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import org.testng.SkipException; import java.io.IOException; import java.net.URI; @@ -35,6 +36,7 @@ import java.nio.file.Path; import java.util.Iterator; import java.util.Map; +import jdk.test.lib.Platform; import static java.nio.charset.StandardCharsets.UTF_8; import static org.testng.Assert.assertEquals; @@ -48,6 +50,7 @@ * @bug 8218875 * @summary ZIP File System tests that leverage Files.newFileSystem * @modules jdk.zipfs + * @library /test/lib * @compile NewFileSystemTests.java * @run testng NewFileSystemTests */ @@ -219,6 +222,9 @@ */ @Test public void readOnlyZipFileFailure() throws IOException { + if (Platform.isRoot()) { + throw new SkipException("Test skipped when executed by root user."); + } // Underlying file is read-only. Path readOnlyZip = Utils.createJarFile("read_only.zip", Map.of("file.txt", "Hello World")); // In theory this can fail, and we should avoid unwanted false-negatives. diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/awt/font/TestDevTransform.java openjdk-25-25.0.2+10/test/jdk/sun/awt/font/TestDevTransform.java --- openjdk-25-25.0.1+8/test/jdk/sun/awt/font/TestDevTransform.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/awt/font/TestDevTransform.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -22,9 +22,31 @@ */ /* - * @test + * @test id=dialog_double * @bug 4269775 8341535 * @summary Check that different text rendering APIs agree + * @run main/othervm TestDevTransform DIALOG DOUBLE + */ + +/* + * @test id=dialog_float + * @bug 4269775 8341535 + * @summary Check that different text rendering APIs agree + * @run main/othervm TestDevTransform DIALOG FLOAT + */ + +/* + * @test id=monospaced_double + * @bug 4269775 8341535 + * @summary Check that different text rendering APIs agree + * @run main/othervm TestDevTransform MONOSPACED DOUBLE + */ + +/* + * @test id=monospaced_float + * @bug 4269775 8341535 + * @summary Check that different text rendering APIs agree + * @run main/othervm TestDevTransform MONOSPACED FLOAT */ /** @@ -66,6 +88,8 @@ static String test = "This is only a test"; static double angle = Math.PI / 6.0; // Rotate 30 degrees static final int W = 400, H = 400; + static boolean useDialog; + static boolean useDouble; static void draw(Graphics2D g2d, TextLayout layout, float x, float y, float scalex) { @@ -101,9 +125,19 @@ g2d.setColor(Color.white); g2d.fillRect(0, 0, W, H); g2d.setColor(Color.black); - g2d.scale(1.481f, 1.481); // Convert to 108 dpi + if (useDouble) { + g2d.scale(1.481, 1.481); // Convert to 108 dpi + } else { + g2d.scale(1.481f, 1.481f); // Convert to 108 dpi + } g2d.addRenderingHints(hints); - Font font = new Font(Font.DIALOG, Font.PLAIN, 12); + String name; + if (useDialog) { + name = Font.DIALOG; + } else { + name = Font.MONOSPACED; + } + Font font = new Font(name, Font.PLAIN, 12); g2d.setFont(font); } @@ -135,6 +169,12 @@ } public static void main(String args[]) throws Exception { + if (args[0].equals("DIALOG")) { + useDialog = true; + } + if (args[1].equals("DOUBLE")) { + useDouble = true; + } BufferedImage tl_Image = new BufferedImage(W, H, BufferedImage.TYPE_INT_RGB); { diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/java2d/cmm/ColorConvertOp/FilterSemiCustomImages.java openjdk-25-25.0.2+10/test/jdk/sun/java2d/cmm/ColorConvertOp/FilterSemiCustomImages.java --- openjdk-25-25.0.1+8/test/jdk/sun/java2d/cmm/ColorConvertOp/FilterSemiCustomImages.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/java2d/cmm/ColorConvertOp/FilterSemiCustomImages.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,162 @@ +/* + * Copyright Amazon.com Inc. 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. + */ + +import java.awt.Color; +import java.awt.Point; +import java.awt.color.ColorSpace; +import java.awt.image.BufferedImage; +import java.awt.image.ColorConvertOp; +import java.awt.image.ColorModel; +import java.awt.image.SampleModel; +import java.awt.image.WritableRaster; +import java.io.File; + +import javax.imageio.ImageIO; + +import static java.awt.image.BufferedImage.TYPE_3BYTE_BGR; +import static java.awt.image.BufferedImage.TYPE_4BYTE_ABGR; +import static java.awt.image.BufferedImage.TYPE_4BYTE_ABGR_PRE; +import static java.awt.image.BufferedImage.TYPE_INT_ARGB; +import static java.awt.image.BufferedImage.TYPE_INT_ARGB_PRE; +import static java.awt.image.BufferedImage.TYPE_INT_BGR; +import static java.awt.image.BufferedImage.TYPE_INT_RGB; +import static java.awt.image.BufferedImage.TYPE_USHORT_GRAY; + +/** + * @test + * @bug 8366208 + * @summary Verifies ColorConvertOp works correctly with BufferedImage and + * semi-custom raster + */ +public final class FilterSemiCustomImages { + + private static final int W = 144; + private static final int H = 123; + + private static final int[] TYPES = { + TYPE_INT_RGB, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE, TYPE_INT_BGR, + TYPE_3BYTE_BGR, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE, + TYPE_USHORT_GRAY + }; + + private static final int[] CSS = { + ColorSpace.CS_CIEXYZ, ColorSpace.CS_GRAY, ColorSpace.CS_LINEAR_RGB, + ColorSpace.CS_PYCC, ColorSpace.CS_sRGB + }; + + private static final class CustomRaster extends WritableRaster { + CustomRaster(SampleModel sampleModel, Point origin) { + super(sampleModel, origin); + } + } + + public static void main(String[] args) throws Exception { + for (int fromIndex : CSS) { + for (int toIndex : CSS) { + if (fromIndex != toIndex) { + for (int type : TYPES) { + test(fromIndex, toIndex, type); + } + } + } + } + } + + private static void test(int fromIndex, int toIndex, int type) + throws Exception + { + ColorSpace fromCS = ColorSpace.getInstance(fromIndex); + ColorSpace toCS = ColorSpace.getInstance(toIndex); + ColorConvertOp op = new ColorConvertOp(fromCS, toCS, null); + + // standard source -> standard dst + BufferedImage srcGold = new BufferedImage(W, H, type); + fill(srcGold); + BufferedImage dstGold = new BufferedImage(W, H, type); + op.filter(srcGold, dstGold); + + // custom source -> standard dst + BufferedImage srcCustom = makeCustomBI(srcGold); + fill(srcCustom); + BufferedImage dst = new BufferedImage(W, H, type); + op.filter(srcCustom, dst); + verify(dstGold, dst); + + // standard source -> custom dst + BufferedImage src = new BufferedImage(W, H, type); + fill(src); + BufferedImage dstCustom = makeCustomBI(dstGold); + op.filter(src, dstCustom); + verify(dstGold, dstCustom); + + // custom source -> custom dst + srcCustom = makeCustomBI(srcGold); + fill(srcCustom); + dstCustom = makeCustomBI(dstGold); + op.filter(srcCustom, dstCustom); + verify(dstGold, dstCustom); + } + + private static BufferedImage makeCustomBI(BufferedImage bi) { + ColorModel cm = bi.getColorModel(); + SampleModel sm = bi.getSampleModel(); + CustomRaster cr = new CustomRaster(sm, new Point()); + return new BufferedImage(cm, cr, bi.isAlphaPremultiplied(), null) { + @Override + public int getType() { + return bi.getType(); + } + }; + } + + private static void fill(BufferedImage image) { + int width = image.getWidth(); + int height = image.getHeight(); + for (int x = 0; x < width; ++x) { + for (int y = 0; y < height; ++y) { + // alpha channel may be calculated slightly differently on + // different code paths, so only check fully transparent and + // fully opaque pixels + Color c = new Color(y * 255 / (height - 1), + x * 255 / (width - 1), + x % 255, + (x % 2 == 0) ? 0 : 255); + image.setRGB(x, y, c.getRGB()); + } + } + } + + private static void verify(BufferedImage dstGold, BufferedImage dst) + throws Exception + { + for (int x = 0; x < W; ++x) { + for (int y = 0; y < H; ++y) { + if (dst.getRGB(x, y) != dstGold.getRGB(x, y)) { + ImageIO.write(dst, "png", new File("custom.png")); + ImageIO.write(dstGold, "png", new File("gold.png")); + throw new RuntimeException("Test failed."); + } + } + } + } +} diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/management/jmxremote/bootstrap/AbstractFilePermissionTest.java openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/AbstractFilePermissionTest.java --- openjdk-25-25.0.1+8/test/jdk/sun/management/jmxremote/bootstrap/AbstractFilePermissionTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/AbstractFilePermissionTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -35,7 +35,6 @@ import java.nio.file.attribute.PosixFilePermission; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -47,7 +46,6 @@ * @author Taras Ledkov */ public abstract class AbstractFilePermissionTest { - private final String TEST_CLASS_PATH = System.getProperty("test.class.path"); protected final String TEST_CLASSES = System.getProperty("test.classes"); protected final FileSystem FS = FileSystems.getDefault(); private int MAX_GET_FREE_PORT_TRIES = 10; @@ -169,11 +167,8 @@ final String pp = "-Dcom.sun.management.jmxremote.port=" + jdk.test.lib.Utils.getFreePort(); List command = new ArrayList<>(); - Collections.addAll(command, jdk.test.lib.Utils.getTestJavaOpts()); command.add(mp); command.add(pp); - command.add("-cp"); - command.add(TEST_CLASSES); command.add(className); ProcessBuilder processBuilder = ProcessTools.createTestJavaProcessBuilder(command); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.java openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.java --- openjdk-25-25.0.1+8/test/jdk/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/JMXInterfaceBindingTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,6 @@ /* * Copyright (c) 2015, Red Hat Inc + * 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 @@ -205,6 +206,7 @@ // This is needed for testing on loopback args.add("-Djava.rmi.server.hostname=" + address); if (useSSL) { + args.add("-Djdk.rmi.ssl.client.enableEndpointIdentification=false"); args.add("-Dcom.sun.management.jmxremote.registry.ssl=true"); args.add("-Djavax.net.ssl.keyStore=" + KEYSTORE_LOC); args.add("-Djavax.net.ssl.trustStore=" + TRUSTSTORE_LOC); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/management/jmxremote/bootstrap/LocalManagementTest.java openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/LocalManagementTest.java --- openjdk-25-25.0.1+8/test/jdk/sun/management/jmxremote/bootstrap/LocalManagementTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/LocalManagementTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -24,12 +24,10 @@ import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.concurrent.atomic.AtomicReference; import jdk.test.lib.process.ProcessTools; -import jdk.test.lib.Utils; /** * @test @@ -48,7 +46,6 @@ * @run main/othervm/timeout=300 LocalManagementTest */ public class LocalManagementTest { - private static final String TEST_CLASSPATH = System.getProperty("test.class.path"); public static void main(String[] args) throws Exception { int failures = 0; @@ -99,16 +96,13 @@ private static boolean doTest(String testId, String arg) throws Exception { List args = new ArrayList<>(); args.add("-XX:+UsePerfData"); - Collections.addAll(args, Utils.getTestJavaOpts()); - args.add("-cp"); - args.add(TEST_CLASSPATH); if (arg != null) { args.add(arg); } args.add("TestApplication"); ProcessBuilder server = ProcessTools.createTestJavaProcessBuilder( - args.toArray(new String[args.size()]) + args.toArray(new String[0]) ); Process serverPrc = null, clientPrc = null; @@ -134,8 +128,6 @@ System.out.println(" shutdown port : " + port.get()); ProcessBuilder client = ProcessTools.createTestJavaProcessBuilder( - "-cp", - TEST_CLASSPATH, "--add-exports", "jdk.management.agent/jdk.internal.agent=ALL-UNNAMED", "TestManager", String.valueOf(serverPrc.pid()), diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java --- openjdk-25-25.0.1+8/test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/RmiBootstrapTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, 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 @@ -169,6 +169,7 @@ final List credentialFiles = prepareTestFiles(args[0]); Security.setProperty("jdk.tls.disabledAlgorithms", ""); + System.setProperty("jdk.rmi.ssl.client.enableEndpointIdentification", "false"); try { MAX_GET_FREE_PORT_TRIES = Integer.parseInt(System.getProperty("test.getfreeport.max.tries", "10")); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java --- openjdk-25-25.0.1+8/test/jdk/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/management/jmxremote/bootstrap/RmiRegistrySslTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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,6 @@ import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; -import java.net.BindException; import java.nio.charset.Charset; import java.nio.file.FileSystem; import java.nio.file.FileSystems; @@ -180,6 +179,7 @@ initTestEnvironment(); List command = new ArrayList<>(); + command.add("-Djdk.rmi.ssl.client.enableEndpointIdentification=false"); Collections.addAll(command, Utils.getTestJavaOpts()); command.add("-Dtest.src=" + TEST_SRC); command.add("-Dtest.rmi.port=" + port); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/net/www/protocol/file/FileURLTest.java openjdk-25-25.0.2+10/test/jdk/sun/net/www/protocol/file/FileURLTest.java --- openjdk-25-25.0.1+8/test/jdk/sun/net/www/protocol/file/FileURLTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/net/www/protocol/file/FileURLTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ * @test * @bug 4474391 * @summary url: file:///D|/Projects/tmp/test.html: urlConnection.getInputStream() broken. + * @requires os.family == "windows" */ import java.io.*; import java.net.*; @@ -33,10 +34,7 @@ public static void main(String [] args) { - String name = System.getProperty("os.name"); - if (name.startsWith("Windows")) { String urlStr = "file:///C|/nonexisted.txt"; - try { URL url = new URL(urlStr); URLConnection urlConnection = url.openConnection(); @@ -49,6 +47,5 @@ throw new RuntimeException("Can't handle '|' in place of ':' in file urls"); } } - } } } diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java openjdk-25-25.0.2+10/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java --- openjdk-25-25.0.1+8/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java 2025-12-18 08:04:02.000000000 +0000 @@ -34,379 +34,41 @@ * @author Xuelei Fan */ -import java.net.*; -import java.util.*; -import java.io.*; -import javax.net.ssl.*; -import java.security.Security; + +import java.io.PrintStream; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.Proxy; +import java.net.URL; +import java.security.KeyPair; +import java.security.KeyPairGenerator; import java.security.KeyStore; -import java.security.KeyFactory; +import java.security.SecureRandom; +import java.security.Security; +import java.security.cert.X509Certificate; + import java.security.cert.Certificate; -import java.security.cert.CertificateFactory; -import java.security.spec.*; -import java.security.interfaces.*; import java.math.BigInteger; import jdk.test.lib.net.URIBuilder; - -/* - * Certificates and key used in the test. - * - * TLS server certificate: - * server private key: - * -----BEGIN RSA PRIVATE KEY----- - * Proc-Type: 4,ENCRYPTED - * DEK-Info: DES-EDE3-CBC,D9AE407F6D0E389A - * - * WPrA7TFol/cQCcp9oHnXWNpYlvRbbIcQj0m+RKT2Iuzfus+DHt3Zadf8nJpKfX2e - * h2rnhlzCN9M7djRDooZKDOPCsdBn51Au7HlZF3S3Opgo7D8XFM1a8t1Je4ke14oI - * nw6QKYsBblRziPnP2PZ0zvX24nOv7bbY8beynlJHGs00VWSFdoH2DS0aE1p6D+3n - * ptJuJ75dVfZFK4X7162APlNXevX8D6PEQpSiRw1rjjGGcnvQ4HdWk3BxDVDcCNJb - * Y1aGNRxsjTDvPi3R9Qx2M+W03QzEPx4SR3ZHVskeSJHaetM0TM/w/45Paq4GokXP - * ZeTnbEx1xmjkA7h+t4doLL4watx5F6yLsJzu8xB3lt/1EtmkYtLz1t7X4BetPAXz - * zS69X/VwhKfsOI3qXBWuL2oHPyhDmT1gcaUQwEPSV6ogHEEQEDXdiUS8heNK13KF - * TCQYFkETvV2BLxUhV1hypPzRQ6tUpJiAbD5KmoK2lD9slshG2QtvKQq0/bgkDY5J - * LhDHV2dtcZ3kDPkkZXpbcJQvoeH3d09C5sIsuTFo2zgNR6oETHUc5TzP6FY2YYRa - * QcK5HcmtsRRiXFm01ac+aMejJUIujjFt84SiKWT/73vC8AmY4tYcJBLjCg4XIxSH - * fdDFLL1YZENNO5ivlp8mdiHqcawx+36L7DrEZQ8RZt6cqST5t/+XTdM74s6k81GT - * pNsa82P2K2zmIUZ/DL2mKjW1vfRByw1NQFEBkN3vdyZxYfM/JyUzX4hbjXBEkh9Q - * QYrcwLKLjis2QzSvK04B3bvRzRb+4ocWiso8ZPAXAIxZFBWDpTMM2A== - * -----END RSA PRIVATE KEY----- - * - * -----BEGIN RSA PRIVATE KEY----- - * MIICXAIBAAKBgQClrFscN6LdmYktsnm4j9VIpecchBeNaZzGrG358h0fORna03Ie - * buxEzHCk3LoAMPagTz1UemFqzFfQCn+VKBg/mtmU8hvIJIh+/p0PPftXUwizIDPU - * PxdHFNHN6gjYDnVOr77M0uyvqXpJ38LZrLgkQJCmA1Yq0DAFQCxPq9l0iQIDAQAB - * AoGAbqcbg1E1mkR99uOJoNeQYKFOJyGiiXTMnXV1TseC4+PDfQBU7Dax35GcesBi - * CtapIpFKKS5D+ozY6b7ZT8ojxuQ/uHLPAvz0WDR3ds4iRF8tyu71Q1ZHcQsJa17y - * yO7UbkSSKn/Mp9Rb+/dKqftUGNXVFLqgHBOzN2s3We3bbbECQQDYBPKOg3hkaGHo - * OhpHKqtQ6EVkldihG/3i4WejRonelXN+HRh1KrB2HBx0M8D/qAzP1i3rNSlSHer4 - * 59YRTJnHAkEAxFX/sVYSn07BHv9Zhn6XXct/Cj43z/tKNbzlNbcxqQwQerw3IH51 - * 8UH2YOA+GD3lXbKp+MytoFLWv8zg4YT/LwJAfqan75Z1R6lLffRS49bIiq8jwE16 - * rTrUJ+kv8jKxMqc9B3vXkxpsS1M/+4E8bqgAmvpgAb8xcsvHsBd9ErdukQJBAKs2 - * j67W75BrPjBI34pQ1LEfp56IGWXOrq1kF8IbCjxv3+MYRT6Z6UJFkpRymNPNDjsC - * dgUYgITiGJHUGXuw3lMCQHEHqo9ZtXz92yFT+VhsNc29B8m/sqUJdtCcMd/jGpAF - * u6GHufjqIZBpQsk63wbwESAPZZ+kk1O1kS5GIRLX608= - * -----END RSA PRIVATE KEY----- - * - * Private-Key: (1024 bit) - * modulus: - * 00:a5:ac:5b:1c:37:a2:dd:99:89:2d:b2:79:b8:8f: - * d5:48:a5:e7:1c:84:17:8d:69:9c:c6:ac:6d:f9:f2: - * 1d:1f:39:19:da:d3:72:1e:6e:ec:44:cc:70:a4:dc: - * ba:00:30:f6:a0:4f:3d:54:7a:61:6a:cc:57:d0:0a: - * 7f:95:28:18:3f:9a:d9:94:f2:1b:c8:24:88:7e:fe: - * 9d:0f:3d:fb:57:53:08:b3:20:33:d4:3f:17:47:14: - * d1:cd:ea:08:d8:0e:75:4e:af:be:cc:d2:ec:af:a9: - * 7a:49:df:c2:d9:ac:b8:24:40:90:a6:03:56:2a:d0: - * 30:05:40:2c:4f:ab:d9:74:89 - * publicExponent: 65537 (0x10001) - * privateExponent: - * 6e:a7:1b:83:51:35:9a:44:7d:f6:e3:89:a0:d7:90: - * 60:a1:4e:27:21:a2:89:74:cc:9d:75:75:4e:c7:82: - * e3:e3:c3:7d:00:54:ec:36:b1:df:91:9c:7a:c0:62: - * 0a:d6:a9:22:91:4a:29:2e:43:fa:8c:d8:e9:be:d9: - * 4f:ca:23:c6:e4:3f:b8:72:cf:02:fc:f4:58:34:77: - * 76:ce:22:44:5f:2d:ca:ee:f5:43:56:47:71:0b:09: - * 6b:5e:f2:c8:ee:d4:6e:44:92:2a:7f:cc:a7:d4:5b: - * fb:f7:4a:a9:fb:54:18:d5:d5:14:ba:a0:1c:13:b3: - * 37:6b:37:59:ed:db:6d:b1 - * prime1: - * 00:d8:04:f2:8e:83:78:64:68:61:e8:3a:1a:47:2a: - * ab:50:e8:45:64:95:d8:a1:1b:fd:e2:e1:67:a3:46: - * 89:de:95:73:7e:1d:18:75:2a:b0:76:1c:1c:74:33: - * c0:ff:a8:0c:cf:d6:2d:eb:35:29:52:1d:ea:f8:e7: - * d6:11:4c:99:c7 - * prime2: - * 00:c4:55:ff:b1:56:12:9f:4e:c1:1e:ff:59:86:7e: - * 97:5d:cb:7f:0a:3e:37:cf:fb:4a:35:bc:e5:35:b7: - * 31:a9:0c:10:7a:bc:37:20:7e:75:f1:41:f6:60:e0: - * 3e:18:3d:e5:5d:b2:a9:f8:cc:ad:a0:52:d6:bf:cc: - * e0:e1:84:ff:2f - * exponent1: - * 7e:a6:a7:ef:96:75:47:a9:4b:7d:f4:52:e3:d6:c8: - * 8a:af:23:c0:4d:7a:ad:3a:d4:27:e9:2f:f2:32:b1: - * 32:a7:3d:07:7b:d7:93:1a:6c:4b:53:3f:fb:81:3c: - * 6e:a8:00:9a:fa:60:01:bf:31:72:cb:c7:b0:17:7d: - * 12:b7:6e:91 - * exponent2: - * 00:ab:36:8f:ae:d6:ef:90:6b:3e:30:48:df:8a:50: - * d4:b1:1f:a7:9e:88:19:65:ce:ae:ad:64:17:c2:1b: - * 0a:3c:6f:df:e3:18:45:3e:99:e9:42:45:92:94:72: - * 98:d3:cd:0e:3b:02:76:05:18:80:84:e2:18:91:d4: - * 19:7b:b0:de:53 - * coefficient: - * 71:07:aa:8f:59:b5:7c:fd:db:21:53:f9:58:6c:35: - * cd:bd:07:c9:bf:b2:a5:09:76:d0:9c:31:df:e3:1a: - * 90:05:bb:a1:87:b9:f8:ea:21:90:69:42:c9:3a:df: - * 06:f0:11:20:0f:65:9f:a4:93:53:b5:91:2e:46:21: - * 12:d7:eb:4f - * - * - * server certificate: - * Data: - * Version: 3 (0x2) - * Serial Number: 7 (0x7) - * Signature Algorithm: md5WithRSAEncryption - * Issuer: C=US, ST=Some-State, L=Some-City, O=Some-Org - * Validity - * Not Before: Dec 8 03:27:57 2008 GMT - * Not After : Aug 25 03:27:57 2028 GMT - * Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org, OU=SSL-Server, CN=localhost - * Subject Public Key Info: - * Public Key Algorithm: rsaEncryption - * RSA Public Key: (1024 bit) - * Modulus (1024 bit): - * 00:a5:ac:5b:1c:37:a2:dd:99:89:2d:b2:79:b8:8f: - * d5:48:a5:e7:1c:84:17:8d:69:9c:c6:ac:6d:f9:f2: - * 1d:1f:39:19:da:d3:72:1e:6e:ec:44:cc:70:a4:dc: - * ba:00:30:f6:a0:4f:3d:54:7a:61:6a:cc:57:d0:0a: - * 7f:95:28:18:3f:9a:d9:94:f2:1b:c8:24:88:7e:fe: - * 9d:0f:3d:fb:57:53:08:b3:20:33:d4:3f:17:47:14: - * d1:cd:ea:08:d8:0e:75:4e:af:be:cc:d2:ec:af:a9: - * 7a:49:df:c2:d9:ac:b8:24:40:90:a6:03:56:2a:d0: - * 30:05:40:2c:4f:ab:d9:74:89 - * Exponent: 65537 (0x10001) - * X509v3 extensions: - * X509v3 Basic Constraints: - * CA:FALSE - * X509v3 Key Usage: - * Digital Signature, Non Repudiation, Key Encipherment - * X509v3 Subject Key Identifier: - * ED:6E:DB:F4:B5:56:C8:FB:1A:06:61:3F:0F:08:BB:A6:04:D8:16:54 - * X509v3 Authority Key Identifier: - * keyid:FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14 - * - * X509v3 Subject Alternative Name: critical - * IP Address:127.0.0.1 - * Signature Algorithm: md5WithRSAEncryption - * - * -----BEGIN CERTIFICATE----- - * MIICnzCCAgigAwIBAgIBBzANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET - * MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK - * EwhTb21lLU9yZzAeFw0wODEyMDgwMzI3NTdaFw0yODA4MjUwMzI3NTdaMHIxCzAJ - * BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp - * dHkxETAPBgNVBAoTCFNvbWUtT3JnMRMwEQYDVQQLEwpTU0wtU2VydmVyMRIwEAYD - * VQQDEwlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKWsWxw3 - * ot2ZiS2yebiP1Uil5xyEF41pnMasbfnyHR85GdrTch5u7ETMcKTcugAw9qBPPVR6 - * YWrMV9AKf5UoGD+a2ZTyG8gkiH7+nQ89+1dTCLMgM9Q/F0cU0c3qCNgOdU6vvszS - * 7K+peknfwtmsuCRAkKYDVirQMAVALE+r2XSJAgMBAAGjbjBsMAkGA1UdEwQCMAAw - * CwYDVR0PBAQDAgXgMB0GA1UdDgQWBBTtbtv0tVbI+xoGYT8PCLumBNgWVDAfBgNV - * HSMEGDAWgBT6uVG/TOfZhpgz+efLHvEzSfeoFDASBgNVHREBAf8ECDAGhwR/AAAB - * MA0GCSqGSIb3DQEBBAUAA4GBAFJjItCtCBZcjD69wdqfIbKmRFa6eJAjR6LcoDva - * cKC/sDOLelpspiZ66Zb0Xdv5qQ7QrfOXt3K8QqJKRMdZLF9WfUfy0gJDM32ub91h - * pu+TmcGPs+6RdrAQcuvU1ZDV9X8SMj7BtKaim4d5sqFw1npncKiA5xFn8vOYwdun - * nZif - * -----END CERTIFICATE----- - * - * - * TLS client certificate: - * client private key: - * ----BEGIN RSA PRIVATE KEY----- - * Proc-Type: 4,ENCRYPTED - * DEK-Info: DES-EDE3-CBC,FA2A435CD35A9390 - * - * Z+Y2uaETbsUWIyJUyVu1UV2G4rgFYJyACZT6Tp1KjRtxflSh2kXkJ9MpuXMXA0V4 - * Yy3fDzPqCL9NJmQAYRlAx/W/+j4F5EyMWDIx8fUxzONRZyoiwF7jLm+KscAfv6Pf - * q7ItWOdj3z7IYrwlB8YIGd3F2cDKT3S+lYRk7rKb/qT7itbuHnY4Ardh3yl+MZak - * jBp+ELUlRsUqSr1V0LoM+0rCCykarpyfhpxEcqsrl0v9Cyi5uhU50/oKv5zql3SH - * l2ImgDjp3batAs8+Bd4NF2aqi0a7Hy44JUHxRm4caZryU/i/D9N1MbuM6882HLat - * 5N0G+NaIUfywa8mjwq2D5aiit18HqKA6XeRRYeJ5Dvu9DCO4GeFSwcUFIBMI0L46 - * 7s114+oDodg57pMgITi+04vmUxvqlN9aiyd7f5Fgd7PeHGeOdbMz1NaJLJaPI9++ - * NakK8eK9iwT/Gdq0Uap5/CHW7vCT5PO+h3HY0STH0lWStXhdWnFO04zTdywsbSp+ - * DLpHeFT66shfeUlxR0PsCbG9vPRt/QmGLeYQZITppWo/ylSq4j+pRIuXvuWHdBRN - * rTZ8QF4Y7AxQUXVz1j1++s6ZMHTzaK2i9HrhmDs1MbJl+QwWre3Xpv3LvTVz3k5U - * wX8kuY1m3STt71QCaRWENq5sRaMImLxZbxc/ivFl9RAzUqo4NCxLod/QgA4iLqtO - * ztnlpzwlC/F8HbQ1oqYWwnZAPhzU/cULtstl+Yrws2c2atO323LbPXZqbASySgig - * sNpFXQMObdfP6LN23bY+1SvtK7V4NUTNhpdIc6INQAQ= - * -----END RSA PRIVATE KEY----- - * - * -----BEGIN RSA PRIVATE KEY----- - * MIICWwIBAAKBgQC78EA2rCZUTvSjWgAvaSFvuXo6k+yi9uGOx2PYLxIwmS6w8o/4 - * Jy0keCiE9wG/jUR53TvSVfPOPLJbIX3v/TNKsaP/xsibuQ98QTWX+ds6BWAFFa9Z - * F5KjEK0WHOQHU6+odqJWKpLT+SjgeM9eH0irXBnd4WdDunWN9YKsQ5JEGwIDAQAB - * AoGAEbdqNj0wN85hnWyEi/ObJU8UyKTdL9eaF72QGfcF/fLSxfd3vurihIeXOkGW - * tpn4lIxYcVGM9CognhqgJpl11jFTQzn1KqZ+NEJRKkCHA4hDabKJbSC9fXHvRwrf - * BsFpZqgiNxp3HseUTiwnaUVeyPgMt/jAj5nB5Sib+UyUxrECQQDnNQBiF2aifEg6 - * zbJOOC7he5CHAdkFxSxWVFVHL6EfXfqdLVkUohMbgZv+XxyIeU2biOExSg49Kds3 - * FOKgTau1AkEA0Bd1haj6QuCo8I0AXm2WO+MMTZMTvtHD/bGjKNM+fT4I8rKYnQRX - * 1acHdqS9Xx2rNJqZgkMmpESIdPR2fc4yjwJALFeM6EMmqvj8/VIf5UJ/Mz14fXwM - * PEARfckUxd9LnnFutCBTWlKvKXJVEZb6KO5ixPaegc57Jp3Vbh3yTN44lQJADD/1 - * SSMDaIB1MYP7a5Oj7m6VQNPRq8AJe5vDcRnOae0G9dKRrVyeFxO4GsHj6/+BHp2j - * P8nYMn9eURQ7DXjf/QJAAQzMlWnKGSO8pyTDtnQx3hRMoUkOEhmNq4bQhLkYqtnY - * FcqpUQ2qMjW+NiNWk5HnTrMS3L9EdJobMUzaNZLy4w== - * -----END RSA PRIVATE KEY----- - * - * Private-Key: (1024 bit) - * modulus: - * 00:bb:f0:40:36:ac:26:54:4e:f4:a3:5a:00:2f:69: - * 21:6f:b9:7a:3a:93:ec:a2:f6:e1:8e:c7:63:d8:2f: - * 12:30:99:2e:b0:f2:8f:f8:27:2d:24:78:28:84:f7: - * 01:bf:8d:44:79:dd:3b:d2:55:f3:ce:3c:b2:5b:21: - * 7d:ef:fd:33:4a:b1:a3:ff:c6:c8:9b:b9:0f:7c:41: - * 35:97:f9:db:3a:05:60:05:15:af:59:17:92:a3:10: - * ad:16:1c:e4:07:53:af:a8:76:a2:56:2a:92:d3:f9: - * 28:e0:78:cf:5e:1f:48:ab:5c:19:dd:e1:67:43:ba: - * 75:8d:f5:82:ac:43:92:44:1b - * publicExponent: 65537 (0x10001) - * privateExponent: - * 11:b7:6a:36:3d:30:37:ce:61:9d:6c:84:8b:f3:9b: - * 25:4f:14:c8:a4:dd:2f:d7:9a:17:bd:90:19:f7:05: - * fd:f2:d2:c5:f7:77:be:ea:e2:84:87:97:3a:41:96: - * b6:99:f8:94:8c:58:71:51:8c:f4:2a:20:9e:1a:a0: - * 26:99:75:d6:31:53:43:39:f5:2a:a6:7e:34:42:51: - * 2a:40:87:03:88:43:69:b2:89:6d:20:bd:7d:71:ef: - * 47:0a:df:06:c1:69:66:a8:22:37:1a:77:1e:c7:94: - * 4e:2c:27:69:45:5e:c8:f8:0c:b7:f8:c0:8f:99:c1: - * e5:28:9b:f9:4c:94:c6:b1 - * prime1: - * 00:e7:35:00:62:17:66:a2:7c:48:3a:cd:b2:4e:38: - * 2e:e1:7b:90:87:01:d9:05:c5:2c:56:54:55:47:2f: - * a1:1f:5d:fa:9d:2d:59:14:a2:13:1b:81:9b:fe:5f: - * 1c:88:79:4d:9b:88:e1:31:4a:0e:3d:29:db:37:14: - * e2:a0:4d:ab:b5 - * prime2: - * 00:d0:17:75:85:a8:fa:42:e0:a8:f0:8d:00:5e:6d: - * 96:3b:e3:0c:4d:93:13:be:d1:c3:fd:b1:a3:28:d3: - * 3e:7d:3e:08:f2:b2:98:9d:04:57:d5:a7:07:76:a4: - * bd:5f:1d:ab:34:9a:99:82:43:26:a4:44:88:74:f4: - * 76:7d:ce:32:8f - * exponent1: - * 2c:57:8c:e8:43:26:aa:f8:fc:fd:52:1f:e5:42:7f: - * 33:3d:78:7d:7c:0c:3c:40:11:7d:c9:14:c5:df:4b: - * 9e:71:6e:b4:20:53:5a:52:af:29:72:55:11:96:fa: - * 28:ee:62:c4:f6:9e:81:ce:7b:26:9d:d5:6e:1d:f2: - * 4c:de:38:95 - * exponent2: - * 0c:3f:f5:49:23:03:68:80:75:31:83:fb:6b:93:a3: - * ee:6e:95:40:d3:d1:ab:c0:09:7b:9b:c3:71:19:ce: - * 69:ed:06:f5:d2:91:ad:5c:9e:17:13:b8:1a:c1:e3: - * eb:ff:81:1e:9d:a3:3f:c9:d8:32:7f:5e:51:14:3b: - * 0d:78:df:fd - * coefficient: - * 01:0c:cc:95:69:ca:19:23:bc:a7:24:c3:b6:74:31: - * de:14:4c:a1:49:0e:12:19:8d:ab:86:d0:84:b9:18: - * aa:d9:d8:15:ca:a9:51:0d:aa:32:35:be:36:23:56: - * 93:91:e7:4e:b3:12:dc:bf:44:74:9a:1b:31:4c:da: - * 35:92:f2:e3 - * - * client certificate: - * Data: - * Version: 3 (0x2) - * Serial Number: 6 (0x6) - * Signature Algorithm: md5WithRSAEncryption - * Issuer: C=US, ST=Some-State, L=Some-City, O=Some-Org - * Validity - * Not Before: Dec 8 03:27:34 2008 GMT - * Not After : Aug 25 03:27:34 2028 GMT - * Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org, OU=SSL-Client, CN=localhost - * Subject Public Key Info: - * Public Key Algorithm: rsaEncryption - * RSA Public Key: (1024 bit) - * Modulus (1024 bit): - * 00:bb:f0:40:36:ac:26:54:4e:f4:a3:5a:00:2f:69: - * 21:6f:b9:7a:3a:93:ec:a2:f6:e1:8e:c7:63:d8:2f: - * 12:30:99:2e:b0:f2:8f:f8:27:2d:24:78:28:84:f7: - * 01:bf:8d:44:79:dd:3b:d2:55:f3:ce:3c:b2:5b:21: - * 7d:ef:fd:33:4a:b1:a3:ff:c6:c8:9b:b9:0f:7c:41: - * 35:97:f9:db:3a:05:60:05:15:af:59:17:92:a3:10: - * ad:16:1c:e4:07:53:af:a8:76:a2:56:2a:92:d3:f9: - * 28:e0:78:cf:5e:1f:48:ab:5c:19:dd:e1:67:43:ba: - * 75:8d:f5:82:ac:43:92:44:1b - * Exponent: 65537 (0x10001) - * X509v3 extensions: - * X509v3 Basic Constraints: - * CA:FALSE - * X509v3 Key Usage: - * Digital Signature, Non Repudiation, Key Encipherment - * X509v3 Subject Key Identifier: - * CD:BB:C8:85:AA:91:BD:FD:1D:BE:CD:67:7C:FF:B3:E9:4C:A8:22:E6 - * X509v3 Authority Key Identifier: - * keyid:FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14 - * - * X509v3 Subject Alternative Name: critical - * IP Address:127.0.0.1 - * Signature Algorithm: md5WithRSAEncryption - * - * -----BEGIN CERTIFICATE----- - * MIICnzCCAgigAwIBAgIBBjANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET - * MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK - * EwhTb21lLU9yZzAeFw0wODEyMDgwMzI3MzRaFw0yODA4MjUwMzI3MzRaMHIxCzAJ - * BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp - * dHkxETAPBgNVBAoTCFNvbWUtT3JnMRMwEQYDVQQLEwpTU0wtQ2xpZW50MRIwEAYD - * VQQDEwlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALvwQDas - * JlRO9KNaAC9pIW+5ejqT7KL24Y7HY9gvEjCZLrDyj/gnLSR4KIT3Ab+NRHndO9JV - * 8848slshfe/9M0qxo//GyJu5D3xBNZf52zoFYAUVr1kXkqMQrRYc5AdTr6h2olYq - * ktP5KOB4z14fSKtcGd3hZ0O6dY31gqxDkkQbAgMBAAGjbjBsMAkGA1UdEwQCMAAw - * CwYDVR0PBAQDAgXgMB0GA1UdDgQWBBTNu8iFqpG9/R2+zWd8/7PpTKgi5jAfBgNV - * HSMEGDAWgBT6uVG/TOfZhpgz+efLHvEzSfeoFDASBgNVHREBAf8ECDAGhwR/AAAB - * MA0GCSqGSIb3DQEBBAUAA4GBACjj9PS+W6XOF7toFMwMOv/AemZeBOpcEF1Ei1Hx - * HjvB6EOHkMY8tFm5OPzkiWiK3+s3awpSW0jWdzMYwrQJ3/klMsPDpI7PEuirqwHP - * i5Wyl/vk7jmfWVcBO9MVhPUo4BYl4vS9aj6JA5QbkbkB95LOgT/BowY0WmHeVsXC - * I9aw - * -----END CERTIFICATE----- - * - * - * - * Trusted CA certificate: - * Certificate: - * Data: - * Version: 3 (0x2) - * Serial Number: 0 (0x0) - * Signature Algorithm: md5WithRSAEncryption - * Issuer: C=US, ST=Some-State, L=Some-City, O=Some-Org - * Validity - * Not Before: Dec 8 02:43:36 2008 GMT - * Not After : Aug 25 02:43:36 2028 GMT - * Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org - * Subject Public Key Info: - * Public Key Algorithm: rsaEncryption - * RSA Public Key: (1024 bit) - * Modulus (1024 bit): - * 00:cb:c4:38:20:07:be:88:a7:93:b0:a1:43:51:2d: - * d7:8e:85:af:54:dd:ad:a2:7b:23:5b:cf:99:13:53: - * 99:45:7d:ee:6d:ba:2d:bf:e3:ad:6e:3d:9f:1a:f9: - * 03:97:e0:17:55:ae:11:26:57:de:01:29:8e:05:3f: - * 21:f7:e7:36:e8:2e:37:d7:48:ac:53:d6:60:0e:c7: - * 50:6d:f6:c5:85:f7:8b:a6:c5:91:35:72:3c:94:ee: - * f1:17:f0:71:e3:ec:1b:ce:ca:4e:40:42:b0:6d:ee: - * 6a:0e:d6:e5:ad:3c:0f:c9:ba:82:4f:78:f8:89:97: - * 89:2a:95:12:4c:d8:09:2a:e9 - * Exponent: 65537 (0x10001) - * X509v3 extensions: - * X509v3 Subject Key Identifier: - * FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14 - * X509v3 Authority Key Identifier: - * keyid:FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14 - * DirName:/C=US/ST=Some-State/L=Some-City/O=Some-Org - * serial:00 - * - * X509v3 Basic Constraints: - * CA:TRUE - * Signature Algorithm: md5WithRSAEncryption - * - * -----BEGIN CERTIFICATE----- - * MIICrDCCAhWgAwIBAgIBADANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET - * MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK - * EwhTb21lLU9yZzAeFw0wODEyMDgwMjQzMzZaFw0yODA4MjUwMjQzMzZaMEkxCzAJ - * BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp - * dHkxETAPBgNVBAoTCFNvbWUtT3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB - * gQDLxDggB76Ip5OwoUNRLdeOha9U3a2ieyNbz5kTU5lFfe5tui2/461uPZ8a+QOX - * 4BdVrhEmV94BKY4FPyH35zboLjfXSKxT1mAOx1Bt9sWF94umxZE1cjyU7vEX8HHj - * 7BvOyk5AQrBt7moO1uWtPA/JuoJPePiJl4kqlRJM2Akq6QIDAQABo4GjMIGgMB0G - * A1UdDgQWBBT6uVG/TOfZhpgz+efLHvEzSfeoFDBxBgNVHSMEajBogBT6uVG/TOfZ - * hpgz+efLHvEzSfeoFKFNpEswSTELMAkGA1UEBhMCVVMxEzARBgNVBAgTClNvbWUt - * U3RhdGUxEjAQBgNVBAcTCVNvbWUtQ2l0eTERMA8GA1UEChMIU29tZS1PcmeCAQAw - * DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQBcIm534U123Hz+rtyYO5uA - * ofd81G6FnTfEAV8Kw9fGyyEbQZclBv34A9JsFKeMvU4OFIaixD7nLZ/NZ+IWbhmZ - * LovmJXyCkOufea73pNiZ+f/4/ScZaIlM/PRycQSqbFNd4j9Wott+08qxHPLpsf3P - * 6Mvf0r1PNTY2hwTJLJmKtg== - * -----END CERTIFICATE--- - */ +import jdk.test.lib.security.CertificateBuilder; +import jdk.test.lib.security.CertificateBuilder.KeyUsage; +import sun.security.x509.AuthorityKeyIdentifierExtension; +import sun.security.x509.GeneralName; +import sun.security.x509.GeneralNames; +import sun.security.x509.KeyIdentifier; +import sun.security.x509.SerialNumber; +import sun.security.x509.X500Name; + +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLServerSocket; +import javax.net.ssl.SSLServerSocketFactory; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.TrustManagerFactory; public class IPIdentities { - static Map cookies; - ServerSocket ss; /* * ============================================================= @@ -421,208 +83,14 @@ */ static boolean separateServerThread = true; - /* - * Where do we find the keystores? - */ - static String trusedCertStr = - "-----BEGIN CERTIFICATE-----\n" + - "MIICrDCCAhWgAwIBAgIBADANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET\n" + - "MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK\n" + - "EwhTb21lLU9yZzAeFw0wODEyMDgwMjQzMzZaFw0yODA4MjUwMjQzMzZaMEkxCzAJ\n" + - "BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp\n" + - "dHkxETAPBgNVBAoTCFNvbWUtT3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB\n" + - "gQDLxDggB76Ip5OwoUNRLdeOha9U3a2ieyNbz5kTU5lFfe5tui2/461uPZ8a+QOX\n" + - "4BdVrhEmV94BKY4FPyH35zboLjfXSKxT1mAOx1Bt9sWF94umxZE1cjyU7vEX8HHj\n" + - "7BvOyk5AQrBt7moO1uWtPA/JuoJPePiJl4kqlRJM2Akq6QIDAQABo4GjMIGgMB0G\n" + - "A1UdDgQWBBT6uVG/TOfZhpgz+efLHvEzSfeoFDBxBgNVHSMEajBogBT6uVG/TOfZ\n" + - "hpgz+efLHvEzSfeoFKFNpEswSTELMAkGA1UEBhMCVVMxEzARBgNVBAgTClNvbWUt\n" + - "U3RhdGUxEjAQBgNVBAcTCVNvbWUtQ2l0eTERMA8GA1UEChMIU29tZS1PcmeCAQAw\n" + - "DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQBcIm534U123Hz+rtyYO5uA\n" + - "ofd81G6FnTfEAV8Kw9fGyyEbQZclBv34A9JsFKeMvU4OFIaixD7nLZ/NZ+IWbhmZ\n" + - "LovmJXyCkOufea73pNiZ+f/4/ScZaIlM/PRycQSqbFNd4j9Wott+08qxHPLpsf3P\n" + - "6Mvf0r1PNTY2hwTJLJmKtg==\n" + - "-----END CERTIFICATE-----"; - - static String serverCertStr = - "-----BEGIN CERTIFICATE-----\n" + - "MIICnzCCAgigAwIBAgIBBzANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET\n" + - "MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK\n" + - "EwhTb21lLU9yZzAeFw0wODEyMDgwMzI3NTdaFw0yODA4MjUwMzI3NTdaMHIxCzAJ\n" + - "BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp\n" + - "dHkxETAPBgNVBAoTCFNvbWUtT3JnMRMwEQYDVQQLEwpTU0wtU2VydmVyMRIwEAYD\n" + - "VQQDEwlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKWsWxw3\n" + - "ot2ZiS2yebiP1Uil5xyEF41pnMasbfnyHR85GdrTch5u7ETMcKTcugAw9qBPPVR6\n" + - "YWrMV9AKf5UoGD+a2ZTyG8gkiH7+nQ89+1dTCLMgM9Q/F0cU0c3qCNgOdU6vvszS\n" + - "7K+peknfwtmsuCRAkKYDVirQMAVALE+r2XSJAgMBAAGjbjBsMAkGA1UdEwQCMAAw\n" + - "CwYDVR0PBAQDAgXgMB0GA1UdDgQWBBTtbtv0tVbI+xoGYT8PCLumBNgWVDAfBgNV\n" + - "HSMEGDAWgBT6uVG/TOfZhpgz+efLHvEzSfeoFDASBgNVHREBAf8ECDAGhwR/AAAB\n" + - "MA0GCSqGSIb3DQEBBAUAA4GBAFJjItCtCBZcjD69wdqfIbKmRFa6eJAjR6LcoDva\n" + - "cKC/sDOLelpspiZ66Zb0Xdv5qQ7QrfOXt3K8QqJKRMdZLF9WfUfy0gJDM32ub91h\n" + - "pu+TmcGPs+6RdrAQcuvU1ZDV9X8SMj7BtKaim4d5sqFw1npncKiA5xFn8vOYwdun\n" + - "nZif\n" + - "-----END CERTIFICATE-----"; - - static String clientCertStr = - "-----BEGIN CERTIFICATE-----\n" + - "MIICnzCCAgigAwIBAgIBBjANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET\n" + - "MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK\n" + - "EwhTb21lLU9yZzAeFw0wODEyMDgwMzI3MzRaFw0yODA4MjUwMzI3MzRaMHIxCzAJ\n" + - "BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp\n" + - "dHkxETAPBgNVBAoTCFNvbWUtT3JnMRMwEQYDVQQLEwpTU0wtQ2xpZW50MRIwEAYD\n" + - "VQQDEwlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALvwQDas\n" + - "JlRO9KNaAC9pIW+5ejqT7KL24Y7HY9gvEjCZLrDyj/gnLSR4KIT3Ab+NRHndO9JV\n" + - "8848slshfe/9M0qxo//GyJu5D3xBNZf52zoFYAUVr1kXkqMQrRYc5AdTr6h2olYq\n" + - "ktP5KOB4z14fSKtcGd3hZ0O6dY31gqxDkkQbAgMBAAGjbjBsMAkGA1UdEwQCMAAw\n" + - "CwYDVR0PBAQDAgXgMB0GA1UdDgQWBBTNu8iFqpG9/R2+zWd8/7PpTKgi5jAfBgNV\n" + - "HSMEGDAWgBT6uVG/TOfZhpgz+efLHvEzSfeoFDASBgNVHREBAf8ECDAGhwR/AAAB\n" + - "MA0GCSqGSIb3DQEBBAUAA4GBACjj9PS+W6XOF7toFMwMOv/AemZeBOpcEF1Ei1Hx\n" + - "HjvB6EOHkMY8tFm5OPzkiWiK3+s3awpSW0jWdzMYwrQJ3/klMsPDpI7PEuirqwHP\n" + - "i5Wyl/vk7jmfWVcBO9MVhPUo4BYl4vS9aj6JA5QbkbkB95LOgT/BowY0WmHeVsXC\n" + - "I9aw\n" + - "-----END CERTIFICATE-----"; - - - static byte serverPrivateExponent[] = { - (byte)0x6e, (byte)0xa7, (byte)0x1b, (byte)0x83, - (byte)0x51, (byte)0x35, (byte)0x9a, (byte)0x44, - (byte)0x7d, (byte)0xf6, (byte)0xe3, (byte)0x89, - (byte)0xa0, (byte)0xd7, (byte)0x90, (byte)0x60, - (byte)0xa1, (byte)0x4e, (byte)0x27, (byte)0x21, - (byte)0xa2, (byte)0x89, (byte)0x74, (byte)0xcc, - (byte)0x9d, (byte)0x75, (byte)0x75, (byte)0x4e, - (byte)0xc7, (byte)0x82, (byte)0xe3, (byte)0xe3, - (byte)0xc3, (byte)0x7d, (byte)0x00, (byte)0x54, - (byte)0xec, (byte)0x36, (byte)0xb1, (byte)0xdf, - (byte)0x91, (byte)0x9c, (byte)0x7a, (byte)0xc0, - (byte)0x62, (byte)0x0a, (byte)0xd6, (byte)0xa9, - (byte)0x22, (byte)0x91, (byte)0x4a, (byte)0x29, - (byte)0x2e, (byte)0x43, (byte)0xfa, (byte)0x8c, - (byte)0xd8, (byte)0xe9, (byte)0xbe, (byte)0xd9, - (byte)0x4f, (byte)0xca, (byte)0x23, (byte)0xc6, - (byte)0xe4, (byte)0x3f, (byte)0xb8, (byte)0x72, - (byte)0xcf, (byte)0x02, (byte)0xfc, (byte)0xf4, - (byte)0x58, (byte)0x34, (byte)0x77, (byte)0x76, - (byte)0xce, (byte)0x22, (byte)0x44, (byte)0x5f, - (byte)0x2d, (byte)0xca, (byte)0xee, (byte)0xf5, - (byte)0x43, (byte)0x56, (byte)0x47, (byte)0x71, - (byte)0x0b, (byte)0x09, (byte)0x6b, (byte)0x5e, - (byte)0xf2, (byte)0xc8, (byte)0xee, (byte)0xd4, - (byte)0x6e, (byte)0x44, (byte)0x92, (byte)0x2a, - (byte)0x7f, (byte)0xcc, (byte)0xa7, (byte)0xd4, - (byte)0x5b, (byte)0xfb, (byte)0xf7, (byte)0x4a, - (byte)0xa9, (byte)0xfb, (byte)0x54, (byte)0x18, - (byte)0xd5, (byte)0xd5, (byte)0x14, (byte)0xba, - (byte)0xa0, (byte)0x1c, (byte)0x13, (byte)0xb3, - (byte)0x37, (byte)0x6b, (byte)0x37, (byte)0x59, - (byte)0xed, (byte)0xdb, (byte)0x6d, (byte)0xb1 - }; - - static byte serverModulus[] = { - (byte)0x00, - (byte)0xa5, (byte)0xac, (byte)0x5b, (byte)0x1c, - (byte)0x37, (byte)0xa2, (byte)0xdd, (byte)0x99, - (byte)0x89, (byte)0x2d, (byte)0xb2, (byte)0x79, - (byte)0xb8, (byte)0x8f, (byte)0xd5, (byte)0x48, - (byte)0xa5, (byte)0xe7, (byte)0x1c, (byte)0x84, - (byte)0x17, (byte)0x8d, (byte)0x69, (byte)0x9c, - (byte)0xc6, (byte)0xac, (byte)0x6d, (byte)0xf9, - (byte)0xf2, (byte)0x1d, (byte)0x1f, (byte)0x39, - (byte)0x19, (byte)0xda, (byte)0xd3, (byte)0x72, - (byte)0x1e, (byte)0x6e, (byte)0xec, (byte)0x44, - (byte)0xcc, (byte)0x70, (byte)0xa4, (byte)0xdc, - (byte)0xba, (byte)0x00, (byte)0x30, (byte)0xf6, - (byte)0xa0, (byte)0x4f, (byte)0x3d, (byte)0x54, - (byte)0x7a, (byte)0x61, (byte)0x6a, (byte)0xcc, - (byte)0x57, (byte)0xd0, (byte)0x0a, (byte)0x7f, - (byte)0x95, (byte)0x28, (byte)0x18, (byte)0x3f, - (byte)0x9a, (byte)0xd9, (byte)0x94, (byte)0xf2, - (byte)0x1b, (byte)0xc8, (byte)0x24, (byte)0x88, - (byte)0x7e, (byte)0xfe, (byte)0x9d, (byte)0x0f, - (byte)0x3d, (byte)0xfb, (byte)0x57, (byte)0x53, - (byte)0x08, (byte)0xb3, (byte)0x20, (byte)0x33, - (byte)0xd4, (byte)0x3f, (byte)0x17, (byte)0x47, - (byte)0x14, (byte)0xd1, (byte)0xcd, (byte)0xea, - (byte)0x08, (byte)0xd8, (byte)0x0e, (byte)0x75, - (byte)0x4e, (byte)0xaf, (byte)0xbe, (byte)0xcc, - (byte)0xd2, (byte)0xec, (byte)0xaf, (byte)0xa9, - (byte)0x7a, (byte)0x49, (byte)0xdf, (byte)0xc2, - (byte)0xd9, (byte)0xac, (byte)0xb8, (byte)0x24, - (byte)0x40, (byte)0x90, (byte)0xa6, (byte)0x03, - (byte)0x56, (byte)0x2a, (byte)0xd0, (byte)0x30, - (byte)0x05, (byte)0x40, (byte)0x2c, (byte)0x4f, - (byte)0xab, (byte)0xd9, (byte)0x74, (byte)0x89 - }; - - static byte clientPrivateExponent[] = { - (byte)0x11, (byte)0xb7, (byte)0x6a, (byte)0x36, - (byte)0x3d, (byte)0x30, (byte)0x37, (byte)0xce, - (byte)0x61, (byte)0x9d, (byte)0x6c, (byte)0x84, - (byte)0x8b, (byte)0xf3, (byte)0x9b, (byte)0x25, - (byte)0x4f, (byte)0x14, (byte)0xc8, (byte)0xa4, - (byte)0xdd, (byte)0x2f, (byte)0xd7, (byte)0x9a, - (byte)0x17, (byte)0xbd, (byte)0x90, (byte)0x19, - (byte)0xf7, (byte)0x05, (byte)0xfd, (byte)0xf2, - (byte)0xd2, (byte)0xc5, (byte)0xf7, (byte)0x77, - (byte)0xbe, (byte)0xea, (byte)0xe2, (byte)0x84, - (byte)0x87, (byte)0x97, (byte)0x3a, (byte)0x41, - (byte)0x96, (byte)0xb6, (byte)0x99, (byte)0xf8, - (byte)0x94, (byte)0x8c, (byte)0x58, (byte)0x71, - (byte)0x51, (byte)0x8c, (byte)0xf4, (byte)0x2a, - (byte)0x20, (byte)0x9e, (byte)0x1a, (byte)0xa0, - (byte)0x26, (byte)0x99, (byte)0x75, (byte)0xd6, - (byte)0x31, (byte)0x53, (byte)0x43, (byte)0x39, - (byte)0xf5, (byte)0x2a, (byte)0xa6, (byte)0x7e, - (byte)0x34, (byte)0x42, (byte)0x51, (byte)0x2a, - (byte)0x40, (byte)0x87, (byte)0x03, (byte)0x88, - (byte)0x43, (byte)0x69, (byte)0xb2, (byte)0x89, - (byte)0x6d, (byte)0x20, (byte)0xbd, (byte)0x7d, - (byte)0x71, (byte)0xef, (byte)0x47, (byte)0x0a, - (byte)0xdf, (byte)0x06, (byte)0xc1, (byte)0x69, - (byte)0x66, (byte)0xa8, (byte)0x22, (byte)0x37, - (byte)0x1a, (byte)0x77, (byte)0x1e, (byte)0xc7, - (byte)0x94, (byte)0x4e, (byte)0x2c, (byte)0x27, - (byte)0x69, (byte)0x45, (byte)0x5e, (byte)0xc8, - (byte)0xf8, (byte)0x0c, (byte)0xb7, (byte)0xf8, - (byte)0xc0, (byte)0x8f, (byte)0x99, (byte)0xc1, - (byte)0xe5, (byte)0x28, (byte)0x9b, (byte)0xf9, - (byte)0x4c, (byte)0x94, (byte)0xc6, (byte)0xb1 - }; - - static byte clientModulus[] = { - (byte)0x00, - (byte)0xbb, (byte)0xf0, (byte)0x40, (byte)0x36, - (byte)0xac, (byte)0x26, (byte)0x54, (byte)0x4e, - (byte)0xf4, (byte)0xa3, (byte)0x5a, (byte)0x00, - (byte)0x2f, (byte)0x69, (byte)0x21, (byte)0x6f, - (byte)0xb9, (byte)0x7a, (byte)0x3a, (byte)0x93, - (byte)0xec, (byte)0xa2, (byte)0xf6, (byte)0xe1, - (byte)0x8e, (byte)0xc7, (byte)0x63, (byte)0xd8, - (byte)0x2f, (byte)0x12, (byte)0x30, (byte)0x99, - (byte)0x2e, (byte)0xb0, (byte)0xf2, (byte)0x8f, - (byte)0xf8, (byte)0x27, (byte)0x2d, (byte)0x24, - (byte)0x78, (byte)0x28, (byte)0x84, (byte)0xf7, - (byte)0x01, (byte)0xbf, (byte)0x8d, (byte)0x44, - (byte)0x79, (byte)0xdd, (byte)0x3b, (byte)0xd2, - (byte)0x55, (byte)0xf3, (byte)0xce, (byte)0x3c, - (byte)0xb2, (byte)0x5b, (byte)0x21, (byte)0x7d, - (byte)0xef, (byte)0xfd, (byte)0x33, (byte)0x4a, - (byte)0xb1, (byte)0xa3, (byte)0xff, (byte)0xc6, - (byte)0xc8, (byte)0x9b, (byte)0xb9, (byte)0x0f, - (byte)0x7c, (byte)0x41, (byte)0x35, (byte)0x97, - (byte)0xf9, (byte)0xdb, (byte)0x3a, (byte)0x05, - (byte)0x60, (byte)0x05, (byte)0x15, (byte)0xaf, - (byte)0x59, (byte)0x17, (byte)0x92, (byte)0xa3, - (byte)0x10, (byte)0xad, (byte)0x16, (byte)0x1c, - (byte)0xe4, (byte)0x07, (byte)0x53, (byte)0xaf, - (byte)0xa8, (byte)0x76, (byte)0xa2, (byte)0x56, - (byte)0x2a, (byte)0x92, (byte)0xd3, (byte)0xf9, - (byte)0x28, (byte)0xe0, (byte)0x78, (byte)0xcf, - (byte)0x5e, (byte)0x1f, (byte)0x48, (byte)0xab, - (byte)0x5c, (byte)0x19, (byte)0xdd, (byte)0xe1, - (byte)0x67, (byte)0x43, (byte)0xba, (byte)0x75, - (byte)0x8d, (byte)0xf5, (byte)0x82, (byte)0xac, - (byte)0x43, (byte)0x92, (byte)0x44, (byte)0x1b - }; + static X509Certificate trustedCert; + + static X509Certificate serverCert; + + static X509Certificate clientCert; + + static KeyPair serverKeys; + static KeyPair clientKeys; static char passphrase[] = "passphrase".toCharArray(); @@ -639,7 +107,7 @@ /* * Turn on SSL debugging? */ - static boolean debug = false; + static boolean debug = Boolean.getBoolean("test.debug"); private SSLServerSocket sslServerSocket = null; @@ -650,8 +118,8 @@ * to avoid infinite hangs. */ void doServerSide() throws Exception { - SSLContext context = getSSLContext(trusedCertStr, serverCertStr, - serverModulus, serverPrivateExponent, passphrase); + SSLContext context = getSSLContext(trustedCert, serverCert, + serverKeys, passphrase); SSLServerSocketFactory sslssf = context.getServerSocketFactory(); // doClientSide() connects to the loopback address @@ -706,8 +174,8 @@ void doClientSide() throws Exception { SSLContext reservedSSLContext = SSLContext.getDefault(); try { - SSLContext context = getSSLContext(trusedCertStr, clientCertStr, - clientModulus, clientPrivateExponent, passphrase); + SSLContext context = getSSLContext(trustedCert, clientCert, + clientKeys, passphrase); SSLContext.setDefault(context); /* @@ -755,6 +223,65 @@ volatile Exception serverException = null; volatile Exception clientException = null; + private static X509Certificate createTrustedCert(KeyPair caKeys) throws Exception { + SecureRandom random = new SecureRandom(); + + KeyIdentifier kid = new KeyIdentifier(caKeys.getPublic()); + GeneralNames gns = new GeneralNames(); + GeneralName name = new GeneralName(new X500Name( + "O=Some-Org, L=Some-City, ST=Some-State, C=US")); + gns.add(name); + BigInteger serialNumber = BigInteger.valueOf(random.nextLong(1000000)+1); + return CertificateBuilder.newCertificateBuilder( + "O=Some-Org, L=Some-City, ST=Some-State, C=US", + caKeys.getPublic(), caKeys.getPublic()) + .setSerialNumber(serialNumber) + .addExtension(new AuthorityKeyIdentifierExtension(kid, gns, + new SerialNumber(serialNumber))) + .addBasicConstraintsExt(true, true, -1) + .setOneHourValidity() + .build(null, caKeys.getPrivate(), "MD5WithRSA"); + } + + private static void setupCertificates() throws Exception { + KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA"); + KeyPair caKeys = kpg.generateKeyPair(); + serverKeys = kpg.generateKeyPair(); + clientKeys = kpg.generateKeyPair(); + + trustedCert = createTrustedCert(caKeys); + if (debug) { + System.out.println("----------- Trusted Cert -----------"); + CertificateBuilder.printCertificate(trustedCert, System.out); + } + + serverCert = CertificateBuilder.newCertificateBuilder( + "O=Some-Org, L=Some-City, ST=Some-State, C=US", + serverKeys.getPublic(), caKeys.getPublic(), + KeyUsage.DIGITAL_SIGNATURE, KeyUsage.NONREPUDIATION, KeyUsage.KEY_ENCIPHERMENT) + .addBasicConstraintsExt(false, false, -1) + .addExtension(CertificateBuilder.createIPSubjectAltNameExt(true, "127.0.0.1")) + .setOneHourValidity() + .build(trustedCert, caKeys.getPrivate(), "MD5WithRSA"); + if (debug) { + System.out.println("----------- Server Cert -----------"); + CertificateBuilder.printCertificate(serverCert, System.out); + } + + clientCert = CertificateBuilder.newCertificateBuilder( + "CN=localhost, OU=SSL-Client, O=Some-Org, L=Some-City, ST=Some-State, C=US", + clientKeys.getPublic(), caKeys.getPublic(), + KeyUsage.DIGITAL_SIGNATURE, KeyUsage.NONREPUDIATION, KeyUsage.KEY_ENCIPHERMENT) + .addExtension(CertificateBuilder.createIPSubjectAltNameExt(true, "127.0.0.1")) + .addBasicConstraintsExt(false, false, -1) + .setOneHourValidity() + .build(trustedCert, caKeys.getPrivate(), "MD5WithRSA"); + if (debug) { + System.out.println("----------- Client Cert -----------"); + CertificateBuilder.printCertificate(clientCert, System.out); + } + } + public static void main(String args[]) throws Exception { // MD5 is used in this test case, don't disable MD5 algorithm. Security.setProperty("jdk.certpath.disabledAlgorithms", @@ -762,8 +289,11 @@ Security.setProperty("jdk.tls.disabledAlgorithms", "SSLv3, RC4, DH keySize < 768"); - if (debug) + if (debug) { System.setProperty("javax.net.debug", "all"); + } + + setupCertificates(); /* * Start the tests. @@ -855,45 +385,23 @@ } // get the ssl context - private static SSLContext getSSLContext(String trusedCertStr, - String keyCertStr, byte[] modulus, - byte[] privateExponent, char[] passphrase) throws Exception { - - // generate certificate from cert string - CertificateFactory cf = CertificateFactory.getInstance("X.509"); - - ByteArrayInputStream is = - new ByteArrayInputStream(trusedCertStr.getBytes()); - Certificate trusedCert = cf.generateCertificate(is); - is.close(); + private static SSLContext getSSLContext(X509Certificate trustedCert, + X509Certificate keyCert, KeyPair key, char[] passphrase) throws Exception { // create a key store - KeyStore ks = KeyStore.getInstance("JKS"); + KeyStore ks = KeyStore.getInstance("PKCS12"); ks.load(null, null); // import the trused cert - ks.setCertificateEntry("RSA Export Signer", trusedCert); - - if (keyCertStr != null) { - // generate the private key. - RSAPrivateKeySpec priKeySpec = new RSAPrivateKeySpec( - new BigInteger(modulus), - new BigInteger(privateExponent)); - KeyFactory kf = KeyFactory.getInstance("RSA"); - RSAPrivateKey priKey = - (RSAPrivateKey)kf.generatePrivate(priKeySpec); - - // generate certificate chain - is = new ByteArrayInputStream(keyCertStr.getBytes()); - Certificate keyCert = cf.generateCertificate(is); - is.close(); + ks.setCertificateEntry("RSA Export Signer", trustedCert); + if (keyCert != null) { Certificate[] chain = new Certificate[2]; chain[0] = keyCert; - chain[1] = trusedCert; + chain[1] = trustedCert; // import the key entry. - ks.setKeyEntry("Whatever", priKey, passphrase, chain); + ks.setKeyEntry("Whatever", key.getPrivate(), passphrase, chain); } // create SSL context @@ -902,7 +410,7 @@ SSLContext ctx = SSLContext.getInstance("TLSv1.2"); - if (keyCertStr != null) { + if (keyCert != null) { KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); kmf.init(ks, passphrase); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/TEST.properties openjdk-25-25.0.2+10/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/TEST.properties --- openjdk-25-25.0.1+8/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/TEST.properties 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/net/www/protocol/https/HttpsURLConnection/TEST.properties 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,3 @@ +modules = \ + java.base/sun.security.util \ + java.base/sun.security.x509 diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/ec/ECDHKeyAgreementParamValidation.java openjdk-25-25.0.2+10/test/jdk/sun/security/ec/ECDHKeyAgreementParamValidation.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/ec/ECDHKeyAgreementParamValidation.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/ec/ECDHKeyAgreementParamValidation.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024, THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2024, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/jgss/GssContextCleanup.java openjdk-25-25.0.2+10/test/jdk/sun/security/jgss/GssContextCleanup.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/jgss/GssContextCleanup.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/jgss/GssContextCleanup.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 @@ -59,4 +59,3 @@ } } } - diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/jgss/GssNameCleanup.java openjdk-25-25.0.2+10/test/jdk/sun/security/jgss/GssNameCleanup.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/jgss/GssNameCleanup.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/jgss/GssNameCleanup.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 @@ -66,4 +66,3 @@ } } } - diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/ReinitCipher.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/ReinitCipher.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/ReinitCipher.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/ReinitCipher.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, 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 @@ -32,6 +32,8 @@ * @run main/othervm ReinitCipher */ +import jtreg.SkippedException; + import java.security.Provider; import java.util.Random; import javax.crypto.Cipher; @@ -46,8 +48,7 @@ @Override public void main(Provider p) throws Exception { if (p.getService("Cipher", "ARCFOUR") == null) { - System.out.println("Not supported by provider, skipping"); - return; + throw new SkippedException("Algorithm ARCFOUR is not supported by provider, skipping"); } Random random = new Random(); byte[] data1 = new byte[10 * 1024]; diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/Test4512704.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/Test4512704.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/Test4512704.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/Test4512704.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -29,14 +29,16 @@ * @run main Test4512704 * @summary Verify that AES cipher can generate default IV in encrypt mode */ -import java.io.PrintStream; -import java.security.*; -import java.security.spec.*; -import java.util.Random; +import jtreg.SkippedException; -import javax.crypto.*; -import javax.crypto.spec.*; +import java.security.GeneralSecurityException; +import java.security.InvalidAlgorithmParameterException; + +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; import java.security.Provider; +import java.security.spec.AlgorithmParameterSpec; public class Test4512704 extends PKCS11Test { @@ -48,9 +50,8 @@ transformation = "AES/" + mode + "/NoPadding"; c = Cipher.getInstance(transformation, p); } catch (GeneralSecurityException e) { - System.out.println("Skip testing " + p.getName() + - ", no support for " + mode); - return; + throw new SkippedException("Skip testing " + p.getName() + + ", no support for " + mode); } SecretKey key = new SecretKeySpec(new byte[16], "AES"); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestCICOWithGCM.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestCICOWithGCM.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestCICOWithGCM.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestCICOWithGCM.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -31,13 +31,21 @@ * @key randomness */ -import java.security.*; -import javax.crypto.*; -import javax.crypto.spec.*; -import java.math.*; -import java.io.*; +import jtreg.SkippedException; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import javax.crypto.Cipher; +import javax.crypto.CipherInputStream; +import javax.crypto.CipherOutputStream; +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; + +import java.security.GeneralSecurityException; +import java.security.Provider; +import java.util.Arrays; +import java.util.Random; -import java.util.*; public class TestCICOWithGCM extends PKCS11Test { public static void main(String[] args) throws Exception { @@ -55,9 +63,8 @@ String transformation = "AES/" + mode + "/NoPadding"; c = Cipher.getInstance(transformation, p); } catch (GeneralSecurityException e) { - System.out.println("Skip testing " + p.getName() + - ", no support for " + mode); - return; + throw new SkippedException("Skip testing " + p.getName() + + ", no support for " + mode); } SecretKey key = new SecretKeySpec(new byte[16], "AES"); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestCICOWithGCMAndAAD.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestCICOWithGCMAndAAD.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestCICOWithGCMAndAAD.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestCICOWithGCMAndAAD.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -30,6 +30,8 @@ * @summary Test CipherInputStream/OutputStream with AES GCM mode with AAD. * @key randomness */ +import jtreg.SkippedException; + import java.io.*; import java.security.*; import java.util.*; @@ -44,7 +46,6 @@ @Override public void main(Provider p) throws Exception { test("GCM", p); -// test("CCM", p); } public void test(String mode, Provider p) throws Exception { @@ -53,9 +54,8 @@ String transformation = "AES/" + mode + "/NoPadding"; c = Cipher.getInstance(transformation, p); } catch (GeneralSecurityException e) { - System.out.println("Skip testing " + p.getName() + - ", no support for " + mode); - return; + throw new SkippedException("Skip testing " + p.getName() + + ", no support for " + mode); } SecretKey key = new SecretKeySpec(new byte[16], "AES"); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPoly.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPoly.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPoly.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPoly.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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,7 +47,7 @@ import javax.crypto.spec.SecretKeySpec; import javax.crypto.NoSuchPaddingException; -import jdk.test.lib.Utils; +import jtreg.SkippedException; public class TestChaChaPoly extends PKCS11Test { @@ -70,8 +70,7 @@ try { Cipher.getInstance(ALGO, p); } catch (NoSuchAlgorithmException nsae) { - System.out.println("Skip; no support for " + ALGO); - return; + throw new SkippedException("Skip; no support for " + ALGO); } this.p = p; testTransformations(); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyKAT.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyKAT.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyKAT.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyKAT.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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,22 +26,25 @@ * @bug 8255410 * @library /test/lib .. * @modules jdk.crypto.cryptoki - * @build jdk.test.lib.Convert * @run main/othervm TestChaChaPolyKAT * @summary ChaCha20-Poly1305 Cipher Implementation (KAT) */ -import java.util.*; +import jtreg.SkippedException; + import java.security.GeneralSecurityException; import java.security.Provider; import java.security.NoSuchAlgorithmException; import javax.crypto.Cipher; -import javax.crypto.spec.ChaCha20ParameterSpec; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import javax.crypto.AEADBadTagException; import java.nio.ByteBuffer; -import jdk.test.lib.Convert; +import java.util.Arrays; +import java.util.HexFormat; +import java.util.LinkedList; +import java.util.List; +import java.util.Objects; public class TestChaChaPolyKAT extends PKCS11Test { public static class TestData { @@ -126,8 +129,7 @@ try { Cipher.getInstance(ALGO, p); } catch (NoSuchAlgorithmException nsae) { - System.out.println("Skip; no support for " + ALGO); - return; + throw new SkippedException("Skip; no support for " + ALGO); } int testsPassed = 0; diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyNoReuse.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyNoReuse.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyNoReuse.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyNoReuse.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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,18 +30,22 @@ * (key/nonce reuse check) */ -import java.util.*; +import jtreg.SkippedException; + import javax.crypto.Cipher; import java.security.spec.AlgorithmParameterSpec; import java.security.Provider; import java.security.NoSuchAlgorithmException; -import javax.crypto.spec.ChaCha20ParameterSpec; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; -import javax.crypto.AEADBadTagException; import javax.crypto.SecretKey; import java.security.InvalidKeyException; import java.security.InvalidAlgorithmParameterException; +import java.util.Arrays; +import java.util.HexFormat; +import java.util.LinkedList; +import java.util.List; +import java.util.Objects; public class TestChaChaPolyNoReuse extends PKCS11Test { @@ -238,8 +242,7 @@ try { Cipher.getInstance(CIPHER_ALGO, p); } catch (NoSuchAlgorithmException nsae) { - System.out.println("Skip; no support for " + CIPHER_ALGO); - return; + throw new SkippedException("Skip; no support for " + CIPHER_ALGO); } int testsPassed = 0; diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyOutputSize.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyOutputSize.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyOutputSize.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestChaChaPolyOutputSize.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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,14 +30,14 @@ * @run main TestChaChaPolyOutputSize */ +import jtreg.SkippedException; + import java.nio.ByteBuffer; import java.security.GeneralSecurityException; -import java.security.Key; import java.security.SecureRandom; import java.security.Provider; import java.security.NoSuchAlgorithmException; import javax.crypto.Cipher; -import javax.crypto.spec.ChaCha20ParameterSpec; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; @@ -60,8 +60,7 @@ try { Cipher.getInstance(ALGO, p); } catch (NoSuchAlgorithmException nsae) { - System.out.println("Skip; no support for " + ALGO); - return; + throw new SkippedException("Skip; no support for " + ALGO); } testGetOutSize(p); testMultiPartAEADDec(p); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestCipherMode.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestCipherMode.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestCipherMode.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestCipherMode.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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,8 @@ * @run main/othervm TestCipherMode */ +import jtreg.SkippedException; + import java.security.Provider; import java.security.Key; import java.security.KeyPair; @@ -38,20 +40,22 @@ import java.security.PublicKey; import java.security.InvalidParameterException; import java.security.NoSuchAlgorithmException; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; public class TestCipherMode extends PKCS11Test { - private static String[] TRANSFORMATIONS = { - "AES/ECB/PKCS5Padding", "AES/GCM/NoPadding", - "RSA/ECB/PKCS1Padding" + private static final String[] TRANSFORMATIONS = { + "AES/ECB/PKCS5Padding", "AES/GCM/NoPadding", + "RSA/ECB/PKCS1Padding" }; - private static byte[] BYTES16 = - Arrays.copyOf(TRANSFORMATIONS[0].getBytes(), 16); + private static final byte[] BYTES16 = + Arrays.copyOf("AES/ECB/PKCS5Padding".getBytes(), 16); private static SecretKey AES_KEY = new SecretKeySpec(BYTES16, "AES"); private static PublicKey RSA_PUBKEY = null; private static PrivateKey RSA_PRIVKEY = null; @@ -97,18 +101,29 @@ // test all cipher impls, e.g. P11Cipher, P11AEADCipher, and // P11RSACipher - for (String t : TRANSFORMATIONS) { - checkModes(t, p); + List skipped = new ArrayList<>(); + for (final String t : TRANSFORMATIONS) { + try { + checkModes(t, p); + } catch (SkippedException skippedException) { + // printing to System.out, so it's easier to see which test it relates to + skippedException.printStackTrace(System.out); + skipped.add(t); + } + } + + if (!skipped.isEmpty()) { + throw new SkippedException("Some tests skipped: " + skipped); + } else { + System.out.println("All tests passed"); } - System.out.println("All tests passed"); } private static void checkModes(String t, Provider p) throws Exception { try { Cipher.getInstance(t, p); } catch (Exception e) { - System.out.println("Skip " + t + " due to " + e.getMessage()); - return; + throw new SkippedException("Skip " + t + " due to " + e.getMessage()); } for (CipherMode m : CipherMode.values()) { diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestGCMKeyAndIvCheck.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestGCMKeyAndIvCheck.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestGCMKeyAndIvCheck.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestGCMKeyAndIvCheck.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -31,13 +31,21 @@ */ -import java.security.*; +import jtreg.SkippedException; + +import java.security.AlgorithmParameters; +import java.security.GeneralSecurityException; +import java.security.InvalidAlgorithmParameterException; +import java.security.InvalidKeyException; +import java.security.Provider; import java.security.spec.AlgorithmParameterSpec; -import javax.crypto.*; -import javax.crypto.spec.*; -import java.math.*; +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.spec.GCMParameterSpec; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; -import java.util.*; +import java.util.Arrays; public class TestGCMKeyAndIvCheck extends PKCS11Test { @@ -77,9 +85,8 @@ String transformation = "AES/" + mode + "/NoPadding"; c = Cipher.getInstance(transformation, p); } catch (GeneralSecurityException e) { - System.out.println("Skip testing " + p.getName() + - ", no support for " + mode); - return; + throw new SkippedException("Skip testing " + p.getName() + + ", no support for " + mode); } System.out.println("Testing against " + p.getName()); SecretKey key = new SecretKeySpec(new byte[16], "AES"); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestKATForGCM.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestKATForGCM.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestKATForGCM.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestKATForGCM.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -30,6 +30,8 @@ * @summary Known Answer Test for AES cipher with GCM mode support in * PKCS11 provider. */ +import jtreg.SkippedException; + import java.security.GeneralSecurityException; import java.security.Provider; import java.util.Arrays; @@ -311,9 +313,8 @@ try { c = Cipher.getInstance(transformation, p); } catch (GeneralSecurityException e) { - System.out.println("Skip testing " + p.getName() + - ", no support for " + transformation); - return; + throw new SkippedException("Skip testing " + p.getName() + + ", no support for " + transformation); } try { if (execute(testValues, c)) { diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestRSACipher.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestRSACipher.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestRSACipher.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestRSACipher.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, 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 @@ -44,6 +44,7 @@ import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException; import jdk.test.lib.security.SecurityUtils; +import jtreg.SkippedException; public class TestRSACipher extends PKCS11Test { @@ -55,8 +56,7 @@ try { Cipher.getInstance(RSA_ALGOS[0], p); } catch (GeneralSecurityException e) { - System.out.println("Not supported by provider, skipping"); - return; + throw new SkippedException("Algorithm " + RSA_ALGOS[0] + " is not supported by provider, skipping"); } String kpgAlgorithm = "RSA"; int keySize = SecurityUtils.getTestKeySize(kpgAlgorithm); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestRSACipherWrap.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestRSACipherWrap.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestRSACipherWrap.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestRSACipherWrap.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -43,6 +43,7 @@ import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; import jdk.test.lib.security.SecurityUtils; +import jtreg.SkippedException; public class TestRSACipherWrap extends PKCS11Test { @@ -54,8 +55,7 @@ try { Cipher.getInstance(RSA_ALGOS[0], p); } catch (GeneralSecurityException e) { - System.out.println(RSA_ALGOS[0] + " unsupported, skipping"); - return; + throw new SkippedException(RSA_ALGOS[0] + " unsupported, skipping"); } String kpgAlgorithm = "RSA"; KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm, p); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestRawRSACipher.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestRawRSACipher.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestRawRSACipher.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestRawRSACipher.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 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 @@ -41,6 +41,7 @@ import java.util.Random; import javax.crypto.Cipher; import jdk.test.lib.security.SecurityUtils; +import jtreg.SkippedException; public class TestRawRSACipher extends PKCS11Test { @@ -49,8 +50,7 @@ try { Cipher.getInstance("RSA/ECB/NoPadding", p); } catch (GeneralSecurityException e) { - System.out.println("Not supported by provider, skipping"); - return; + throw new SkippedException("Algorithm RSA/ECB/NoPadding is not supported by provider, skipping"); } String kpgAlgorithm = "RSA"; diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestSymmCiphers.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestSymmCiphers.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestSymmCiphers.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestSymmCiphers.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 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 @@ -32,11 +32,15 @@ * @run main/othervm TestSymmCiphers */ +import jtreg.SkippedException; + import java.io.ByteArrayOutputStream; import java.nio.ByteBuffer; import java.security.AlgorithmParameters; import java.security.NoSuchAlgorithmException; import java.security.Provider; +import java.util.ArrayList; +import java.util.List; import java.util.Random; import javax.crypto.Cipher; import javax.crypto.KeyGenerator; @@ -44,43 +48,33 @@ public class TestSymmCiphers extends PKCS11Test { - private static class CI { // class for holding Cipher Information + private record CI (String transformation, String keyAlgo, int dataSize){} // record for holding Cipher Information - String transformation; - String keyAlgo; - int dataSize; - - CI(String transformation, String keyAlgo, int dataSize) { - this.transformation = transformation; - this.keyAlgo = keyAlgo; - this.dataSize = dataSize; - } - } private static final CI[] TEST_LIST = { - new CI("ARCFOUR", "ARCFOUR", 400), - new CI("RC4", "RC4", 401), - new CI("DES/CBC/NoPadding", "DES", 400), - new CI("DESede/CBC/NoPadding", "DESede", 160), - new CI("AES/CBC/NoPadding", "AES", 4800), - new CI("Blowfish/CBC/NoPadding", "Blowfish", 24), - new CI("DES/cbc/PKCS5Padding", "DES", 6401), - new CI("DESede/CBC/PKCS5Padding", "DESede", 402), - new CI("AES/CBC/PKCS5Padding", "AES", 30), - new CI("Blowfish/CBC/PKCS5Padding", "Blowfish", 19), - new CI("DES/ECB/NoPadding", "DES", 400), - new CI("DESede/ECB/NoPadding", "DESede", 160), - new CI("AES/ECB/NoPadding", "AES", 4800), - new CI("DES/ECB/PKCS5Padding", "DES", 32), - new CI("DES/ECB/PKCS5Padding", "DES", 6400), - new CI("DESede/ECB/PKCS5Padding", "DESede", 400), - new CI("AES/ECB/PKCS5Padding", "AES", 64), - - new CI("DES", "DES", 6400), - new CI("DESede", "DESede", 408), - new CI("AES", "AES", 128), + new CI("ARCFOUR", "ARCFOUR", 400), + new CI("RC4", "RC4", 401), + new CI("DES/CBC/NoPadding", "DES", 400), + new CI("DESede/CBC/NoPadding", "DESede", 160), + new CI("AES/CBC/NoPadding", "AES", 4800), + new CI("Blowfish/CBC/NoPadding", "Blowfish", 24), + new CI("DES/cbc/PKCS5Padding", "DES", 6401), + new CI("DESede/CBC/PKCS5Padding", "DESede", 402), + new CI("AES/CBC/PKCS5Padding", "AES", 30), + new CI("Blowfish/CBC/PKCS5Padding", "Blowfish", 19), + new CI("DES/ECB/NoPadding", "DES", 400), + new CI("DESede/ECB/NoPadding", "DESede", 160), + new CI("AES/ECB/NoPadding", "AES", 4800), + new CI("DES/ECB/PKCS5Padding", "DES", 32), + new CI("DES/ECB/PKCS5Padding", "DES", 6400), + new CI("DESede/ECB/PKCS5Padding", "DESede", 400), + new CI("AES/ECB/PKCS5Padding", "AES", 64), + + new CI("DES", "DES", 6400), + new CI("DESede", "DESede", 408), + new CI("AES", "AES", 128), - new CI("AES/CTR/NoPadding", "AES", 3200), - new CI("AES/CTS/NoPadding", "AES", 3200), + new CI("AES/CTR/NoPadding", "AES", 3200), + new CI("AES/CTS/NoPadding", "AES", 3200), }; private static final StringBuffer debugBuf = new StringBuffer(); @@ -90,11 +84,10 @@ // NSS reports CKR_DEVICE_ERROR when the data passed to // its EncryptUpdate/DecryptUpdate is not multiple of blocks int firstBlkSize = 16; - boolean status = true; + List skippedList = new ArrayList<>(); Random random = new Random(); try { - for (int i = 0; i < TEST_LIST.length; i++) { - CI currTest = TEST_LIST[i]; + for (CI currTest : TEST_LIST) { System.out.println("===" + currTest.transformation + "==="); try { KeyGenerator kg = @@ -123,7 +116,8 @@ System.out.println("Decryption tests: DONE"); } catch (NoSuchAlgorithmException nsae) { System.out.println("Skipping unsupported algorithm: " + - nsae); + nsae); + skippedList.add(currTest); } } } catch (Exception ex) { @@ -131,11 +125,15 @@ System.out.println(debugBuf); throw ex; } + + if (!skippedList.isEmpty()){ + throw new SkippedException("Some tests skipped: " + skippedList); + } } private static void test(Cipher cipher, int mode, SecretKey key, - AlgorithmParameters params, int firstBlkSize, - byte[] in, byte[] answer) throws Exception { + AlgorithmParameters params, int firstBlkSize, + byte[] in, byte[] answer) throws Exception { // test setup long startTime, endTime; cipher.init(mode, key, params); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/Cipher/TestSymmCiphersNoPad.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 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 @@ -32,6 +32,8 @@ * @run main/othervm TestSymmCiphersNoPad */ +import jtreg.SkippedException; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; @@ -39,6 +41,8 @@ import java.security.AlgorithmParameters; import java.security.NoSuchAlgorithmException; import java.security.Provider; +import java.util.ArrayList; +import java.util.List; import java.util.Random; import javax.crypto.Cipher; import javax.crypto.CipherInputStream; @@ -47,48 +51,37 @@ public class TestSymmCiphersNoPad extends PKCS11Test { - private static class CI { // class for holding Cipher Information - String transformation; - String keyAlgo; - int dataSize; - - CI(String transformation, String keyAlgo, int dataSize) { - this.transformation = transformation; - this.keyAlgo = keyAlgo; - this.dataSize = dataSize; - } - } - - private static final CI TEST_LIST[] = { - new CI("ARCFOUR", "ARCFOUR", 400), - new CI("RC4", "RC4", 401), - new CI("DES/CBC/NoPadding", "DES", 400), - new CI("DESede/CBC/NoPadding", "DESede", 160), - new CI("AES/CBC/NoPadding", "AES", 4800), - new CI("Blowfish/CBC/NoPadding", "Blowfish", 24), - new CI("AES/CTR/NoPadding", "AES", 1600), - new CI("AES/CTR/NoPadding", "AES", 65), - new CI("AES/CTS/NoPadding", "AES", 1600), - new CI("AES/CTS/NoPadding", "AES", 65), - }; + private record CI (String transformation, String keyAlgo, int dataSize){} // record for holding Cipher Information private static final StringBuffer debugBuf = new StringBuffer(); + private static final CI[] TEST_LIST = { + new CI("ARCFOUR", "ARCFOUR", 400), + new CI("RC4", "RC4", 401), + new CI("DES/CBC/NoPadding", "DES", 400), + new CI("DESede/CBC/NoPadding", "DESede", 160), + new CI("AES/CBC/NoPadding", "AES", 4800), + new CI("Blowfish/CBC/NoPadding", "Blowfish", 24), + new CI("AES/CTR/NoPadding", "AES", 1600), + new CI("AES/CTR/NoPadding", "AES", 65), + new CI("AES/CTS/NoPadding", "AES", 1600), + new CI("AES/CTS/NoPadding", "AES", 65), + }; + @Override public void main(Provider p) throws Exception { - boolean status = true; + List skippedList = new ArrayList<>(); Random random = new Random(); try { - for (int i = 0; i < TEST_LIST.length; i++) { - CI currTest = TEST_LIST[i]; + for (CI currTest : TEST_LIST) { System.out.println("===" + currTest.transformation + "==="); try { KeyGenerator kg = - KeyGenerator.getInstance(currTest.keyAlgo, p); + KeyGenerator.getInstance(currTest.keyAlgo, p); SecretKey key = kg.generateKey(); Cipher c1 = Cipher.getInstance(currTest.transformation, p); Cipher c2 = Cipher.getInstance(currTest.transformation, - System.getProperty("test.provider.name", "SunJCE")); + System.getProperty("test.provider.name", "SunJCE")); byte[] plainTxt = new byte[currTest.dataSize]; random.nextBytes(plainTxt); @@ -98,16 +91,17 @@ AlgorithmParameters params = c2.getParameters(); byte[] answer = c2.doFinal(plainTxt); test(c1, Cipher.ENCRYPT_MODE, key, params, - plainTxt, answer); + plainTxt, answer); System.out.println("Encryption tests: DONE"); c2.init(Cipher.DECRYPT_MODE, key, params); byte[] answer2 = c2.doFinal(answer); test(c1, Cipher.DECRYPT_MODE, key, params, - answer, answer2); + answer, answer2); System.out.println("Decryption tests: DONE"); } catch (NoSuchAlgorithmException nsae) { System.out.println("Skipping unsupported algorithm: " + nsae); + skippedList.add(currTest); } } } catch (Exception ex) { @@ -115,6 +109,10 @@ System.out.println(debugBuf); throw ex; } + + if (!skippedList.isEmpty()){ + throw new SkippedException("Some tests skipped: " + skippedList); + } } private static void test(Cipher cipher, int mode, SecretKey key, diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/SupportedDHKeys.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2024, 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 @@ -30,6 +30,8 @@ * @run main/othervm SupportedDHKeys */ +import jtreg.SkippedException; + import java.math.BigInteger; import java.security.KeyPair; import java.security.KeyPairGenerator; @@ -62,8 +64,7 @@ @Override public void main(Provider provider) throws Exception { if (provider.getService("KeyPairGenerator", "DiffieHellman") == null) { - System.out.println("No support of DH KeyPairGenerator, skipping"); - return; + throw new SkippedException("No support of DH KeyPairGenerator, skipping"); } for (SupportedKeySize keySize : SupportedKeySize.values()) { diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyAgreement/TestDH.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/TestDH.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyAgreement/TestDH.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/TestDH.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, 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 @@ -38,14 +38,14 @@ import javax.crypto.KeyAgreement; import javax.crypto.SecretKey; import jdk.test.lib.security.SecurityUtils; +import jtreg.SkippedException; public class TestDH extends PKCS11Test { @Override public void main(Provider p) throws Exception { if (p.getService("KeyAgreement", "DH") == null) { - System.out.println("DH not supported, skipping"); - return; + throw new SkippedException("DH not supported, skipping"); } String kpgAlgorithm = "DH"; KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm, p); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyAgreement/TestInterop.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/TestInterop.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyAgreement/TestInterop.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/TestInterop.java 2025-12-18 08:04:02.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 @@ -40,6 +40,7 @@ import javax.crypto.spec.DHPublicKeySpec; import jdk.test.lib.security.DiffieHellmanGroup; import jdk.test.lib.security.SecurityUtils; +import jtreg.SkippedException; public class TestInterop extends PKCS11Test { @@ -76,8 +77,7 @@ @Override public void main(Provider prov) throws Exception { if (prov.getService("KeyAgreement", "DH") == null) { - System.out.println("DH not supported, skipping"); - return; + throw new SkippedException("DH not supported, skipping"); } try { System.out.println("testing generateSecret()"); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyAgreement/TestShort.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/TestShort.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyAgreement/TestShort.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/TestShort.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, 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 @@ -31,6 +31,8 @@ * @run main/othervm TestShort */ +import jtreg.SkippedException; + import java.math.BigInteger; import java.security.KeyFactory; import java.security.PrivateKey; @@ -90,12 +92,10 @@ @Override public void main(Provider provider) throws Exception { if (provider.getService("KeyAgreement", "DH") == null) { - System.out.println("DH not supported, skipping"); - return; + throw new SkippedException("DH not supported, skipping"); } + try { - DHPublicKeySpec publicSpec; - DHPrivateKeySpec privateSpec; KeyFactory kf = KeyFactory.getInstance("DH", provider); KeyAgreement ka = KeyAgreement.getInstance("DH", provider); @@ -106,7 +106,7 @@ ka.init(pr1); ka.doPhase(pu2, true); byte[] n2 = ka.generateSecret(); - if (Arrays.equals(s2, n2) == false) { + if (!Arrays.equals(s2, n2)) { throw new Exception("mismatch 2"); } System.out.println("short ok"); @@ -114,7 +114,7 @@ ka.init(pr1); ka.doPhase(pu3, true); byte[] n3 = ka.generateSecret(); - if (Arrays.equals(s3, n3) == false) { + if (!Arrays.equals(s3, n3)) { throw new Exception("mismatch 3"); } System.out.println("normal ok"); @@ -123,27 +123,6 @@ ex.printStackTrace(); throw ex; } - -/* - KeyPairGenerator kpg = KeyPairGenerator.getInstance("DH", provider); - kpg.initialize(512); -// KeyPair kp1 = kpg.generateKeyPair(); -// System.out.println(kp1.getPublic()); -// System.out.println(kp1.getPrivate()); - while (true) { - KeyAgreement ka = KeyAgreement.getInstance("DH", provider); - ka.init(pr1); - KeyPair kp2 = kpg.generateKeyPair(); - ka.doPhase(kp2.getPublic(), true); - byte[] sec = ka.generateSecret(); - if (sec.length == 64) { - System.out.println(kp2.getPrivate()); - System.out.println(kp2.getPublic()); - System.out.println(toString(sec)); - break; - } - } -/**/ } public static void main(String[] args) throws Exception { diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyAgreement/UnsupportedDHKeys.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2024, 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 @@ -30,6 +30,8 @@ * @run main/othervm UnsupportedDHKeys */ +import jtreg.SkippedException; + import java.security.InvalidParameterException; import java.security.KeyPairGenerator; import java.security.Provider; @@ -59,8 +61,7 @@ @Override public void main(Provider provider) throws Exception { if (provider.getService("KeyPairGenerator", "DiffieHellman") == null) { - System.out.println("No supported of DH KeyPairGenerator, skipping"); - return; + throw new SkippedException("DH (DiffieHellman) is not supported in KeyPairGenerator, skipping"); } for (UnsupportedKeySize keySize : UnsupportedKeySize.values()) { diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyGenerator/DESParity.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyGenerator/DESParity.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyGenerator/DESParity.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyGenerator/DESParity.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, 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 @@ -32,6 +32,8 @@ * @run main/othervm DESParity */ +import jtreg.SkippedException; + import java.security.Provider; import java.util.Random; import javax.crypto.SecretKey; @@ -45,8 +47,7 @@ @Override public void main(Provider p) throws Exception { if (p.getService("SecretKeyFactory", "DES") == null) { - System.out.println("Not supported by provider, skipping"); - return; + throw new SkippedException("Not supported by provider, skipping"); } Random random = new Random(); SecretKeyFactory kf; @@ -57,7 +58,7 @@ random.nextBytes(b); SecretKeySpec spec = new SecretKeySpec(b, "DES"); SecretKey key = kf.generateSecret(spec); - if (DESKeySpec.isParityAdjusted(key.getEncoded(), 0) == false) { + if (!DESKeySpec.isParityAdjusted(key.getEncoded(), 0)) { throw new Exception("DES key not parity adjusted"); } } @@ -68,7 +69,7 @@ random.nextBytes(b); SecretKeySpec spec = new SecretKeySpec(b, "DESede"); SecretKey key = kf.generateSecret(spec); - if (DESedeKeySpec.isParityAdjusted(key.getEncoded(), 0) == false) { + if (!DESedeKeySpec.isParityAdjusted(key.getEncoded(), 0)) { throw new Exception("DESede key not parity adjusted"); } } diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyGenerator/TestAES.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyGenerator/TestAES.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyGenerator/TestAES.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyGenerator/TestAES.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2022, 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,13 +30,14 @@ * @library /test/lib .. * @run main TestAES */ +import jtreg.SkippedException; +import sun.security.util.SecurityProviderConstants; + import java.security.Provider; -import java.security.InvalidAlgorithmParameterException; import java.security.InvalidParameterException; import java.security.NoSuchAlgorithmException; import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; -import static sun.security.util.SecurityProviderConstants.*; public class TestAES extends PKCS11Test { @@ -53,17 +54,16 @@ try { kg = KeyGenerator.getInstance(ALGO, p); } catch (NoSuchAlgorithmException nsae) { - System.out.println("Skip; no support for " + ALGO); - return; + throw new SkippedException("Skip; no support for " + ALGO, nsae); } // first try w/o setting a key length and check if the generated key // length matches SecretKey key = kg.generateKey(); byte[] keyValue = key.getEncoded(); - if (key.getEncoded().length != getDefAESKeySize() >> 3) { + if (key.getEncoded().length != SecurityProviderConstants.getDefAESKeySize() >> 3) { throw new RuntimeException("Default AES key length should be " + - getDefAESKeySize()); + SecurityProviderConstants.getDefAESKeySize()); } for (int keySize : new int[] { 16, 32, 64, 128, 256, 512, 1024 }) { diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyGenerator/TestChaCha20.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyGenerator/TestChaCha20.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyGenerator/TestChaCha20.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyGenerator/TestChaCha20.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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 @@ -29,6 +29,8 @@ * @library /test/lib .. * @run main/othervm TestChaCha20 */ +import jtreg.SkippedException; + import java.security.Provider; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidParameterException; @@ -54,8 +56,7 @@ try { kg = KeyGenerator.getInstance(ALGO, p); } catch (NoSuchAlgorithmException nsae) { - System.out.println("Skip; no support for " + ALGO); - return; + throw new SkippedException("Skip; no support for " + ALGO, nsae); } try { diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyGenerator/TestKeyGenerator.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, 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 diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyPairGenerator/TestDH2048.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 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 @@ -31,6 +31,8 @@ * @run main/othervm TestDH2048 */ +import jtreg.SkippedException; + import java.security.InvalidParameterException; import java.security.KeyPair; import java.security.KeyPairGenerator; @@ -50,8 +52,7 @@ @Override public void main(Provider p) throws Exception { if (p.getService("KeyPairGenerator", "DH") == null) { - System.out.println("KPG for DH not supported, skipping"); - return; + throw new SkippedException("KPG for DH not supported, skipping"); } KeyPairGenerator kpg = KeyPairGenerator.getInstance("DH", p); kpg.initialize(512); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyPairGenerator/TestDefaultDHPrivateExpSize.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyPairGenerator/TestDefaultDHPrivateExpSize.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyPairGenerator/TestDefaultDHPrivateExpSize.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyPairGenerator/TestDefaultDHPrivateExpSize.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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 @@ -21,12 +21,12 @@ * questions. */ -import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.Provider; -import java.security.PrivateKey; import javax.crypto.spec.DHParameterSpec; import javax.crypto.interfaces.DHPrivateKey; + +import jtreg.SkippedException; import sun.security.util.SecurityProviderConstants; import sun.security.provider.ParameterCache; @@ -47,8 +47,7 @@ System.out.println("Testing " + p.getName()); if (p.getService("KeyPairGenerator", "DH") == null) { - System.out.println("Skip, no support for DH KeyPairGenerator"); - return; + throw new SkippedException("Skip, no support for DH KeyPairGenerator"); } KeyPairGenerator kpg = KeyPairGenerator.getInstance("DH", p); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyStore/CertChainRemoval.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyStore/CertChainRemoval.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyStore/CertChainRemoval.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyStore/CertChainRemoval.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 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,15 +28,17 @@ * @run testng/othervm CertChainRemoval */ import jdk.test.lib.SecurityTools; -import java.io.*; +import java.io.File; +import java.io.FileInputStream; import java.nio.file.Path; -import java.util.*; import java.security.Key; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.Provider; import java.security.cert.Certificate; +import java.util.Arrays; +import java.util.Enumeration; import jtreg.SkippedException; import org.testng.SkipException; @@ -125,8 +127,7 @@ p11ks.load(null, PKCS11KS.passwd); printKeyStore("Initial PKCS11 KeyStore: ", p11ks); } catch (Exception e) { - System.out.println("Skip test, due to " + e); - return; + throw new SkippedException("Skip test, due to " + e, e); } // get the necessary keys from the temp keystore diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyStore/ClientAuth.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyStore/ClientAuth.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/KeyStore/ClientAuth.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/KeyStore/ClientAuth.java 2025-12-18 08:04:02.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 @@ -260,8 +260,7 @@ try { javax.crypto.Cipher.getInstance("RSA/ECB/PKCS1Padding", p); } catch (GeneralSecurityException e) { - System.out.println("Not supported by provider, skipping"); - return; + throw new SkippedException("Not supported by provider, skipping"); } this.provider = p; diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/PKCS11Test.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/PKCS11Test.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/PKCS11Test.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/PKCS11Test.java 2025-12-18 08:04:02.000000000 +0000 @@ -80,7 +80,7 @@ // Version of the NSS artifact. This coincides with the version of // the NSS version - private static final String NSS_BUNDLE_VERSION = "3.107"; + private static final String NSS_BUNDLE_VERSION = "3.111"; private static final String NSSLIB = "jpg.tests.jdk.nsslib"; static double nss_version = -1; @@ -89,7 +89,7 @@ // The NSS library we need to search for in getNSSLibDir() // Default is "libsoftokn3.so", listed as "softokn3" // The other is "libnss3.so", listed as "nss3". - static String nss_library = "softokn3"; + static String nss_library = System.getProperty("CUSTOM_P11_LIBRARY_NAME", "softokn3"); // NSS versions of each library. It is simpler to keep nss_version // for quick checking for generic testing than many if-else statements. @@ -199,6 +199,17 @@ if (PKCS11_BASE != null) { return PKCS11_BASE; } + String customBaseDir = System.getProperty("CUSTOM_P11_CONFIG_BASE_DIR"); + if (customBaseDir != null) { + File base = new File(customBaseDir); + if (!base.exists()) { + throw new RuntimeException( + "Directory specified by CUSTOM_P11_CONFIG_BASE_DIR does not exist: " + + base.getAbsolutePath()); + } + PKCS11_BASE = base.getAbsolutePath(); + return PKCS11_BASE; + } File cwd = new File(System.getProperty("test.src", ".")).getCanonicalFile(); while (true) { File file = new File(cwd, "TEST.ROOT"); @@ -454,6 +465,40 @@ System.out.println("testNSS: Completed"); } + /** + * Prepares the NSS configuration file hierarchy, then returns the + * path of the configuration file that should be used to configure + * the PKCS11 provider. + * + * By default, the contents of the directory + * "test/jdk/sun/security/pkcs11/nss" are copied to the jtreg + * scratch directory ("."), and "./nss/p11-nss.txt" is returned. + * + * The following system properties modify the default behavior: + * + * CUSTOM_P11_CONFIG_BASE_DIR: The path of a custom configuration + * file hierarchy; overrides the default, + * "test/jdk/sun/security/pkcs11". + * + * CUSTOM_P11_CONFIG_NAME: The name of a custom configuration + * file; overrides the default, "p11-nss.txt". Note that some + * test cases set CUSTOM_P11_CONFIG_NAME using -D in jtreg @run + * tags; for those test cases, setting this property on the + * top-level jtreg command line has no effect. + * + * CUSTOM_P11_CONFIG: The path of a custom configuration file; + * overrides the default "./nss/p11-nss.txt". This takes + * precedence over CUSTOM_P11_CONFIG_NAME. Tests that hard-code + * CUSTOM_P11_CONFIG_NAME in jtreg @run tags may not work + * correctly when CUSTOM_P11_CONFIG is set on the top-level jtreg + * command line. + * + * CUSTOM_DB_DIR: The path of a custom database directory; + * overrides the default, "./nss/db". + * + * CUSTOM_P11_LIBRARY_NAME: The name of a custom provider library + * to load; overrides the default, "softokn3". + */ public static String getNssConfig() throws Exception { String libdir = getNSSLibDir(); if (libdir == null) { diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/SecretKeyFactory/TestGeneral.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/SecretKeyFactory/TestGeneral.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/SecretKeyFactory/TestGeneral.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/SecretKeyFactory/TestGeneral.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 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,10 +30,14 @@ * @run main/othervm TestGeneral */ +import jtreg.SkippedException; + import java.security.NoSuchAlgorithmException; import java.security.Provider; import java.security.SecureRandom; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import javax.crypto.SecretKeyFactory; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; @@ -57,8 +61,11 @@ try { skf = SecretKeyFactory.getInstance(algorithm, p); } catch (NoSuchAlgorithmException e) { - System.out.println("Not supported, skipping: " + e); - return; + throw new SkippedException("[algorithm: " + algorithm + + ", key: " + key.getAlgorithm() + "]" + + ", provider: " + p.getName() + "]" + + ", expectedTestResult: " + expected + "]" + + "Not supported, skipping: " + e); } try { SecretKey key2 = skf.translateKey(key); @@ -99,21 +106,31 @@ SecretKey bf_128Key = new SecretKeySpec(rawBytes, 0, 16, "Blowfish"); SecretKey cc20Key = new SecretKeySpec(rawBytes, 0, 32, "ChaCha20"); - // fixed key length - test("AES", aes_128Key, p, TestResult.PASS); - test("AES", aes_256Key, p, TestResult.PASS); - test("AES", cc20Key, p, TestResult.FAIL); - - test("ChaCha20", aes_128Key, p, TestResult.FAIL); - test("ChaCha20", aes_256Key, p, TestResult.FAIL); - test("ChaCha20", cc20Key, p, TestResult.PASS); - - // variable key length - // Different PKCS11 impls may have different ranges - // of supported key sizes for variable-key-length - // algorithms. - test("Blowfish", aes_128Key, p, TestResult.FAIL); - test("Blowfish", cc20Key, p, TestResult.FAIL); - test("Blowfish", bf_128Key, p, TestResult.PASS); + List skippedList = new ArrayList<>(); + try { + // fixed key length + test("AES", aes_128Key, p, TestResult.PASS); + test("AES", aes_256Key, p, TestResult.PASS); + test("AES", cc20Key, p, TestResult.FAIL); + + test("ChaCha20", aes_128Key, p, TestResult.FAIL); + test("ChaCha20", aes_256Key, p, TestResult.FAIL); + test("ChaCha20", cc20Key, p, TestResult.PASS); + + // variable key length + // Different PKCS11 impls may have different ranges + // of supported key sizes for variable-key-length + // algorithms. + test("Blowfish", aes_128Key, p, TestResult.FAIL); + test("Blowfish", cc20Key, p, TestResult.FAIL); + test("Blowfish", bf_128Key, p, TestResult.PASS); + } catch (SkippedException skippedException){ + skippedException.printStackTrace(); + skippedList.add(skippedException.getMessage()); + } + + if (!skippedList.isEmpty()) { + throw new SkippedException("One or more tests skipped " + skippedList); + } } } diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/SecureRandom/Basic.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/SecureRandom/Basic.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/SecureRandom/Basic.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/SecureRandom/Basic.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -32,6 +32,8 @@ * @run main/othervm Basic */ +import jtreg.SkippedException; + import java.security.NoSuchAlgorithmException; import java.security.Provider; import java.security.SecureRandom; @@ -44,9 +46,8 @@ try { random = SecureRandom.getInstance("PKCS11"); } catch (NoSuchAlgorithmException e) { - System.out.println("Provider " + p + " does not support SecureRandom, skipping"); e.printStackTrace(); - return; + throw new SkippedException("Provider " + p + " does not support SecureRandom, skipping", e); } byte[] b = new byte[32]; random.nextBytes(b); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/SecureRandom/TestDeserialization.java openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/SecureRandom/TestDeserialization.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/pkcs11/SecureRandom/TestDeserialization.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/pkcs11/SecureRandom/TestDeserialization.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 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 @@ -29,6 +29,8 @@ * @modules jdk.crypto.cryptoki */ +import jtreg.SkippedException; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; @@ -43,18 +45,16 @@ public void main(Provider p) throws Exception { // Skip this test for providers not found by java.security.Security if (Security.getProvider(p.getName()) != p) { - System.out.println("Skip test for provider " + p.getName()); - return; + throw new SkippedException("Skip test for provider " + p.getName()); } SecureRandom r; try { r = SecureRandom.getInstance("PKCS11", p); System.out.println("SecureRandom instance " + r); } catch (NoSuchAlgorithmException e) { - System.out.println("Provider " + p + - " does not support SecureRandom, skipping"); e.printStackTrace(); - return; + throw new SkippedException("Provider " + p + + " does not support SecureRandom, skipping"); } r.setSeed(System.currentTimeMillis()); byte[] buf = new byte[16]; diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/ssl/SignatureScheme/SigAlgosExtTestWithTLS12.java openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/SignatureScheme/SigAlgosExtTestWithTLS12.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/ssl/SignatureScheme/SigAlgosExtTestWithTLS12.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/SignatureScheme/SigAlgosExtTestWithTLS12.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (C) 2021, 2024 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, 2024, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/ssl/SignatureScheme/SigAlgosExtTestWithTLS13.java openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/SignatureScheme/SigAlgosExtTestWithTLS13.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/ssl/SignatureScheme/SigAlgosExtTestWithTLS13.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/ssl/SignatureScheme/SigAlgosExtTestWithTLS13.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/tools/jarsigner/EC.java openjdk-25-25.0.2+10/test/jdk/sun/security/tools/jarsigner/EC.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/tools/jarsigner/EC.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/tools/jarsigner/EC.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ * @bug 6870812 * @summary enhance security tools to use ECC algorithm * @library /test/lib + * @run main/timeout=300 EC */ import jdk.test.lib.SecurityTools; diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/tools/jarsigner/VerifyJarEntryName.java openjdk-25-25.0.2+10/test/jdk/sun/security/tools/jarsigner/VerifyJarEntryName.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/tools/jarsigner/VerifyJarEntryName.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/tools/jarsigner/VerifyJarEntryName.java 2025-12-18 08:04:02.000000000 +0000 @@ -38,12 +38,13 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; +import java.util.Arrays; import java.util.jar.JarFile; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; import jdk.test.lib.SecurityTools; -import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.junit.jupiter.api.Assertions.fail; public class VerifyJarEntryName { @@ -85,7 +86,7 @@ */ @Test void verifyManifestEntryName() throws Exception { - modifyJarEntryName(ORIGINAL_JAR, MODIFIED_JAR, "MANIFEST.MF"); + modifyJarEntryName(ORIGINAL_JAR, MODIFIED_JAR, "META-INF/MANIFEST.MF"); SecurityTools.jarsigner("-verify -verbose " + MODIFIED_JAR) .shouldContain("This JAR file contains internal " + "inconsistencies that may result in different " + @@ -96,6 +97,22 @@ } /* + * Modify a single byte in signature filename in LOC, and + * validate that jarsigner -verify emits a warning message. + */ + @Test + void verifySignatureEntryName() throws Exception { + modifyJarEntryName(ORIGINAL_JAR, MODIFIED_JAR, "META-INF/MYKEY.SF"); + SecurityTools.jarsigner("-verify -verbose " + MODIFIED_JAR) + .shouldContain("This JAR file contains internal " + + "inconsistencies that may result in different " + + "contents when reading via JarFile and JarInputStream:") + .shouldContain("- Entry XETA-INF/MYKEY.SF is present when reading " + + "via JarInputStream but missing when reading via JarFile") + .shouldHaveExitValue(0); + } + + /* * Validate that jarsigner -verify on a valid JAR works without * emitting warnings about internal inconsistencies. */ @@ -111,9 +128,14 @@ private void modifyJarEntryName(Path origJar, Path modifiedJar, String entryName) throws Exception { byte[] jarBytes = Files.readAllBytes(origJar); - var jarString = new String(jarBytes, StandardCharsets.UTF_8); - var pos = jarString.indexOf(entryName); - assertTrue(pos != -1, entryName + " is not present in the JAR"); + byte[] entryNameBytes = entryName.getBytes(StandardCharsets.UTF_8); + int pos = 0; + try { + while (!Arrays.equals(jarBytes, pos, pos + entryNameBytes.length, + entryNameBytes, 0, entryNameBytes.length)) pos++; + } catch (ArrayIndexOutOfBoundsException ignore) { + fail(entryName + " is not present in the JAR"); + } jarBytes[pos] = 'X'; Files.write(modifiedJar, jarBytes); } diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/x509/URICertStore/AIACertTimeout.java openjdk-25-25.0.2+10/test/jdk/sun/security/x509/URICertStore/AIACertTimeout.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/x509/URICertStore/AIACertTimeout.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/x509/URICertStore/AIACertTimeout.java 2025-12-18 08:04:02.000000000 +0000 @@ -47,6 +47,7 @@ import java.io.*; import java.math.BigInteger; import java.net.InetSocketAddress; +import java.security.Security; import java.security.cert.*; import java.security.KeyPair; import java.security.KeyPairGenerator; @@ -69,6 +70,7 @@ private static X509Certificate eeCert; public static void main(String[] args) throws Exception { + Security.setProperty("com.sun.security.allowedAIALocations", "any"); int servTimeoutMsec = (args != null && args.length >= 1) ? Integer.parseInt(args[0]) : -1; boolean expectedPass = args != null && args.length >= 2 && diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/security/x509/URICertStore/ExtensionsWithLDAP.java openjdk-25-25.0.2+10/test/jdk/sun/security/x509/URICertStore/ExtensionsWithLDAP.java --- openjdk-25-25.0.1+8/test/jdk/sun/security/x509/URICertStore/ExtensionsWithLDAP.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/security/x509/URICertStore/ExtensionsWithLDAP.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,6 +38,7 @@ import java.io.IOException; import java.net.InetSocketAddress; import java.net.Socket; +import java.security.Security; import java.security.cert.CertPath; import java.security.cert.CertPathValidator; import java.security.cert.CertPathValidatorException; @@ -47,7 +48,6 @@ import java.security.cert.TrustAnchor; import java.security.cert.X509Certificate; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -67,25 +67,27 @@ * Not After : Jan 17 18:03:59 2043 GMT * Subject: CN=Root */ - private static final String CA_CERT = "" - + "-----BEGIN CERTIFICATE-----\n" - + "MIIC8TCCAdmgAwIBAgIJAJsSNtj5wdqqMA0GCSqGSIb3DQEBDQUAMA8xDTALBgNV\n" - + "BAMMBFJvb3QwHhcNMTUwOTAxMTgwMzU5WhcNNDMwMTE3MTgwMzU5WjAPMQ0wCwYD\n" - + "VQQDDARSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvj892vPm\n" - + "bB++x9QqqyBveP+ZqQ2B1stV7vh5JmDnOTevkZUOcemp3SXu/esNLSbpL+fARYXH\n" - + "V5ubnrfip6RbvcxPfVIIDJrRTLIIsU6W7M6/LJLbLkEVGy4ZV4IHkOw9W2O92rcv\n" - + "BkoqhzZnOTGR6uT3rRcKx4RevEKBKhZO+OPPf//lnckOybmYL7t7yQrajzHro76b\n" - + "QTXYjAUq/DKhglXfC7vF/JzlAvG2IunGmIfjGcnuDo/9X3Bxef/q5TxCS35fvb7t\n" - + "svC+g2QhTcBkQh4uNW2jSjlTIVp1uErCfP5aCjLaez5mqmb1hxPIlcvsNR23HwU6\n" - + "bQO7z7NBo9Do6QIDAQABo1AwTjAdBgNVHQ4EFgQUmLZNOBBkqdYoElyxklPYHmAb\n" - + "QXIwHwYDVR0jBBgwFoAUmLZNOBBkqdYoElyxklPYHmAbQXIwDAYDVR0TBAUwAwEB\n" - + "/zANBgkqhkiG9w0BAQ0FAAOCAQEAYV4fOhDi5q7+XNXCxO8Eil2frR9jqdP4LaQp\n" - + "3L0evW0gvPX68s2WmkPWzIu4TJcpdGFQqxyQFSXuKBXjthyiln77QItGTHWeafES\n" - + "q5ESrKdSaJZq1bTIrrReCIP74f+fY/F4Tnb3dCqzaljXfzpdbeRsIW6gF71xcOUQ\n" - + "nnPEjGVPLUegN+Wn/jQpeLxxIB7FmNXncdRUfMfZ43xVSKuMCy1UUYqJqTa/pXZj\n" - + "jCMeRPThRjRqHlJ69jStfWUQATbLyj9KN09rUaJxzmUSt61UqJi7sjcGySaCjAJc\n" - + "IcCdVmX/DmRLsdv8W36O3MgrvpT1zR3kaAlv2d8HppnBqcL3xg==\n" - + "-----END CERTIFICATE-----"; + private static final String CA_CERT = + """ + -----BEGIN CERTIFICATE----- + MIIC8TCCAdmgAwIBAgIJAJsSNtj5wdqqMA0GCSqGSIb3DQEBDQUAMA8xDTALBgNV + BAMMBFJvb3QwHhcNMTUwOTAxMTgwMzU5WhcNNDMwMTE3MTgwMzU5WjAPMQ0wCwYD + VQQDDARSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvj892vPm + bB++x9QqqyBveP+ZqQ2B1stV7vh5JmDnOTevkZUOcemp3SXu/esNLSbpL+fARYXH + V5ubnrfip6RbvcxPfVIIDJrRTLIIsU6W7M6/LJLbLkEVGy4ZV4IHkOw9W2O92rcv + BkoqhzZnOTGR6uT3rRcKx4RevEKBKhZO+OPPf//lnckOybmYL7t7yQrajzHro76b + QTXYjAUq/DKhglXfC7vF/JzlAvG2IunGmIfjGcnuDo/9X3Bxef/q5TxCS35fvb7t + svC+g2QhTcBkQh4uNW2jSjlTIVp1uErCfP5aCjLaez5mqmb1hxPIlcvsNR23HwU6 + bQO7z7NBo9Do6QIDAQABo1AwTjAdBgNVHQ4EFgQUmLZNOBBkqdYoElyxklPYHmAb + QXIwHwYDVR0jBBgwFoAUmLZNOBBkqdYoElyxklPYHmAbQXIwDAYDVR0TBAUwAwEB + /zANBgkqhkiG9w0BAQ0FAAOCAQEAYV4fOhDi5q7+XNXCxO8Eil2frR9jqdP4LaQp + 3L0evW0gvPX68s2WmkPWzIu4TJcpdGFQqxyQFSXuKBXjthyiln77QItGTHWeafES + q5ESrKdSaJZq1bTIrrReCIP74f+fY/F4Tnb3dCqzaljXfzpdbeRsIW6gF71xcOUQ + nnPEjGVPLUegN+Wn/jQpeLxxIB7FmNXncdRUfMfZ43xVSKuMCy1UUYqJqTa/pXZj + jCMeRPThRjRqHlJ69jStfWUQATbLyj9KN09rUaJxzmUSt61UqJi7sjcGySaCjAJc + IcCdVmX/DmRLsdv8W36O3MgrvpT1zR3kaAlv2d8HppnBqcL3xg== + -----END CERTIFICATE----- + """; /* * Certificate: @@ -106,39 +108,41 @@ * Authority Information Access: * CA Issuers - URI:ldap://ldap.host.for.aia/dc=Root?cACertificate */ - private static final String EE_CERT = "" - + "-----BEGIN CERTIFICATE-----\n" - + "MIIDHTCCAgWgAwIBAgIBBzANBgkqhkiG9w0BAQ0FADAPMQ0wCwYDVQQDDARSb290\n" - + "MB4XDTE1MDkwMTE4MDM1OVoXDTQzMDExNzE4MDM1OVowDTELMAkGA1UEAwwCRUUw\n" - + "ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCpyz97liuWPDYcLH9TX8Bi\n" - + "T78olCmAfmevvch6ncXUVuCzbdaKuKXwn4EVbDszsVJLoK5zdtP+X3iDhutj+IgK\n" - + "mLhuczF3M9VIcWr+JJUyTH4+3h/RT8cjCDZOmk9iXkb5ifruVsLqzb9g+Vp140Oz\n" - + "7leikne7KmclHvTfvFd0WDI7Gb9vo4f5rT717BXJ/n+M6pNk8DLpLiEu6eziYvXR\n" - + "v5x+t5Go3x0eCXdaxEQUf2j876Wfr2qHRJK7lDfFe1DDsMg/KpKGiILYZ+g2qtVM\n" - + "ZSxtp5BZEtfB5qV/IE5kWO+mCIAGpXSZIdbERR6pZUq8GLEe1T9e+sO6H24w2F19\n" - + "AgMBAAGjgYUwgYIwNAYDVR0fBC0wKzApoCegJYYjbGRhcDovL2xkYXAuaG9zdC5m\n" - + "b3IuY3JsZHAvbWFpbi5jcmwwSgYIKwYBBQUHAQEEPjA8MDoGCCsGAQUFBzAChi5s\n" - + "ZGFwOi8vbGRhcC5ob3N0LmZvci5haWEvZGM9Um9vdD9jQUNlcnRpZmljYXRlMA0G\n" - + "CSqGSIb3DQEBDQUAA4IBAQBWDfZHpuUx0yn5d3+BuztFqoks1MkGdk+USlH0TB1/\n" - + "gWWBd+4S4PCKlpSur0gj2rMW4fP5HQfNlHci8JV8/bG4KuKRAXW56dg1818Hl3pc\n" - + "iIrUSRn8uUjH3p9qb+Rb/u3mmVQRyJjN2t/zceNsO8/+Dd808OB9aEwGs8lMT0nn\n" - + "ZYaaAqYz1GIY/Ecyx1vfEZEQ1ljo6i/r70C3igbypBUShxSiGsleiVTLOGNA+MN1\n" - + "/a/Qh0bkaQyTGqK3bwvzzMeQVqWu2EWTBD/PmND5ExkpRICdv8LBVXfLnpoBr4lL\n" - + "hnxn9+e0Ah+t8dS5EKfn44w5bI5PCu2bqxs6RCTxNjcY\n" - + "-----END CERTIFICATE-----"; + private static final String EE_CERT = + """ + -----BEGIN CERTIFICATE----- + MIIDHTCCAgWgAwIBAgIBBzANBgkqhkiG9w0BAQ0FADAPMQ0wCwYDVQQDDARSb290 + MB4XDTE1MDkwMTE4MDM1OVoXDTQzMDExNzE4MDM1OVowDTELMAkGA1UEAwwCRUUw + ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCpyz97liuWPDYcLH9TX8Bi + T78olCmAfmevvch6ncXUVuCzbdaKuKXwn4EVbDszsVJLoK5zdtP+X3iDhutj+IgK + mLhuczF3M9VIcWr+JJUyTH4+3h/RT8cjCDZOmk9iXkb5ifruVsLqzb9g+Vp140Oz + 7leikne7KmclHvTfvFd0WDI7Gb9vo4f5rT717BXJ/n+M6pNk8DLpLiEu6eziYvXR + v5x+t5Go3x0eCXdaxEQUf2j876Wfr2qHRJK7lDfFe1DDsMg/KpKGiILYZ+g2qtVM + ZSxtp5BZEtfB5qV/IE5kWO+mCIAGpXSZIdbERR6pZUq8GLEe1T9e+sO6H24w2F19 + AgMBAAGjgYUwgYIwNAYDVR0fBC0wKzApoCegJYYjbGRhcDovL2xkYXAuaG9zdC5m + b3IuY3JsZHAvbWFpbi5jcmwwSgYIKwYBBQUHAQEEPjA8MDoGCCsGAQUFBzAChi5s + ZGFwOi8vbGRhcC5ob3N0LmZvci5haWEvZGM9Um9vdD9jQUNlcnRpZmljYXRlMA0G + CSqGSIb3DQEBDQUAA4IBAQBWDfZHpuUx0yn5d3+BuztFqoks1MkGdk+USlH0TB1/ + gWWBd+4S4PCKlpSur0gj2rMW4fP5HQfNlHci8JV8/bG4KuKRAXW56dg1818Hl3pc + iIrUSRn8uUjH3p9qb+Rb/u3mmVQRyJjN2t/zceNsO8/+Dd808OB9aEwGs8lMT0nn + ZYaaAqYz1GIY/Ecyx1vfEZEQ1ljo6i/r70C3igbypBUShxSiGsleiVTLOGNA+MN1 + /a/Qh0bkaQyTGqK3bwvzzMeQVqWu2EWTBD/PmND5ExkpRICdv8LBVXfLnpoBr4lL + hnxn9+e0Ah+t8dS5EKfn44w5bI5PCu2bqxs6RCTxNjcY + -----END CERTIFICATE-----"""; public static void main(String[] args) throws Exception { String extension = args[0]; String targetHost = args[1]; - + Security.setProperty("com.sun.security.allowedAIALocations", + "ldap://" + targetHost + "/dc=Root"); X509Certificate trustedCert = loadCertificate(CA_CERT); X509Certificate eeCert = loadCertificate(EE_CERT); Set trustedCertsSet = new HashSet<>(); trustedCertsSet.add(new TrustAnchor(trustedCert, null)); - CertPath cp = (CertPath) CertificateFactory.getInstance("X509") - .generateCertPath(Arrays.asList(eeCert)); + CertPath cp = CertificateFactory.getInstance("X509") + .generateCertPath(List.of(eeCert)); // CertPath validator should try to parse CRLDP and AIA extensions, // and load CRLs/certs which they point to. @@ -151,7 +155,7 @@ = (InetSocketAddress) socket.getRemoteSocketAddress(); hosts.add(remoteAddress.getHostName()); }; - try (SocksProxy proxy = SocksProxy.startProxy(socketConsumer)) { + try (SocksProxy _ = SocksProxy.startProxy(socketConsumer)) { CertPathValidator.getInstance("PKIX").validate(cp, new PKIXParameters(trustedCertsSet)); throw new RuntimeException("CertPathValidatorException not thrown"); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/text/resources/LocaleDataTest.java openjdk-25-25.0.2+10/test/jdk/sun/text/resources/LocaleDataTest.java --- openjdk-25-25.0.1+8/test/jdk/sun/text/resources/LocaleDataTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/text/resources/LocaleDataTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -41,7 +41,7 @@ * 8187946 8195478 8181157 8179071 8193552 8202026 8204269 8202537 8208746 * 8209775 8221432 8227127 8230284 8231273 8233579 8234288 8250665 8255086 * 8251317 8274658 8283277 8283805 8265315 8287868 8295564 8284840 8296715 - * 8301206 8303472 8317979 8306116 8174269 8333582 8357075 8357882 + * 8301206 8303472 8317979 8306116 8174269 8333582 8357075 8357882 8367021 * @summary Verify locale data * @modules java.base/sun.util.resources * @modules jdk.localedata @@ -204,7 +204,7 @@ in = new BufferedReader(new InputStreamReader(new FileInputStream(localeData), StandardCharsets.UTF_8)); } - out = new PrintWriter(new OutputStreamWriter(System.out, StandardCharsets.UTF_8)); + out = new PrintWriter(new OutputStreamWriter(System.out, StandardCharsets.UTF_8), true); // perform the actual test int errorCount = doTest(in, out, writeNewFile); diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcCapacityOutput1.sh openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcCapacityOutput1.sh --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcCapacityOutput1.sh 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcCapacityOutput1.sh 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2020, 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 @@ -34,4 +34,9 @@ JSTAT="${TESTJAVA}/bin/jstat" ${JSTAT} ${COMMON_JSTAT_FLAGS} -gccapacity 0 2>&1 | awk -f ${TESTSRC}/gcCapacityOutput1.awk +RC=$? +if [ $RC -ne 0 ]; then + exit $RC +fi + ${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gccapacity 0 2>&1 | awk -f ${TESTSRC}/gcCapacityOutput1.awk diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcCauseOutput1.sh openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcCauseOutput1.sh --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcCauseOutput1.sh 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcCauseOutput1.sh 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2020, 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 @@ -38,4 +38,9 @@ # The UseParallelGC collector does not currently update the gc cause counters. ${JSTAT} ${COMMON_JSTAT_FLAGS} -gccause 0 2>&1 | awk -f ${TESTSRC}/gcCauseOutput1.awk +RC=$? +if [ $RC -ne 0 ]; then + exit $RC +fi + ${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseSerialGC -gccause 0 2>&1 | awk -f ${TESTSRC}/gcCauseOutput1.awk diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcMetaCapacityOutput1.sh openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcMetaCapacityOutput1.sh --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcMetaCapacityOutput1.sh 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcMetaCapacityOutput1.sh 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2013, 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 @@ -34,4 +34,9 @@ JSTAT="${TESTJAVA}/bin/jstat" ${JSTAT} ${COMMON_JSTAT_FLAGS} -gcmetacapacity 0 2>&1 | awk -f ${TESTSRC}/gcMetaCapacityOutput1.awk +RC=$? +if [ $RC -ne 0 ]; then + exit $RC +fi + ${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcmetacapacity 0 2>&1 | awk -f ${TESTSRC}/gcMetaCapacityOutput1.awk diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcNewCapacityOutput1.sh openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcNewCapacityOutput1.sh --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcNewCapacityOutput1.sh 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcNewCapacityOutput1.sh 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2020, 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 @@ -34,4 +34,9 @@ JSTAT="${TESTJAVA}/bin/jstat" ${JSTAT} ${COMMON_JSTAT_FLAGS} -gcnewcapacity 0 2>&1 | awk -f ${TESTSRC}/gcNewCapacityOutput1.awk +RC=$? +if [ $RC -ne 0 ]; then + exit $RC +fi + ${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcnewcapacity 0 2>&1 | awk -f ${TESTSRC}/gcNewCapacityOutput1.awk diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcNewOutput1.sh openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcNewOutput1.sh --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcNewOutput1.sh 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcNewOutput1.sh 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2020, 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 @@ -34,4 +34,9 @@ JSTAT="${TESTJAVA}/bin/jstat" ${JSTAT} ${COMMON_JSTAT_FLAGS} -gcnew 0 2>&1 | awk -f ${TESTSRC}/gcNewOutput1.awk +RC=$? +if [ $RC -ne 0 ]; then + exit $RC +fi + ${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcnew 0 2>&1 | awk -f ${TESTSRC}/gcNewOutput1.awk diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcOldCapacityOutput1.sh openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcOldCapacityOutput1.sh --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcOldCapacityOutput1.sh 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcOldCapacityOutput1.sh 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2020, 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 @@ -34,4 +34,9 @@ JSTAT="${TESTJAVA}/bin/jstat" ${JSTAT} ${COMMON_JSTAT_FLAGS} -gcoldcapacity 0 2>&1 | awk -f ${TESTSRC}/gcOldCapacityOutput1.awk +RC=$? +if [ $RC -ne 0 ]; then + exit $RC +fi + ${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcoldcapacity 0 2>&1 | awk -f ${TESTSRC}/gcOldCapacityOutput1.awk diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcOldOutput1.sh openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcOldOutput1.sh --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcOldOutput1.sh 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcOldOutput1.sh 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2020, 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 @@ -34,4 +34,9 @@ JSTAT="${TESTJAVA}/bin/jstat" ${JSTAT} ${COMMON_JSTAT_FLAGS} -gcold 0 2>&1 | awk -f ${TESTSRC}/gcOldOutput1.awk +RC=$? +if [ $RC -ne 0 ]; then + exit $RC +fi + ${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcold 0 2>&1 | awk -f ${TESTSRC}/gcOldOutput1.awk diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcOutput1.sh openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcOutput1.sh --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatGcOutput1.sh 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatGcOutput1.sh 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2020, 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 @@ -34,4 +34,9 @@ JSTAT="${TESTJAVA}/bin/jstat" ${JSTAT} ${COMMON_JSTAT_FLAGS} -gc 0 2>&1 | awk -f ${TESTSRC}/gcOutput1.awk +RC=$? +if [ $RC -ne 0 ]; then + exit $RC +fi + ${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gc 0 2>&1 | awk -f ${TESTSRC}/gcOutput1.awk diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatLineCounts1.sh openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatLineCounts1.sh --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatLineCounts1.sh 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatLineCounts1.sh 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2020, 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 @@ -34,4 +34,9 @@ JSTAT="${TESTJAVA}/bin/jstat" ${JSTAT} ${COMMON_JSTAT_FLAGS} -gcutil 0 250 5 2>&1 | awk -f ${TESTSRC}/lineCounts1.awk +RC=$? +if [ $RC -ne 0 ]; then + exit $RC +fi + ${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcutil 0 250 5 2>&1 | awk -f ${TESTSRC}/lineCounts1.awk diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatLineCounts2.sh openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatLineCounts2.sh --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatLineCounts2.sh 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatLineCounts2.sh 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2020, 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 @@ -34,4 +34,9 @@ JSTAT="${TESTJAVA}/bin/jstat" ${JSTAT} ${COMMON_JSTAT_FLAGS} -gcutil 0 2>&1 | awk -f ${TESTSRC}/lineCounts2.awk +RC=$? +if [ $RC -ne 0 ]; then + exit $RC +fi + ${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcutil 0 2>&1 | awk -f ${TESTSRC}/lineCounts2.awk diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatLineCounts3.sh openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatLineCounts3.sh --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatLineCounts3.sh 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatLineCounts3.sh 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2020, 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 @@ -34,4 +34,9 @@ JSTAT="${TESTJAVA}/bin/jstat" ${JSTAT} ${COMMON_JSTAT_FLAGS} -gcutil -h 10 0 250 10 2>&1 | awk -f ${TESTSRC}/lineCounts3.awk +RC=$? +if [ $RC -ne 0 ]; then + exit $RC +fi + ${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcutil -h 10 0 250 10 2>&1 | awk -f ${TESTSRC}/lineCounts3.awk diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatLineCounts4.sh openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatLineCounts4.sh --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/jstatLineCounts4.sh 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/jstatLineCounts4.sh 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2004, 2020, 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 @@ -34,4 +34,9 @@ JSTAT="${TESTJAVA}/bin/jstat" ${JSTAT} ${COMMON_JSTAT_FLAGS} -gcutil -h 10 0 250 11 2>&1 | awk -f ${TESTSRC}/lineCounts4.awk +RC=$? +if [ $RC -ne 0 ]; then + exit $RC +fi + ${JSTAT} ${COMMON_JSTAT_FLAGS} -J-XX:+UseParallelGC -gcutil -h 10 0 250 11 2>&1 | awk -f ${TESTSRC}/lineCounts4.awk diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/lineCounts1.awk openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/lineCounts1.awk --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/lineCounts1.awk 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/lineCounts1.awk 2025-12-18 08:04:02.000000000 +0000 @@ -29,7 +29,7 @@ headerlines++; } -/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*[0-9]+\.[0-9]+$/ { +/^[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*[0-9]+\.[0-9]+$/ { datalines++; } diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/lineCounts2.awk openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/lineCounts2.awk --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/lineCounts2.awk 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/lineCounts2.awk 2025-12-18 08:04:02.000000000 +0000 @@ -21,7 +21,7 @@ headerlines++; } -/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*[0-9]+\.[0-9]+$/ { +/^[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*[0-9]+\.[0-9]+$/ { datalines++; } diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/lineCounts3.awk openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/lineCounts3.awk --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/lineCounts3.awk 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/lineCounts3.awk 2025-12-18 08:04:02.000000000 +0000 @@ -39,7 +39,7 @@ headerlines++; } -/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*[0-9]+\.[0-9]+$/ { +/^[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*[0-9]+\.[0-9]+$/ { datalines++; } diff -Nru openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/lineCounts4.awk openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/lineCounts4.awk --- openjdk-25-25.0.1+8/test/jdk/sun/tools/jstat/lineCounts4.awk 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/sun/tools/jstat/lineCounts4.awk 2025-12-18 08:04:02.000000000 +0000 @@ -44,7 +44,7 @@ headerlines++; } -/^[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*[0-9]+\.[0-9]+$/ { +/^[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*[0-9]+[ ]*[0-9]+\.[0-9]+[ ]*([0-9]+|-)[ ]*([0-9]+\.[0-9]+|-)[ ]*[0-9]+\.[0-9]+$/ { if (headerlines == 2) { datalines2++; } diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/TEST.properties openjdk-25-25.0.2+10/test/jdk/tools/jpackage/TEST.properties --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/TEST.properties 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/TEST.properties 2025-12-18 08:04:02.000000000 +0000 @@ -22,5 +22,6 @@ jdk.jpackage/jdk.jpackage.internal:+open \ jdk.jpackage/jdk.jpackage.internal.util \ jdk.jpackage/jdk.jpackage.internal.util.function \ + jdk.jpackage/jdk.jpackage.internal.resources:+open \ java.base/jdk.internal.util \ jdk.jlink/jdk.tools.jlink.internal diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/apps/PrintEnv.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/apps/PrintEnv.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/apps/PrintEnv.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/apps/PrintEnv.java 2025-12-18 08:04:02.000000000 +0000 @@ -21,18 +21,38 @@ * questions. */ +import java.io.IOException; +import java.io.UncheckedIOException; import java.lang.module.ModuleDescriptor; import java.lang.module.ModuleFinder; import java.lang.module.ModuleReference; +import java.nio.file.Files; +import java.nio.file.Path; import java.util.ArrayList; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; public class PrintEnv { public static void main(String[] args) { List lines = printArgs(args); - lines.forEach(System.out::println); + Optional.ofNullable(System.getProperty("jpackage.test.appOutput")).map(Path::of).ifPresentOrElse(outputFilePath -> { + Optional.ofNullable(outputFilePath.getParent()).ifPresent(dir -> { + try { + Files.createDirectories(dir); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + }); + try { + Files.write(outputFilePath, lines); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + }, () -> { + lines.forEach(System.out::println); + }); } private static List printArgs(String[] args) { @@ -45,11 +65,13 @@ } else if (arg.startsWith(PRINT_SYS_PROP)) { String name = arg.substring(PRINT_SYS_PROP.length()); lines.add(name + "=" + System.getProperty(name)); - } else if (arg.startsWith(PRINT_MODULES)) { + } else if (arg.equals(PRINT_MODULES)) { lines.add(ModuleFinder.ofSystem().findAll().stream() .map(ModuleReference::descriptor) .map(ModuleDescriptor::name) .collect(Collectors.joining(","))); + } else if (arg.equals(PRINT_WORK_DIR)) { + lines.add("$CD=" + Path.of("").toAbsolutePath()); } else { throw new IllegalArgumentException(); } @@ -58,7 +80,8 @@ return lines; } - private final static String PRINT_ENV_VAR = "--print-env-var="; - private final static String PRINT_SYS_PROP = "--print-sys-prop="; - private final static String PRINT_MODULES = "--print-modules"; + private static final String PRINT_ENV_VAR = "--print-env-var="; + private static final String PRINT_SYS_PROP = "--print-sys-prop="; + private static final String PRINT_MODULES = "--print-modules"; + private static final String PRINT_WORK_DIR = "--print-workdir"; } diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/apps/UseShutdownHook.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/apps/UseShutdownHook.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/apps/UseShutdownHook.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/apps/UseShutdownHook.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,88 @@ +/* + * 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. + */ + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; + +public class UseShutdownHook { + + public static void main(String[] args) throws InterruptedException { + trace("Started"); + + var outputFile = Path.of(args[0]); + trace(String.format("Write output in [%s] file", outputFile)); + + var shutdownTimeoutSeconds = Integer.parseInt(args[1]); + trace(String.format("Automatically shutdown the app in %ss", shutdownTimeoutSeconds)); + + Runtime.getRuntime().addShutdownHook(new Thread() { + @Override + public void run() { + output(outputFile, "shutdown hook executed"); + } + }); + + var startTime = System.currentTimeMillis(); + var lock = new Object(); + do { + synchronized (lock) { + lock.wait(shutdownTimeoutSeconds * 1000); + } + } while ((System.currentTimeMillis() - startTime) < (shutdownTimeoutSeconds * 1000)); + + output(outputFile, "exit"); + } + + private static void output(Path outputFilePath, String msg) { + + trace(String.format("Writing [%s] into [%s]", msg, outputFilePath)); + + try { + Files.createDirectories(outputFilePath.getParent()); + Files.writeString(outputFilePath, msg, StandardOpenOption.APPEND, StandardOpenOption.CREATE); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + } + + private static void trace(String msg) { + Date time = new Date(System.currentTimeMillis()); + msg = String.format("UseShutdownHook [%s]: %s", SDF.format(time), msg); + System.out.println(msg); + try { + Files.write(traceFile, List.of(msg), StandardOpenOption.APPEND, StandardOpenOption.CREATE); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + } + + private static final SimpleDateFormat SDF = new SimpleDateFormat("HH:mm:ss.SSS"); + + private static final Path traceFile = Path.of(System.getProperty("jpackage.test.trace-file")); +} diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/clean_test_output.sh openjdk-25-25.0.2+10/test/jdk/tools/jpackage/clean_test_output.sh --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/clean_test_output.sh 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/clean_test_output.sh 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,87 @@ +#!/bin/bash + +# 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. + +# +# Filters output produced by running jpackage test(s). +# + +set -eu +set -o pipefail + + +sed_inplace_option=-i +sed_version_string=$(sed --version 2>&1 | head -1 || true) +if [ "${sed_version_string#sed (GNU sed)}" != "$sed_version_string" ]; then + # GNU sed, the default + : +elif [ "${sed_version_string#sed: illegal option}" != "$sed_version_string" ]; then + # Macos sed + sed_inplace_option="-i ''" +else + echo 'WARNING: Unknown sed variant, assume it is GNU compatible' +fi + + +filterFile () { + local expressions=( + # Strip leading log message timestamp `[19:33:44.713] ` + -e 's/^\[[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}\.[0-9]\{3\}\] //' + + # Strip log message timestamps `[19:33:44.713]` + -e 's/\[[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}\.[0-9]\{3\}\]//g' + + # Convert variable part of R/O directory path timestamp `#2025-07-24T16:38:13.3589878Z` + -e 's/#[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}\.[0-9]\{1,\}Z/#Z/' + + # Strip variable part of temporary directory name `jdk.jpackage5060841750457404688` + -e 's|\([\/]\)jdk\.jpackage[0-9]\{1,\}\b|\1jdk.jpackage|g' + + # Convert PID value `[PID: 131561]` + -e 's/\[PID: [0-9]\{1,\}\]/[PID: ]/' + + # Strip a warning message `Windows Defender may prevent jpackage from functioning` + -e '/Windows Defender may prevent jpackage from functioning/d' + + # Convert variable part of test output directory `out-6268` + -e 's|\bout-[0-9]\{1,\}\b|out-N|g' + + # Convert variable part of test summary `[ OK ] IconTest(AppImage, ResourceDirIcon, DefaultIcon).test; checks=39` + -e 's/^\(.*\bchecks=\)[0-9]\{1,\}\(\r\{0,1\}\)$/\1N\2/' + + # Convert variable part of ldd output `libdl.so.2 => /lib64/libdl.so.2 (0x00007fbf63c81000)` + -e 's/(0x[[:xdigit:]]\{1,\})$/(0xHEX)/' + + # Convert variable part of rpmbuild output `Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.CMO6a9` + -e 's|/rpm-tmp\...*$|/rpm-tmp.V|' + + # Convert variable part of stack trace entry `at jdk.jpackage.test.JPackageCommand.execute(JPackageCommand.java:863)` + -e 's/^\(.*\b\.java:\)[0-9]\{1,\}\()\r\{0,1\}\)$/\1N\2/' + ) + + sed $sed_inplace_option "$1" "${expressions[@]}" +} + + +for f in "$@"; do + filterFile "$f" +done diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AdditionalLauncher.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AdditionalLauncher.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AdditionalLauncher.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AdditionalLauncher.java 2025-12-18 08:04:02.000000000 +0000 @@ -22,39 +22,54 @@ */ package jdk.jpackage.test; -import static java.util.stream.Collectors.toMap; -import static jdk.jpackage.internal.util.function.ThrowingFunction.toFunction; +import static jdk.jpackage.internal.util.function.ThrowingSupplier.toSupplier; +import static jdk.jpackage.test.LauncherShortcut.LINUX_SHORTCUT; +import static jdk.jpackage.test.LauncherShortcut.WIN_DESKTOP_SHORTCUT; +import static jdk.jpackage.test.LauncherShortcut.WIN_START_MENU_SHORTCUT; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.Collection; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; +import java.util.Properties; +import java.util.Set; import java.util.function.BiConsumer; -import java.util.function.Supplier; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Stream; import jdk.jpackage.internal.util.function.ThrowingBiConsumer; +import jdk.jpackage.internal.util.function.ThrowingConsumer; +import jdk.jpackage.test.LauncherShortcut.StartupDirectory; +import jdk.jpackage.test.LauncherVerifier.Action; -public class AdditionalLauncher { +public final class AdditionalLauncher { public AdditionalLauncher(String name) { - this.name = name; - this.rawProperties = new ArrayList<>(); + this.name = Objects.requireNonNull(name); setPersistenceHandler(null); } - public final AdditionalLauncher setDefaultArguments(String... v) { + public AdditionalLauncher withVerifyActions(Action... actions) { + verifyActions.addAll(List.of(actions)); + return this; + } + + public AdditionalLauncher withoutVerifyActions(Action... actions) { + verifyActions.removeAll(List.of(actions)); + return this; + } + + public AdditionalLauncher setDefaultArguments(String... v) { defaultArguments = new ArrayList<>(List.of(v)); return this; } - public final AdditionalLauncher addDefaultArguments(String... v) { + public AdditionalLauncher addDefaultArguments(String... v) { if (defaultArguments == null) { return setDefaultArguments(v); } @@ -63,12 +78,12 @@ return this; } - public final AdditionalLauncher setJavaOptions(String... v) { + public AdditionalLauncher setJavaOptions(String... v) { javaOptions = new ArrayList<>(List.of(v)); return this; } - public final AdditionalLauncher addJavaOptions(String... v) { + public AdditionalLauncher addJavaOptions(String... v) { if (javaOptions == null) { return setJavaOptions(v); } @@ -77,51 +92,46 @@ return this; } - public final AdditionalLauncher setVerifyUninstalled(boolean value) { - verifyUninstalled = value; + public AdditionalLauncher setProperty(String name, Object value) { + rawProperties.put(Objects.requireNonNull(name), Objects.requireNonNull(value.toString())); return this; } - public final AdditionalLauncher setLauncherAsService() { - return addRawProperties(LAUNCHER_AS_SERVICE); - } - - public final AdditionalLauncher addRawProperties( - Map.Entry v) { - return addRawProperties(List.of(v)); - } - - public final AdditionalLauncher addRawProperties( - Map.Entry v, Map.Entry v2) { - return addRawProperties(List.of(v, v2)); - } - - public final AdditionalLauncher addRawProperties( - Collection> v) { - rawProperties.addAll(v); + public AdditionalLauncher setShortcuts(boolean menu, boolean desktop) { + if (TKit.isLinux()) { + setShortcut(LINUX_SHORTCUT, desktop); + } else if (TKit.isWindows()) { + setShortcut(WIN_DESKTOP_SHORTCUT, desktop); + setShortcut(WIN_START_MENU_SHORTCUT, menu); + } return this; } - public final String getRawPropertyValue( - String key, Supplier getDefault) { - return rawProperties.stream() - .filter(item -> item.getKey().equals(key)) - .map(e -> e.getValue()).findAny().orElseGet(getDefault); + public AdditionalLauncher setShortcut(LauncherShortcut shortcut, StartupDirectory value) { + if (value != null) { + setProperty(shortcut.propertyName(), value.asStringValue()); + } else { + setProperty(shortcut.propertyName(), false); + } + return this; } - private String getDesciption(JPackageCommand cmd) { - return getRawPropertyValue("description", () -> cmd.getArgumentValue( - "--description", unused -> cmd.name())); + public AdditionalLauncher setShortcut(LauncherShortcut shortcut, boolean value) { + if (value) { + setShortcut(shortcut, StartupDirectory.DEFAULT); + } else { + setShortcut(shortcut, null); + } + return this; } - public final AdditionalLauncher setShortcuts(boolean menu, boolean shortcut) { - withMenuShortcut = menu; - withShortcut = shortcut; + public AdditionalLauncher removeShortcut(LauncherShortcut shortcut) { + rawProperties.remove(shortcut.propertyName()); return this; } - public final AdditionalLauncher setIcon(Path iconPath) { - if (iconPath == NO_ICON) { + public AdditionalLauncher setIcon(Path iconPath) { + if (iconPath.equals(NO_ICON)) { throw new IllegalArgumentException(); } @@ -129,13 +139,13 @@ return this; } - public final AdditionalLauncher setNoIcon() { + public AdditionalLauncher setNoIcon() { icon = NO_ICON; return this; } - public final AdditionalLauncher setPersistenceHandler( - ThrowingBiConsumer>> handler) { + public AdditionalLauncher setPersistenceHandler( + ThrowingBiConsumer>> handler) { if (handler != null) { createFileHandler = ThrowingBiConsumer.toBiConsumer(handler); } else { @@ -144,21 +154,31 @@ return this; } - public final void applyTo(JPackageCommand cmd) { + public void applyTo(JPackageCommand cmd) { cmd.addPrerequisiteAction(this::initialize); - cmd.addVerifyAction(this::verify); + cmd.addVerifyAction(createVerifierAsConsumer()); } - public final void applyTo(PackageTest test) { + public void applyTo(PackageTest test) { test.addInitializer(this::initialize); - test.addInstallVerifier(this::verify); - if (verifyUninstalled) { - test.addUninstallVerifier(this::verifyUninstalled); - } + test.addInstallVerifier(createVerifierAsConsumer()); } public final void verifyRemovedInUpgrade(PackageTest test) { - test.addInstallVerifier(this::verifyUninstalled); + test.addInstallVerifier(cmd -> { + createVerifier().verify(cmd, LauncherVerifier.Action.VERIFY_UNINSTALLED); + }); + } + + private LauncherVerifier createVerifier() { + return new LauncherVerifier(name, Optional.ofNullable(javaOptions), + Optional.ofNullable(defaultArguments), Optional.ofNullable(icon), rawProperties); + } + + private ThrowingConsumer createVerifierAsConsumer() { + return cmd -> { + createVerifier().verify(cmd, verifyActions.stream().sorted(Comparator.comparing(Action::ordinal)).toArray(Action[]::new)); + }; } static void forEachAdditionalLauncher(JPackageCommand cmd, @@ -179,11 +199,12 @@ PropertyFile shell[] = new PropertyFile[1]; forEachAdditionalLauncher(cmd, (name, propertiesFilePath) -> { if (name.equals(launcherName)) { - shell[0] = toFunction(PropertyFile::new).apply( - propertiesFilePath); + shell[0] = toSupplier(() -> { + return new PropertyFile(propertiesFilePath); + }).get(); } }); - return Optional.of(shell[0]).get(); + return Objects.requireNonNull(shell[0]); } private void initialize(JPackageCommand cmd) throws IOException { @@ -191,259 +212,63 @@ cmd.addArguments("--add-launcher", String.format("%s=%s", name, propsFile)); - List> properties = new ArrayList<>(); + Map properties = new HashMap<>(); if (defaultArguments != null) { - properties.add(Map.entry("arguments", - JPackageCommand.escapeAndJoin(defaultArguments))); + properties.put("arguments", JPackageCommand.escapeAndJoin(defaultArguments)); } if (javaOptions != null) { - properties.add(Map.entry("java-options", - JPackageCommand.escapeAndJoin(javaOptions))); + properties.put("java-options", JPackageCommand.escapeAndJoin(javaOptions)); } if (icon != null) { final String iconPath; - if (icon == NO_ICON) { + if (icon.equals(NO_ICON)) { iconPath = ""; } else { iconPath = icon.toAbsolutePath().toString().replace('\\', '/'); } - properties.add(Map.entry("icon", iconPath)); - } - - if (withShortcut != null) { - if (TKit.isLinux()) { - properties.add(Map.entry("linux-shortcut", withShortcut.toString())); - } else if (TKit.isWindows()) { - properties.add(Map.entry("win-shortcut", withShortcut.toString())); - } - } - - if (TKit.isWindows() && withMenuShortcut != null) { - properties.add(Map.entry("win-menu", withMenuShortcut.toString())); + properties.put("icon", iconPath); } - properties.addAll(rawProperties); + properties.putAll(rawProperties); - createFileHandler.accept(propsFile, properties); - } - - private static Path iconInResourceDir(JPackageCommand cmd, - String launcherName) { - Path resourceDir = cmd.getArgumentValue("--resource-dir", () -> null, - Path::of); - if (resourceDir != null) { - Path icon = resourceDir.resolve( - Optional.ofNullable(launcherName).orElseGet(() -> cmd.name()) - + TKit.ICON_SUFFIX); - if (Files.exists(icon)) { - return icon; - } - } - return null; - } - - private void verifyIcon(JPackageCommand cmd) throws IOException { - var verifier = new LauncherIconVerifier().setLauncherName(name); - - if (TKit.isOSX()) { - // On Mac should be no icon files for additional launchers. - verifier.applyTo(cmd); - return; - } - - boolean withLinuxDesktopFile = false; - - final Path effectiveIcon = Optional.ofNullable(icon).orElseGet( - () -> iconInResourceDir(cmd, name)); - while (effectiveIcon != NO_ICON) { - if (effectiveIcon != null) { - withLinuxDesktopFile = Boolean.FALSE != withShortcut; - verifier.setExpectedIcon(effectiveIcon); - break; - } - - Path customMainLauncherIcon = cmd.getArgumentValue("--icon", - () -> iconInResourceDir(cmd, null), Path::of); - if (customMainLauncherIcon != null) { - withLinuxDesktopFile = Boolean.FALSE != withShortcut; - verifier.setExpectedIcon(customMainLauncherIcon); - break; - } - - verifier.setExpectedDefaultIcon(); - break; - } - - if (TKit.isLinux() && !cmd.isImagePackageType()) { - if (effectiveIcon != NO_ICON && !withLinuxDesktopFile) { - withLinuxDesktopFile = (Boolean.FALSE != withShortcut) && - Stream.of("--linux-shortcut").anyMatch(cmd::hasArgument); - verifier.setExpectedDefaultIcon(); - } - Path desktopFile = LinuxHelper.getDesktopFile(cmd, name); - if (withLinuxDesktopFile) { - TKit.assertFileExists(desktopFile); - } else { - TKit.assertPathExists(desktopFile, false); - } - } - - verifier.applyTo(cmd); - } - - private void verifyShortcuts(JPackageCommand cmd) throws IOException { - if (TKit.isLinux() && !cmd.isImagePackageType() - && withShortcut != null) { - Path desktopFile = LinuxHelper.getDesktopFile(cmd, name); - if (withShortcut) { - TKit.assertFileExists(desktopFile); - } else { - TKit.assertPathExists(desktopFile, false); - } - } - } - - private void verifyDescription(JPackageCommand cmd) throws IOException { - if (TKit.isWindows()) { - String expectedDescription = getDesciption(cmd); - Path launcherPath = cmd.appLauncherPath(name); - String actualDescription = - WindowsHelper.getExecutableDesciption(launcherPath); - TKit.assertEquals(expectedDescription, actualDescription, - String.format("Check file description of [%s]", launcherPath)); - } else if (TKit.isLinux() && !cmd.isImagePackageType()) { - String expectedDescription = getDesciption(cmd); - Path desktopFile = LinuxHelper.getDesktopFile(cmd, name); - if (Files.exists(desktopFile)) { - TKit.assertTextStream("Comment=" + expectedDescription) - .label(String.format("[%s] file", desktopFile)) - .predicate(String::equals) - .apply(Files.readAllLines(desktopFile)); - } - } - } - - private void verifyInstalled(JPackageCommand cmd, boolean installed) throws IOException { - if (TKit.isLinux() && !cmd.isImagePackageType() && !cmd. - isPackageUnpacked(String.format( - "Not verifying package and system .desktop files for [%s] launcher", - cmd.appLauncherPath(name)))) { - Path packageDesktopFile = LinuxHelper.getDesktopFile(cmd, name); - Path systemDesktopFile = LinuxHelper.getSystemDesktopFilesFolder(). - resolve(packageDesktopFile.getFileName()); - if (Files.exists(packageDesktopFile) && installed) { - TKit.assertFileExists(systemDesktopFile); - TKit.assertStringListEquals(Files.readAllLines( - packageDesktopFile), - Files.readAllLines(systemDesktopFile), String.format( - "Check [%s] and [%s] files are equal", - packageDesktopFile, - systemDesktopFile)); - } else { - TKit.assertPathExists(packageDesktopFile, false); - TKit.assertPathExists(systemDesktopFile, false); - } - } - } - - protected void verifyUninstalled(JPackageCommand cmd) throws IOException { - verifyInstalled(cmd, false); - Path launcherPath = cmd.appLauncherPath(name); - TKit.assertPathExists(launcherPath, false); - } - - protected void verify(JPackageCommand cmd) throws IOException { - verifyIcon(cmd); - verifyShortcuts(cmd); - verifyDescription(cmd); - verifyInstalled(cmd, true); - - Path launcherPath = cmd.appLauncherPath(name); - - TKit.assertExecutableFileExists(launcherPath); - - if (!cmd.canRunLauncher(String.format( - "Not running %s launcher", launcherPath))) { - return; - } - - var appVerifier = HelloApp.assertApp(launcherPath) - .addDefaultArguments(Optional - .ofNullable(defaultArguments) - .orElseGet(() -> List.of(cmd.getAllArgumentValues("--arguments")))) - .addJavaOptions(Optional - .ofNullable(javaOptions) - .orElseGet(() -> List.of(cmd.getAllArgumentValues( - "--java-options"))).stream().map( - str -> resolveVariables(cmd, str)).toList()); - - if (!rawProperties.contains(LAUNCHER_AS_SERVICE)) { - appVerifier.executeAndVerifyOutput(); - } else if (!cmd.isPackageUnpacked(String.format( - "Not verifying contents of test output file for [%s] launcher", - launcherPath))) { - appVerifier.verifyOutput(); - } + createFileHandler.accept(propsFile, properties.entrySet()); } public static final class PropertyFile { - PropertyFile(Path path) throws IOException { - data = Files.readAllLines(path).stream().map(str -> { - return str.split("=", 2); - }).collect(toMap(tokens -> tokens[0], tokens -> { - if (tokens.length == 1) { - return ""; - } else { - return tokens[1]; - } - }, (oldValue, newValue) -> { - return newValue; - })); + PropertyFile(Map data) { + this.data = new Properties(); + this.data.putAll(data); } - public boolean isPropertySet(String name) { - Objects.requireNonNull(name); - return data.containsKey(name); + PropertyFile(Path path) throws IOException { + data = new Properties(); + try (var reader = Files.newBufferedReader(path)) { + data.load(reader); + } } - public Optional getPropertyValue(String name) { + public Optional findProperty(String name) { Objects.requireNonNull(name); - return Optional.of(data.get(name)); + return Optional.ofNullable(data.getProperty(name)); } - public Optional getPropertyBooleanValue(String name) { - Objects.requireNonNull(name); - return Optional.ofNullable(data.get(name)).map(Boolean::parseBoolean); + public Optional findBooleanProperty(String name) { + return findProperty(name).map(Boolean::parseBoolean); } - private final Map data; + private final Properties data; } - private static String resolveVariables(JPackageCommand cmd, String str) { - var map = Stream.of(JPackageCommand.Macro.values()).collect(toMap(x -> { - return String.format("$%s", x.name()); - }, cmd::macroValue)); - for (var e : map.entrySet()) { - str = str.replaceAll(Pattern.quote(e.getKey()), - Matcher.quoteReplacement(e.getValue().toString())); - } - return str; - } - - private boolean verifyUninstalled; private List javaOptions; private List defaultArguments; private Path icon; private final String name; - private final List> rawProperties; - private BiConsumer>> createFileHandler; - private Boolean withMenuShortcut; - private Boolean withShortcut; - - private static final Path NO_ICON = Path.of(""); - private static final Map.Entry LAUNCHER_AS_SERVICE = Map.entry( - "launcher-as-service", "true"); + private final Map rawProperties = new HashMap<>(); + private BiConsumer>> createFileHandler; + private final Set verifyActions = new HashSet<>(Action.VERIFY_DEFAULTS); + + static final Path NO_ICON = Path.of(""); } diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AppImageFile.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AppImageFile.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AppImageFile.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/AppImageFile.java 2025-12-18 08:04:02.000000000 +0000 @@ -22,20 +22,28 @@ */ package jdk.jpackage.test; +import static java.util.stream.Collectors.toMap; +import static jdk.jpackage.internal.util.function.ThrowingFunction.toFunction; +import static jdk.jpackage.internal.util.function.ThrowingSupplier.toSupplier; + import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.util.HashMap; import java.util.Map; +import java.util.Objects; import java.util.Optional; +import java.util.stream.Stream; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathFactory; import jdk.internal.util.OperatingSystem; import jdk.jpackage.internal.util.XmlUtils; -import static jdk.jpackage.internal.util.function.ThrowingSupplier.toSupplier; import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; public record AppImageFile(String mainLauncherName, String mainLauncherClassName, - String version, boolean macSigned, boolean macAppStore) { + String version, boolean macSigned, boolean macAppStore, Map> launchers) { public static Path getPathInAppImage(Path appImageDir) { return ApplicationLayout.platformAppImage() @@ -44,8 +52,23 @@ .resolve(FILENAME); } + public AppImageFile { + Objects.requireNonNull(mainLauncherName); + Objects.requireNonNull(mainLauncherClassName); + Objects.requireNonNull(version); + if (!launchers.containsKey(mainLauncherName)) { + throw new IllegalArgumentException(); + } + } + public AppImageFile(String mainLauncherName, String mainLauncherClassName) { - this(mainLauncherName, mainLauncherClassName, "1.0", false, false); + this(mainLauncherName, mainLauncherClassName, "1.0", false, false, Map.of(mainLauncherName, Map.of())); + } + + public Map> addLaunchers() { + return launchers.entrySet().stream().filter(e -> { + return !e.getKey().equals(mainLauncherName); + }).collect(toMap(Map.Entry::getKey, Map.Entry::getValue)); } public void save(Path appImageDir) throws IOException { @@ -73,6 +96,18 @@ xml.writeStartElement("app-store"); xml.writeCharacters(Boolean.toString(macAppStore)); xml.writeEndElement(); + + for (var al : addLaunchers().keySet().stream().sorted().toList()) { + xml.writeStartElement("add-launcher"); + xml.writeAttribute("name", al); + var props = launchers.get(al); + for (var prop : props.keySet().stream().sorted().toList()) { + xml.writeStartElement(prop); + xml.writeCharacters(props.get(prop)); + xml.writeEndElement(); + } + xml.writeEndElement(); + } }); } @@ -99,8 +134,34 @@ "/jpackage-state/app-store/text()", doc)).map( Boolean::parseBoolean).orElse(false); + var addLaunchers = XmlUtils.queryNodes(doc, xPath, "/jpackage-state/add-launcher").map(Element.class::cast).map(toFunction(addLauncher -> { + Map launcherProps = new HashMap<>(); + + // @name and @service attributes. + XmlUtils.toStream(addLauncher.getAttributes()).forEach(attr -> { + launcherProps.put(attr.getNodeName(), attr.getNodeValue()); + }); + + // Extra properties. + XmlUtils.queryNodes(addLauncher, xPath, "*[count(*) = 0]").map(Element.class::cast).forEach(e -> { + launcherProps.put(e.getNodeName(), e.getTextContent()); + }); + + return launcherProps; + })); + + var mainLauncherProperties = Map.of("name", mainLauncherName); + + var launchers = Stream.concat(Stream.of(mainLauncherProperties), addLaunchers).collect(toMap(attrs -> { + return Objects.requireNonNull(attrs.get("name")); + }, attrs -> { + Map copy = new HashMap<>(attrs); + copy.remove("name"); + return Map.copyOf(copy); + })); + return new AppImageFile(mainLauncherName, mainLauncherClassName, - version, macSigned, macAppStore); + version, macSigned, macAppStore, launchers); }).get(); } diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/CfgFile.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/CfgFile.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/CfgFile.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/CfgFile.java 2025-12-18 08:04:02.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 @@ -59,13 +59,18 @@ } } - public void addValue(String sectionName, String key, String value) { + public CfgFile addValue(String sectionName, String key, String value) { var section = getSection(sectionName); if (section == null) { section = new Section(sectionName, new ArrayList<>()); data.add(section); } section.data.add(Map.entry(key, value)); + return this; + } + + public CfgFile add(CfgFile other) { + return combine(this, other); } public CfgFile() { @@ -89,7 +94,7 @@ this.id = id; } - public void save(Path path) { + public CfgFile save(Path path) { var lines = data.stream().flatMap(section -> { return Stream.concat( Stream.of(String.format("[%s]", section.name)), @@ -98,6 +103,7 @@ })); }); TKit.createTextFile(path, lines); + return this; } private Section getSection(String name) { diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/CommandArguments.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/CommandArguments.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/CommandArguments.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/CommandArguments.java 2025-12-18 08:04:02.000000000 +0000 @@ -35,16 +35,17 @@ } public final T clearArguments() { + verifyMutable(); args.clear(); return thiz(); } public final T addArgument(String v) { - args.add(v); - return thiz(); + return addArguments(v); } public final T addArguments(List v) { + verifyMutable(); args.addAll(v); return thiz(); } diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/ConfigFilesStasher.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/ConfigFilesStasher.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/ConfigFilesStasher.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/ConfigFilesStasher.java 2025-12-18 08:04:02.000000000 +0000 @@ -220,7 +220,7 @@ AdditionalLauncher.forEachAdditionalLauncher(cmd, (launcherName, propertyFilePath) -> { try { final var launcherAsService = new AdditionalLauncher.PropertyFile(propertyFilePath) - .getPropertyBooleanValue("launcher-as-service").orElse(false); + .findBooleanProperty("launcher-as-service").orElse(false); if (launcherAsService) { withServices[0] = true; } diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java 2025-12-18 08:04:02.000000000 +0000 @@ -72,7 +72,7 @@ verifyActions = new Actions(); } - public JPackageCommand(JPackageCommand cmd) { + private JPackageCommand(JPackageCommand cmd, boolean immutable) { args.addAll(cmd.args); withToolProvider = cmd.withToolProvider; saveConsoleOutput = cmd.saveConsoleOutput; @@ -81,7 +81,7 @@ suppressOutput = cmd.suppressOutput; ignoreDefaultRuntime = cmd.ignoreDefaultRuntime; ignoreDefaultVerbose = cmd.ignoreDefaultVerbose; - immutable = cmd.immutable; + this.immutable = immutable; dmgInstallDir = cmd.dmgInstallDir; prerequisiteActions = new Actions(cmd.prerequisiteActions); verifyActions = new Actions(cmd.verifyActions); @@ -90,12 +90,15 @@ outputValidators = cmd.outputValidators; executeInDirectory = cmd.executeInDirectory; winMsiLogFile = cmd.winMsiLogFile; + unpackedPackageDirectory = cmd.unpackedPackageDirectory; } JPackageCommand createImmutableCopy() { - JPackageCommand reply = new JPackageCommand(this); - reply.immutable = true; - return reply; + return new JPackageCommand(this, true); + } + + JPackageCommand createMutableCopy() { + return new JPackageCommand(this, false); } public JPackageCommand setArgumentValue(String argName, String newValue) { @@ -316,13 +319,11 @@ } JPackageCommand addPrerequisiteAction(ThrowingConsumer action) { - verifyMutable(); prerequisiteActions.add(action); return this; } JPackageCommand addVerifyAction(ThrowingConsumer action) { - verifyMutable(); verifyActions.add(action); return this; } @@ -484,7 +485,7 @@ Path unpackedPackageDirectory() { verifyIsOfType(PackageType.NATIVE); - return getArgumentValue(UNPACKED_PATH_ARGNAME, () -> null, Path::of); + return unpackedPackageDirectory; } /** @@ -662,7 +663,7 @@ } public boolean isPackageUnpacked() { - return hasArgument(UNPACKED_PATH_ARGNAME); + return unpackedPackageDirectory != null; } public static void useToolProviderByDefault(ToolProvider jpackageToolProvider) { @@ -791,11 +792,6 @@ return this; } - public JPackageCommand executeVerifyActions() { - verifyActions.run(); - return this; - } - private Executor createExecutor() { Executor exec = new Executor() .saveOutput(saveConsoleOutput).dumpOutput(!suppressOutput) @@ -820,6 +816,7 @@ } public Executor.Result execute(int expectedExitCode) { + verifyMutable(); executePrerequisiteActions(); if (hasArgument("--dest")) { @@ -859,7 +856,7 @@ ConfigFilesStasher.INSTANCE.accept(this); } - final var copy = new JPackageCommand(this).adjustArgumentsBeforeExecution(); + final var copy = createMutableCopy().adjustArgumentsBeforeExecution(); final var directoriesAssert = new ReadOnlyPathsAssert(copy); @@ -876,7 +873,7 @@ } if (result.exitCode() == 0) { - executeVerifyActions(); + verifyActions.run(); } return result; @@ -884,7 +881,7 @@ public Executor.Result executeAndAssertHelloAppImageCreated() { Executor.Result result = executeAndAssertImageCreated(); - HelloApp.executeLauncherAndVerifyOutput(this); + LauncherVerifier.executeMainLauncherAndVerifyOutput(this); return result; } @@ -1046,6 +1043,7 @@ } public JPackageCommand setReadOnlyPathAsserts(ReadOnlyPathAssert... asserts) { + verifyMutable(); readOnlyPathAsserts = Set.of(asserts); return this; } @@ -1059,18 +1057,21 @@ public static enum AppLayoutAssert { APP_IMAGE_FILE(JPackageCommand::assertAppImageFile), PACKAGE_FILE(JPackageCommand::assertPackageFile), - MAIN_LAUNCHER(cmd -> { + NO_MAIN_LAUNCHER_IN_RUNTIME(cmd -> { if (cmd.isRuntime()) { TKit.assertPathExists(convertFromRuntime(cmd).appLauncherPath(), false); - } else { - TKit.assertExecutableFileExists(cmd.appLauncherPath()); } }), - MAIN_LAUNCHER_CFG_FILE(cmd -> { + NO_MAIN_LAUNCHER_CFG_FILE_IN_RUNTIME(cmd -> { if (cmd.isRuntime()) { TKit.assertPathExists(convertFromRuntime(cmd).appLauncherCfgPath(null), false); - } else { - TKit.assertFileExists(cmd.appLauncherCfgPath(null)); + } + }), + MAIN_LAUNCHER_FILES(cmd -> { + if (!cmd.isRuntime()) { + new LauncherVerifier(cmd).verify(cmd, + LauncherVerifier.Action.VERIFY_INSTALLED, + LauncherVerifier.Action.VERIFY_MAC_ENTITLEMENTS); } }), MAIN_JAR_FILE(cmd -> { @@ -1101,7 +1102,7 @@ } private static JPackageCommand convertFromRuntime(JPackageCommand cmd) { - var copy = new JPackageCommand(cmd); + var copy = cmd.createMutableCopy(); copy.immutable = false; copy.removeArgumentWithValue("--runtime-image"); copy.dmgInstallDir = cmd.appInstallationDirectory(); @@ -1115,6 +1116,7 @@ } public JPackageCommand setAppLayoutAsserts(AppLayoutAssert ... asserts) { + verifyMutable(); appLayoutAsserts = Set.of(asserts); return this; } @@ -1161,12 +1163,12 @@ } else { assertFileInAppImage(lookupPath); - if (TKit.isOSX()) { - final Path rootDir = isImagePackageType() ? outputBundle() : - pathToUnpackedPackageFile(appInstallationDirectory()); + final Path rootDir = isImagePackageType() ? outputBundle() : + pathToUnpackedPackageFile(appInstallationDirectory()); - AppImageFile aif = AppImageFile.load(rootDir); + final AppImageFile aif = AppImageFile.load(rootDir); + if (TKit.isOSX()) { boolean expectedValue = MacHelper.appImageSigned(this); boolean actualValue = aif.macSigned(); TKit.assertEquals(expectedValue, actualValue, @@ -1177,6 +1179,11 @@ TKit.assertEquals(expectedValue, actualValue, "Check for unexpected value of property in app image file"); } + + TKit.assertStringListEquals( + addLauncherNames().stream().sorted().toList(), + aif.addLaunchers().keySet().stream().sorted().toList(), + "Check additional launcher names"); } } @@ -1258,16 +1265,14 @@ } JPackageCommand setUnpackedPackageLocation(Path path) { + verifyMutable(); verifyIsOfType(PackageType.NATIVE); - if (path != null) { - setArgumentValue(UNPACKED_PATH_ARGNAME, path); - } else { - removeArgumentWithValue(UNPACKED_PATH_ARGNAME); - } + unpackedPackageDirectory = path; return this; } JPackageCommand winMsiLogFile(Path v) { + verifyMutable(); if (!TKit.isWindows()) { throw new UnsupportedOperationException(); } @@ -1290,6 +1295,7 @@ } private JPackageCommand adjustArgumentsBeforeExecution() { + verifyMutable(); if (!isWithToolProvider()) { // if jpackage is launched as a process then set the jlink.debug system property // to allow the jlink process to print exception stacktraces on any failure @@ -1473,6 +1479,7 @@ private final Actions verifyActions; private Path executeInDirectory; private Path winMsiLogFile; + private Path unpackedPackageDirectory; private Set readOnlyPathAsserts = Set.of(ReadOnlyPathAssert.values()); private Set appLayoutAsserts = Set.of(AppLayoutAssert.values()); private List>> outputValidators = new ArrayList<>(); @@ -1500,8 +1507,6 @@ return null; }).get(); - private static final String UNPACKED_PATH_ARGNAME = "jpt-unpacked-folder"; - // [HH:mm:ss.SSS] private static final Pattern TIMESTAMP_REGEXP = Pattern.compile( "^\\[\\d\\d:\\d\\d:\\d\\d.\\d\\d\\d\\] "); diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherAsServiceVerifier.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherAsServiceVerifier.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherAsServiceVerifier.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherAsServiceVerifier.java 2025-12-18 08:04:02.000000000 +0000 @@ -22,11 +22,19 @@ */ package jdk.jpackage.test; +import static jdk.jpackage.internal.util.function.ThrowingBiConsumer.toBiConsumer; +import static jdk.jpackage.internal.util.function.ThrowingConsumer.toConsumer; +import static jdk.jpackage.test.AdditionalLauncher.forEachAdditionalLauncher; +import static jdk.jpackage.test.PackageType.LINUX; +import static jdk.jpackage.test.PackageType.MAC_PKG; +import static jdk.jpackage.test.PackageType.WINDOWS; + import java.io.IOException; import java.nio.file.FileSystemException; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import java.util.Objects; import java.util.Optional; @@ -36,12 +44,9 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import jdk.jpackage.internal.util.PathUtils; -import jdk.jpackage.internal.util.function.ThrowingBiConsumer; -import static jdk.jpackage.internal.util.function.ThrowingConsumer.toConsumer; import jdk.jpackage.internal.util.function.ThrowingRunnable; -import static jdk.jpackage.test.PackageType.LINUX; -import static jdk.jpackage.test.PackageType.MAC_PKG; -import static jdk.jpackage.test.PackageType.WINDOWS; +import jdk.jpackage.test.AdditionalLauncher.PropertyFile; +import jdk.jpackage.test.LauncherVerifier.Action; public final class LauncherAsServiceVerifier { @@ -111,6 +116,7 @@ } else { applyToAdditionalLauncher(pkg); } + pkg.addInstallVerifier(this::verifyLauncherExecuted); } static void verify(JPackageCommand cmd) { @@ -127,7 +133,6 @@ "service-installer.exe"); if (launcherNames.isEmpty()) { TKit.assertPathExists(serviceInstallerPath, false); - } else { TKit.assertFileExists(serviceInstallerPath); } @@ -188,23 +193,11 @@ launcherNames.add(null); } - AdditionalLauncher.forEachAdditionalLauncher(cmd, - ThrowingBiConsumer.toBiConsumer( - (launcherName, propFilePath) -> { - if (Files.readAllLines(propFilePath).stream().anyMatch( - line -> { - if (line.startsWith( - "launcher-as-service=")) { - return Boolean.parseBoolean( - line.substring( - "launcher-as-service=".length())); - } else { - return false; - } - })) { - launcherNames.add(launcherName); - } - })); + forEachAdditionalLauncher(cmd, toBiConsumer((launcherName, propFilePath) -> { + if (new PropertyFile(propFilePath).findBooleanProperty("launcher-as-service").orElse(false)) { + launcherNames.add(launcherName); + } + })); return launcherNames; } @@ -237,45 +230,33 @@ + appOutputFilePathInitialize().toString()); cmd.addArguments("--java-options", "-Djpackage.test.noexit=true"); }); - pkg.addInstallVerifier(cmd -> { - if (canVerifyInstall(cmd)) { - delayInstallVerify(); - Path outputFilePath = appOutputFilePathVerify(cmd); - HelloApp.assertApp(cmd.appLauncherPath()) - .addParam("jpackage.test.appOutput", - outputFilePath.toString()) - .addDefaultArguments(expectedValue) - .verifyOutput(); - deleteOutputFile(outputFilePath); - } - }); - pkg.addInstallVerifier(cmd -> { - verify(cmd, launcherName); - }); } private void applyToAdditionalLauncher(PackageTest pkg) { - AdditionalLauncher al = new AdditionalLauncher(launcherName) { - @Override - protected void verify(JPackageCommand cmd) throws IOException { - if (canVerifyInstall(cmd)) { - delayInstallVerify(); - super.verify(cmd); - deleteOutputFile(appOutputFilePathVerify(cmd)); - } - LauncherAsServiceVerifier.verify(cmd, launcherName); - } - }.setLauncherAsService() - .addJavaOptions("-Djpackage.test.appOutput=" - + appOutputFilePathInitialize().toString()) + var al = new AdditionalLauncher(launcherName) + .setProperty("launcher-as-service", true) + .addJavaOptions("-Djpackage.test.appOutput=" + appOutputFilePathInitialize().toString()) .addJavaOptions("-Djpackage.test.noexit=true") - .addDefaultArguments(expectedValue); + .addDefaultArguments(expectedValue) + .withoutVerifyActions(Action.EXECUTE_LAUNCHER); Optional.ofNullable(additionalLauncherCallback).ifPresent(v -> v.accept(al)); al.applyTo(pkg); } + private void verifyLauncherExecuted(JPackageCommand cmd) throws IOException { + if (canVerifyInstall(cmd)) { + delayInstallVerify(); + Path outputFilePath = appOutputFilePathVerify(cmd); + HelloApp.assertApp(cmd.appLauncherPath()) + .addParam("jpackage.test.appOutput", outputFilePath.toString()) + .addDefaultArguments(expectedValue) + .verifyOutput(); + deleteOutputFile(outputFilePath); + } + } + private static void deleteOutputFile(Path file) throws IOException { try { TKit.deleteIfExists(file); @@ -291,8 +272,7 @@ } } - private static void verify(JPackageCommand cmd, String launcherName) throws - IOException { + private static void verify(JPackageCommand cmd, String launcherName) throws IOException { if (LINUX.contains(cmd.packageType())) { verifyLinuxUnitFile(cmd, launcherName); } else if (MAC_PKG.equals(cmd.packageType())) { @@ -331,7 +311,7 @@ var servicePlist = MacHelper.readPList(servicePlistFile); - var args = servicePlist.queryArrayValue("ProgramArguments"); + var args = servicePlist.queryStringArrayValue("ProgramArguments"); TKit.assertEquals(1, args.size(), "Check number of array elements in 'ProgramArguments' property in the property file"); TKit.assertEquals(installedLauncherPath.toString(), args.get(0), @@ -370,6 +350,9 @@ private final Path appOutputFileName; private final Consumer additionalLauncherCallback; - static final Set SUPPORTED_PACKAGES = Stream.of(LINUX, WINDOWS, - Set.of(MAC_PKG)).flatMap(x -> x.stream()).collect(Collectors.toSet()); + static final Set SUPPORTED_PACKAGES = Stream.of( + LINUX, + WINDOWS, + Set.of(MAC_PKG) + ).flatMap(Collection::stream).collect(Collectors.toSet()); } diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherIconVerifier.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherIconVerifier.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherIconVerifier.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherIconVerifier.java 2025-12-18 08:04:02.000000000 +0000 @@ -46,6 +46,11 @@ return this; } + public LauncherIconVerifier verifyFileInAppImageOnly(boolean v) { + verifyFileInAppImageOnly = true; + return this; + } + public void applyTo(JPackageCommand cmd) throws IOException { final String curLauncherName; final String label; @@ -62,22 +67,26 @@ if (TKit.isWindows()) { TKit.assertPathExists(iconPath, false); - WinExecutableIconVerifier.verifyLauncherIcon(cmd, launcherName, - expectedIcon, expectedDefault); + if (!verifyFileInAppImageOnly) { + WinExecutableIconVerifier.verifyLauncherIcon(cmd, launcherName, expectedIcon, expectedDefault); + } } else if (expectedDefault) { TKit.assertPathExists(iconPath, true); } else if (expectedIcon == null) { TKit.assertPathExists(iconPath, false); } else { TKit.assertFileExists(iconPath); - TKit.assertTrue(-1 == Files.mismatch(expectedIcon, iconPath), - String.format( - "Check icon file [%s] of %s launcher is a copy of source icon file [%s]", - iconPath, label, expectedIcon)); + if (!verifyFileInAppImageOnly) { + TKit.assertTrue(-1 == Files.mismatch(expectedIcon, iconPath), + String.format( + "Check icon file [%s] of %s launcher is a copy of source icon file [%s]", + iconPath, label, expectedIcon)); + } } } private String launcherName; private Path expectedIcon; private boolean expectedDefault; + private boolean verifyFileInAppImageOnly; } diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherShortcut.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherShortcut.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherShortcut.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherShortcut.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,167 @@ +/* + * 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.jpackage.test; + +import static java.util.stream.Collectors.toMap; +import static jdk.jpackage.test.AdditionalLauncher.getAdditionalLauncherProperties; + +import java.nio.file.Path; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.function.Function; +import java.util.stream.Stream; +import jdk.jpackage.test.AdditionalLauncher.PropertyFile; + +public enum LauncherShortcut { + + LINUX_SHORTCUT("linux-shortcut"), + + WIN_DESKTOP_SHORTCUT("win-shortcut"), + + WIN_START_MENU_SHORTCUT("win-menu"); + + public enum StartupDirectory { + DEFAULT("true"), + ; + + StartupDirectory(String stringValue) { + this.stringValue = Objects.requireNonNull(stringValue); + } + + public String asStringValue() { + return stringValue; + } + + /** + * Returns shortcut startup directory or an empty {@link Optional} instance if + * the value of the {@code str} parameter evaluates to {@code false}. + * + * @param str the value of a shortcut startup directory + * @return shortcut startup directory or an empty {@link Optional} instance + * @throws IllegalArgumentException if the value of the {@code str} parameter is + * unrecognized + */ + static Optional parse(String str) { + Objects.requireNonNull(str); + return Optional.ofNullable(VALUE_MAP.get(str)).or(() -> { + if (Boolean.TRUE.toString().equals(str)) { + return Optional.of(StartupDirectory.DEFAULT); + } else if (Boolean.FALSE.toString().equals(str)) { + return Optional.empty(); + } else { + throw new IllegalArgumentException(String.format( + "Unrecognized launcher shortcut startup directory: [%s]", str)); + } + }); + } + + private final String stringValue; + + private final static Map VALUE_MAP = + Stream.of(values()).collect(toMap(StartupDirectory::asStringValue, x -> x)); + } + + LauncherShortcut(String propertyName) { + this.propertyName = Objects.requireNonNull(propertyName); + } + + public String propertyName() { + return propertyName; + } + + public String appImageFilePropertyName() { + return propertyName.substring(propertyName.indexOf('-') + 1); + } + + public String optionName() { + return "--" + propertyName; + } + + Optional expectShortcut(JPackageCommand cmd, Optional predefinedAppImage, String launcherName) { + Objects.requireNonNull(predefinedAppImage); + + final var name = Optional.ofNullable(launcherName).orElseGet(cmd::name); + + if (name.equals(cmd.name())) { + return findMainLauncherShortcut(cmd); + } else { + String[] propertyName = new String[1]; + return findAddLauncherShortcut(cmd, predefinedAppImage.map(appImage -> { + propertyName[0] = appImageFilePropertyName(); + return new PropertyFile(appImage.addLaunchers().get(launcherName)); + }).orElseGet(() -> { + propertyName[0] = this.propertyName; + return getAdditionalLauncherProperties(cmd, launcherName); + })::findProperty, propertyName[0]); + } + } + + + public interface InvokeShortcutSpec { + String launcherName(); + LauncherShortcut shortcut(); + Optional expectedWorkDirectory(); + List commandLine(); + + default Executor.Result execute() { + return HelloApp.configureAndExecute(0, Executor.of(commandLine()).dumpOutput()); + } + + record Stub( + String launcherName, + LauncherShortcut shortcut, + Optional expectedWorkDirectory, + List commandLine) implements InvokeShortcutSpec { + + public Stub { + Objects.requireNonNull(launcherName); + Objects.requireNonNull(shortcut); + Objects.requireNonNull(expectedWorkDirectory); + Objects.requireNonNull(commandLine); + } + } + } + + + private Optional findMainLauncherShortcut(JPackageCommand cmd) { + if (cmd.hasArgument(optionName())) { + return Optional.of(StartupDirectory.DEFAULT); + } else { + return Optional.empty(); + } + } + + private Optional findAddLauncherShortcut(JPackageCommand cmd, + Function> addlauncherProperties, String propertyName) { + var explicit = addlauncherProperties.apply(propertyName); + if (explicit.isPresent()) { + return explicit.flatMap(StartupDirectory::parse); + } else { + return findMainLauncherShortcut(cmd); + } + } + + private final String propertyName; +} diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherVerifier.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherVerifier.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherVerifier.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LauncherVerifier.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,368 @@ +/* + * 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.jpackage.test; + +import static java.util.stream.Collectors.toMap; +import static jdk.jpackage.test.AdditionalLauncher.NO_ICON; +import static jdk.jpackage.test.LauncherShortcut.LINUX_SHORTCUT; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.function.BiConsumer; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Stream; +import javax.xml.parsers.ParserConfigurationException; +import jdk.jpackage.internal.resources.ResourceLocator; +import jdk.jpackage.internal.util.PListReader; +import jdk.jpackage.internal.util.function.ThrowingBiConsumer; +import jdk.jpackage.internal.util.function.ThrowingSupplier; +import jdk.jpackage.test.AdditionalLauncher.PropertyFile; +import jdk.jpackage.test.LauncherShortcut.StartupDirectory; +import org.xml.sax.SAXException; + +public final class LauncherVerifier { + + LauncherVerifier(JPackageCommand cmd) { + name = cmd.name(); + javaOptions = Optional.empty(); + arguments = Optional.empty(); + icon = Optional.empty(); + properties = Optional.empty(); + } + + LauncherVerifier(String name, + Optional> javaOptions, + Optional> arguments, + Optional icon, + Map properties) { + this.name = Objects.requireNonNull(name); + this.javaOptions = javaOptions.map(List::copyOf); + this.arguments = arguments.map(List::copyOf); + this.icon = icon; + this.properties = Optional.of(new PropertyFile(properties)); + } + + static void executeMainLauncherAndVerifyOutput(JPackageCommand cmd) { + new LauncherVerifier(cmd).verify(cmd, Action.EXECUTE_LAUNCHER); + } + + + public enum Action { + VERIFY_ICON(LauncherVerifier::verifyIcon), + VERIFY_DESCRIPTION(LauncherVerifier::verifyDescription), + VERIFY_INSTALLED((verifier, cmd) -> { + verifier.verifyInstalled(cmd, true); + }), + VERIFY_UNINSTALLED((verifier, cmd) -> { + verifier.verifyInstalled(cmd, false); + }), + VERIFY_MAC_ENTITLEMENTS((verifier, cmd) -> { + if (TKit.isOSX() && MacHelper.appImageSigned(cmd)) { + verifier.verifyMacEntitlements(cmd); + } + }), + EXECUTE_LAUNCHER(LauncherVerifier::executeLauncher), + ; + + Action(ThrowingBiConsumer action) { + this.action = ThrowingBiConsumer.toBiConsumer(action); + } + + private void apply(LauncherVerifier verifier, JPackageCommand cmd) { + action.accept(verifier, cmd); + } + + private final BiConsumer action; + + static final List VERIFY_APP_IMAGE = List.of( + VERIFY_ICON, VERIFY_DESCRIPTION, VERIFY_INSTALLED, VERIFY_MAC_ENTITLEMENTS + ); + + static final List VERIFY_DEFAULTS = Stream.concat( + VERIFY_APP_IMAGE.stream(), Stream.of(EXECUTE_LAUNCHER) + ).toList(); + } + + + void verify(JPackageCommand cmd, Action... actions) { + verify(cmd, List.of(actions)); + } + + void verify(JPackageCommand cmd, Iterable actions) { + Objects.requireNonNull(cmd); + for (var a : actions) { + a.apply(this, cmd); + } + } + + private boolean isMainLauncher() { + return properties.isEmpty(); + } + + private Optional findProperty(String key) { + return properties.flatMap(v -> { + return v.findProperty(key); + }); + } + + private String getDescription(JPackageCommand cmd) { + return findProperty("description").orElseGet(() -> { + return cmd.getArgumentValue("--description", cmd::name); + }); + } + + private List getArguments(JPackageCommand cmd) { + return getStringArrayProperty(cmd, "--arguments", arguments); + } + + private List getJavaOptions(JPackageCommand cmd) { + return getStringArrayProperty(cmd, "--java-options", javaOptions); + } + + private List getStringArrayProperty(JPackageCommand cmd, String optionName, Optional> items) { + Objects.requireNonNull(cmd); + Objects.requireNonNull(optionName); + Objects.requireNonNull(items); + if (isMainLauncher()) { + return List.of(cmd.getAllArgumentValues(optionName)); + } else { + return items.orElseGet(() -> { + return List.of(cmd.getAllArgumentValues(optionName)); + }); + } + } + + private boolean explicitlyNoShortcut(LauncherShortcut shortcut) { + var explicit = findProperty(shortcut.propertyName()); + if (explicit.isPresent()) { + return explicit.flatMap(StartupDirectory::parse).isEmpty(); + } else { + return false; + } + } + + private static boolean explicitShortcutForMainLauncher(JPackageCommand cmd, LauncherShortcut shortcut) { + return cmd.hasArgument(shortcut.optionName()); + } + + private void verifyIcon(JPackageCommand cmd) throws IOException { + initIconVerifier(cmd).applyTo(cmd); + } + + private LauncherIconVerifier initIconVerifier(JPackageCommand cmd) { + var verifier = new LauncherIconVerifier().setLauncherName(name); + + var mainLauncherIcon = Optional.ofNullable(cmd.getArgumentValue("--icon")).map(Path::of).or(() -> { + return iconInResourceDir(cmd, cmd.name()); + }); + + if (TKit.isOSX()) { + // There should be no icon files on Mac for additional launchers, + // and always an icon file for the main launcher. + if (isMainLauncher()) { + mainLauncherIcon.ifPresentOrElse(verifier::setExpectedIcon, verifier::setExpectedDefaultIcon); + } + return verifier; + } + + if (isMainLauncher()) { + mainLauncherIcon.ifPresentOrElse(verifier::setExpectedIcon, verifier::setExpectedDefaultIcon); + } else { + icon.ifPresentOrElse(icon -> { + if (!NO_ICON.equals(icon)) { + verifier.setExpectedIcon(icon); + } + }, () -> { + // No "icon" property in the property file + iconInResourceDir(cmd, name).ifPresentOrElse(verifier::setExpectedIcon, () -> { + // No icon for this additional launcher in the resource directory. + mainLauncherIcon.ifPresentOrElse(verifier::setExpectedIcon, verifier::setExpectedDefaultIcon); + }); + }); + } + + return verifier; + } + + private static boolean withLinuxMainLauncherDesktopFile(JPackageCommand cmd) { + if (!TKit.isLinux() || cmd.isImagePackageType()) { + return false; + } + + return explicitShortcutForMainLauncher(cmd, LINUX_SHORTCUT) + || cmd.hasArgument("--icon") + || cmd.hasArgument("--file-associations") + || iconInResourceDir(cmd, cmd.name()).isPresent(); + } + + private boolean withLinuxDesktopFile(JPackageCommand cmd) { + if (!TKit.isLinux() || cmd.isImagePackageType()) { + return false; + } + + if (isMainLauncher()) { + return withLinuxMainLauncherDesktopFile(cmd); + } else if (explicitlyNoShortcut(LINUX_SHORTCUT) || icon.map(icon -> { + return icon.equals(NO_ICON); + }).orElse(false)) { + return false; + } else if (iconInResourceDir(cmd, name).isPresent() || icon.map(icon -> { + return !icon.equals(NO_ICON); + }).orElse(false)) { + return true; + } else if (findProperty(LINUX_SHORTCUT.propertyName()).flatMap(StartupDirectory::parse).isPresent()) { + return true; + } else { + return withLinuxMainLauncherDesktopFile(cmd.createMutableCopy().removeArgument("--file-associations")); + } + } + + private void verifyDescription(JPackageCommand cmd) throws IOException { + if (TKit.isWindows()) { + String expectedDescription = getDescription(cmd); + Path launcherPath = cmd.appLauncherPath(name); + String actualDescription = + WindowsHelper.getExecutableDescription(launcherPath); + TKit.assertEquals(expectedDescription, actualDescription, + String.format("Check file description of [%s]", launcherPath)); + } else if (TKit.isLinux() && !cmd.isImagePackageType()) { + String expectedDescription = getDescription(cmd); + Path desktopFile = LinuxHelper.getDesktopFile(cmd, name); + if (Files.exists(desktopFile)) { + TKit.assertTextStream("Comment=" + expectedDescription) + .label(String.format("[%s] file", desktopFile)) + .predicate(String::equals) + .apply(Files.readAllLines(desktopFile)); + } + } + } + + private void verifyInstalled(JPackageCommand cmd, boolean installed) throws IOException { + var launcherPath = cmd.appLauncherPath(name); + var launcherCfgFilePath = cmd.appLauncherCfgPath(name); + if (installed) { + TKit.assertExecutableFileExists(launcherPath); + TKit.assertFileExists(launcherCfgFilePath); + } else { + TKit.assertPathExists(launcherPath, false); + TKit.assertPathExists(launcherCfgFilePath, false); + } + + if (TKit.isLinux() && !cmd.isImagePackageType()) { + final var packageDesktopFile = LinuxHelper.getDesktopFile(cmd, name); + final var withLinuxDesktopFile = withLinuxDesktopFile(cmd) && installed; + if (withLinuxDesktopFile) { + TKit.assertFileExists(packageDesktopFile); + } else { + TKit.assertPathExists(packageDesktopFile, false); + } + } + + if (installed) { + initIconVerifier(cmd).verifyFileInAppImageOnly(true).applyTo(cmd); + } + } + + private void verifyMacEntitlements(JPackageCommand cmd) throws ParserConfigurationException, SAXException, IOException { + Path launcherPath = cmd.appLauncherPath(name); + var entitlements = MacSignVerify.findEntitlements(launcherPath); + + TKit.assertTrue(entitlements.isPresent(), String.format("Check [%s] launcher is signed with entitlements", name)); + + Map expected; + if (cmd.hasArgument("--mac-entitlements")) { + expected = new PListReader(Files.readAllBytes(Path.of(cmd.getArgumentValue("--mac-entitlements")))).toMap(true); + } else if (cmd.hasArgument("--mac-app-store")) { + expected = DefaultEntitlements.APP_STORE; + } else { + expected = DefaultEntitlements.STANDARD; + } + + TKit.assertEquals(expected, entitlements.orElseThrow().toMap(true), String.format("Check [%s] launcher is signed with expected entitlements", name)); + } + + private void executeLauncher(JPackageCommand cmd) throws IOException { + Path launcherPath = cmd.appLauncherPath(name); + + if (!cmd.canRunLauncher(String.format("Not running [%s] launcher", launcherPath))) { + return; + } + + var appVerifier = HelloApp.assertApp(launcherPath) + .addDefaultArguments(getArguments(cmd)) + .addJavaOptions(getJavaOptions(cmd).stream().map(str -> { + return resolveVariables(cmd, str); + }).toList()); + + appVerifier.executeAndVerifyOutput(); + } + + private static String resolveVariables(JPackageCommand cmd, String str) { + var map = Stream.of(JPackageCommand.Macro.values()).collect(toMap(x -> { + return String.format("$%s", x.name()); + }, cmd::macroValue)); + for (var e : map.entrySet()) { + str = str.replaceAll(Pattern.quote(e.getKey()), + Matcher.quoteReplacement(e.getValue().toString())); + } + return str; + } + + private static Optional iconInResourceDir(JPackageCommand cmd, String launcherName) { + Objects.requireNonNull(launcherName); + return Optional.ofNullable(cmd.getArgumentValue("--resource-dir")).map(Path::of).map(resourceDir -> { + Path icon = resourceDir.resolve(launcherName + TKit.ICON_SUFFIX); + if (Files.exists(icon)) { + return icon; + } else { + return null; + } + }); + } + + + private static final class DefaultEntitlements { + private static Map loadFromResources(String resourceName) { + return ThrowingSupplier.toSupplier(() -> { + var bytes = ResourceLocator.class.getResourceAsStream(resourceName).readAllBytes(); + return new PListReader(bytes).toMap(true); + }).get(); + } + + static final Map STANDARD = loadFromResources("entitlements.plist"); + static final Map APP_STORE = loadFromResources("sandbox.plist"); + } + + + private final String name; + private final Optional> javaOptions; + private final Optional> arguments; + private final Optional icon; + private final Optional properties; +} diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LinuxHelper.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LinuxHelper.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LinuxHelper.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/LinuxHelper.java 2025-12-18 08:04:02.000000000 +0000 @@ -23,25 +23,30 @@ package jdk.jpackage.test; import java.io.IOException; +import java.io.UncheckedIOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.function.Function; +import java.util.function.Predicate; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; import jdk.jpackage.internal.util.PathUtils; import jdk.jpackage.internal.util.function.ThrowingConsumer; +import jdk.jpackage.test.LauncherShortcut.InvokeShortcutSpec; import jdk.jpackage.test.PackageTest.PackageHandlers; @@ -308,8 +313,8 @@ } static void verifyPackageBundleEssential(JPackageCommand cmd) { - String packageName = LinuxHelper.getPackageName(cmd); - long packageSize = LinuxHelper.getInstalledPackageSizeKB(cmd); + String packageName = getPackageName(cmd); + long packageSize = getInstalledPackageSizeKB(cmd); TKit.trace("InstalledPackageSize: " + packageSize); TKit.assertNotEquals(0, packageSize, String.format( "Check installed size of [%s] package in not zero", packageName)); @@ -330,7 +335,7 @@ checkPrerequisites = packageSize > 5; } - List prerequisites = LinuxHelper.getPrerequisitePackages(cmd); + List prerequisites = getPrerequisitePackages(cmd); if (checkPrerequisites) { final String vitalPackage = "libc"; TKit.assertTrue(prerequisites.stream().filter( @@ -340,13 +345,28 @@ vitalPackage, prerequisites, packageName)); } else { TKit.trace(String.format( - "Not cheking %s required packages of [%s] package", + "Not checking %s required packages of [%s] package", prerequisites, packageName)); } } - static void addBundleDesktopIntegrationVerifier(PackageTest test, - boolean integrated) { + public static Collection getInvokeShortcutSpecs(JPackageCommand cmd) { + cmd.verifyIsOfType(PackageType.LINUX); + + final var desktopFiles = getDesktopFiles(cmd); + final var predefinedAppImage = Optional.ofNullable(cmd.getArgumentValue("--app-image")).map(Path::of).map(AppImageFile::load); + + return desktopFiles.stream().map(desktopFile -> { + var systemDesktopFile = getSystemDesktopFilesFolder().resolve(desktopFile.getFileName()); + return new InvokeShortcutSpec.Stub( + launcherNameFromDesktopFile(cmd, predefinedAppImage, desktopFile), + LauncherShortcut.LINUX_SHORTCUT, + new DesktopFile(systemDesktopFile, false).findQuotedValue("Path").map(Path::of), + List.of("gtk-launch", PathUtils.replaceSuffix(systemDesktopFile.getFileName(), "").toString())); + }).toList(); + } + + static void addBundleDesktopIntegrationVerifier(PackageTest test, boolean integrated) { final String xdgUtils = "xdg-utils"; Function, String> verifier = (lines) -> { @@ -392,52 +412,81 @@ }); test.addInstallVerifier(cmd -> { - // Verify .desktop files. - try (var files = Files.list(cmd.appLayout().desktopIntegrationDirectory())) { - List desktopFiles = files - .filter(path -> path.getFileName().toString().endsWith(".desktop")) - .toList(); - if (!integrated) { - TKit.assertStringListEquals(List.of(), - desktopFiles.stream().map(Path::toString).collect( - Collectors.toList()), - "Check there are no .desktop files in the package"); - } + if (!integrated) { + TKit.assertStringListEquals( + List.of(), + getDesktopFiles(cmd).stream().map(Path::toString).toList(), + "Check there are no .desktop files in the package"); + } + }); + } + + static void verifyDesktopFiles(JPackageCommand cmd, boolean installed) { + final var desktopFiles = getDesktopFiles(cmd); + try { + if (installed) { + var predefinedAppImage = Optional.ofNullable(cmd.getArgumentValue("--app-image")).map(Path::of).map(AppImageFile::load); for (var desktopFile : desktopFiles) { - verifyDesktopFile(cmd, desktopFile); + verifyDesktopFile(cmd, predefinedAppImage, desktopFile); + } + + if (!cmd.isPackageUnpacked("Not verifying system .desktop files")) { + for (var desktopFile : desktopFiles) { + Path systemDesktopFile = getSystemDesktopFilesFolder().resolve(desktopFile.getFileName()); + TKit.assertFileExists(systemDesktopFile); + TKit.assertStringListEquals( + Files.readAllLines(desktopFile), + Files.readAllLines(systemDesktopFile), + String.format("Check [%s] and [%s] files are equal", desktopFile, systemDesktopFile)); + } + } + } else { + for (var desktopFile : getDesktopFiles(cmd)) { + Path systemDesktopFile = getSystemDesktopFilesFolder().resolve(desktopFile.getFileName()); + TKit.assertPathExists(systemDesktopFile, false); } } - }); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } } - private static void verifyDesktopFile(JPackageCommand cmd, Path desktopFile) - throws IOException { - TKit.trace(String.format("Check [%s] file BEGIN", desktopFile)); + private static Collection getDesktopFiles(JPackageCommand cmd) { + var unpackedDir = cmd.appLayout().desktopIntegrationDirectory(); + var packageDir = cmd.pathToPackageFile(unpackedDir); + return getPackageFiles(cmd).filter(path -> { + return packageDir.equals(path.getParent()) && path.getFileName().toString().endsWith(".desktop"); + }).map(Path::getFileName).map(unpackedDir::resolve).toList(); + } + + private static String launcherNameFromDesktopFile(JPackageCommand cmd, Optional predefinedAppImage, Path desktopFile) { + Objects.requireNonNull(cmd); + Objects.requireNonNull(predefinedAppImage); + Objects.requireNonNull(desktopFile); - var launcherName = Stream.of(List.of(cmd.name()), cmd.addLauncherNames()).flatMap(List::stream).filter(name -> { + return predefinedAppImage.map(v -> { + return v.launchers().keySet().stream(); + }).orElseGet(() -> { + return Stream.concat(Stream.of(cmd.name()), cmd.addLauncherNames().stream()); + }).filter(name-> { return getDesktopFile(cmd, name).equals(desktopFile); - }).findAny(); - if (!cmd.hasArgument("--app-image")) { - TKit.assertTrue(launcherName.isPresent(), - "Check the desktop file corresponds to one of app launchers"); - } - - List lines = Files.readAllLines(desktopFile); - TKit.assertEquals("[Desktop Entry]", lines.get(0), "Check file header"); - - Map data = lines.stream() - .skip(1) - .peek(str -> TKit.assertTextStream("=").predicate(String::contains).apply(List.of(str))) - .map(str -> { - String components[] = str.split("=(?=.+)"); - if (components.length == 1) { - return Map.entry(str.substring(0, str.length() - 1), ""); - } - return Map.entry(components[0], components[1]); - }).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> { - TKit.assertUnexpected("Multiple values of the same key"); + }).findAny().orElseThrow(() -> { + TKit.assertUnexpected(String.format("Failed to find launcher corresponding to [%s] file", desktopFile)); + // Unreachable return null; - })); + }); + } + + private static void verifyDesktopFile(JPackageCommand cmd, Optional predefinedAppImage, Path desktopFile) throws IOException { + Objects.requireNonNull(cmd); + Objects.requireNonNull(predefinedAppImage); + Objects.requireNonNull(desktopFile); + + TKit.trace(String.format("Check [%s] file BEGIN", desktopFile)); + + var launcherName = launcherNameFromDesktopFile(cmd, predefinedAppImage, desktopFile); + + var data = new DesktopFile(desktopFile, true); final Set mandatoryKeys = new HashSet<>(Set.of("Name", "Comment", "Exec", "Icon", "Terminal", "Type", "Categories")); @@ -447,34 +496,44 @@ for (var e : Map.of("Type", "Application", "Terminal", "false").entrySet()) { String key = e.getKey(); - TKit.assertEquals(e.getValue(), data.get(key), String.format( + TKit.assertEquals(e.getValue(), data.find(key).orElseThrow(), String.format( "Check value of [%s] key", key)); } - // Verify the value of `Exec` key is escaped if required - String launcherPath = data.get("Exec"); - if (Pattern.compile("\\s").matcher(launcherPath).find()) { - TKit.assertTrue(launcherPath.startsWith("\"") - && launcherPath.endsWith("\""), - "Check path to the launcher is enclosed in double quotes"); - launcherPath = launcherPath.substring(1, launcherPath.length() - 1); - } + String launcherPath = data.findQuotedValue("Exec").orElseThrow(); - if (launcherName.isPresent()) { - TKit.assertEquals(launcherPath, cmd.pathToPackageFile( - cmd.appLauncherPath(launcherName.get())).toString(), - String.format( - "Check the value of [Exec] key references [%s] app launcher", - launcherName.get())); - } + TKit.assertEquals( + launcherPath, + cmd.pathToPackageFile(cmd.appLauncherPath(launcherName)).toString(), + String.format("Check the value of [Exec] key references [%s] app launcher", launcherName)); + + var appLayout = cmd.appLayout(); + + LauncherShortcut.LINUX_SHORTCUT.expectShortcut(cmd, predefinedAppImage, launcherName).map(shortcutWorkDirType -> { + switch (shortcutWorkDirType) { + case DEFAULT -> { + return (Path)null; + } + default -> { + throw new AssertionError(); + } + } + }).map(Path::toString).ifPresentOrElse(shortcutWorkDir -> { + var actualShortcutWorkDir = data.find("Path"); + TKit.assertTrue(actualShortcutWorkDir.isPresent(), "Check [Path] key exists"); + TKit.assertEquals(actualShortcutWorkDir.get(), shortcutWorkDir, "Check the value of [Path] key"); + }, () -> { + TKit.assertTrue(data.find("Path").isEmpty(), "Check there is no [Path] key"); + }); for (var e : List.>, Function>>of( Map.entry(Map.entry("Exec", Optional.of(launcherPath)), ApplicationLayout::launchersDirectory), Map.entry(Map.entry("Icon", Optional.empty()), ApplicationLayout::desktopIntegrationDirectory))) { - var path = e.getKey().getValue().or(() -> Optional.of(data.get( - e.getKey().getKey()))).map(Path::of).get(); + var path = e.getKey().getValue().or(() -> { + return data.findQuotedValue(e.getKey().getKey()); + }).map(Path::of).get(); TKit.assertFileExists(cmd.pathToUnpackedPackageFile(path)); - Path expectedDir = cmd.pathToPackageFile(e.getValue().apply(cmd.appLayout())); + Path expectedDir = cmd.pathToPackageFile(e.getValue().apply(appLayout)); TKit.assertTrue(path.getParent().equals(expectedDir), String.format( "Check the value of [%s] key references a file in [%s] folder", e.getKey().getKey(), expectedDir)); @@ -761,6 +820,62 @@ } } + + private static final class DesktopFile { + DesktopFile(Path path, boolean verify) { + try { + List lines = Files.readAllLines(path); + if (verify) { + TKit.assertEquals("[Desktop Entry]", lines.getFirst(), "Check file header"); + } + + var stream = lines.stream().skip(1).filter(Predicate.not(String::isEmpty)); + if (verify) { + stream = stream.peek(str -> { + TKit.assertTextStream("=").predicate(String::contains).apply(List.of(str)); + }); + } + + data = stream.map(str -> { + String components[] = str.split("=(?=.+)"); + if (components.length == 1) { + return Map.entry(str.substring(0, str.length() - 1), ""); + } else { + return Map.entry(components[0], components[1]); + } + }).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + } + + Set keySet() { + return data.keySet(); + } + + Optional find(String property) { + return Optional.ofNullable(data.get(Objects.requireNonNull(property))); + } + + Optional findQuotedValue(String property) { + return find(property).map(value -> { + if (Pattern.compile("\\s").matcher(value).find()) { + boolean quotesMatched = value.startsWith("\"") && value.endsWith("\""); + if (!quotesMatched) { + TKit.assertTrue(quotesMatched, + String.format("Check the value of key [%s] is enclosed in double quotes", property)); + } + return value.substring(1, value.length() - 1); + } else { + return value; + } + }); + } + + private final Map data; + } + + static final Set CRITICAL_RUNTIME_FILES = Set.of(Path.of( "lib/server/libjvm.so")); diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MacHelper.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MacHelper.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MacHelper.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MacHelper.java 2025-12-18 08:04:02.000000000 +0000 @@ -32,6 +32,7 @@ import java.nio.file.Files; import java.nio.file.Path; import java.util.List; +import java.util.NoSuchElementException; import java.util.Objects; import java.util.Optional; import java.util.Set; @@ -74,9 +75,23 @@ Path mountPoint = null; try { - var plist = readPList(attachExecutor.getOutput()); - mountPoint = Path.of(plist.queryValue("mount-point")); + // One of "dict" items of "system-entities" array property should contain "mount-point" string property. + mountPoint = readPList(attachExecutor.getOutput()).queryArrayValue("system-entities", false).map(PListReader.class::cast).map(dict -> { + try { + return dict.queryValue("mount-point"); + } catch (NoSuchElementException ex) { + return (String)null; + } + }).filter(Objects::nonNull).map(Path::of).findFirst().orElseThrow(); + } finally { + if (mountPoint == null) { + TKit.trace("Unexpected plist file missing `system-entities` array:"); + attachExecutor.getOutput().forEach(TKit::trace); + TKit.trace("Done"); + } + } + try { // code here used to copy just or .app // We now have option to include arbitrary content, so we copy // everything in the mounted image. diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MacSignVerify.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MacSignVerify.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MacSignVerify.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MacSignVerify.java 2025-12-18 08:04:02.000000000 +0000 @@ -56,6 +56,17 @@ String.format("Check [%s] signed with adhoc signature", path)); } + public static Optional findEntitlements(Path path) { + final var exec = Executor.of("/usr/bin/codesign", "-d", "--entitlements", "-", "--xml", path.toString()).saveOutput().dumpOutput(); + final var result = exec.execute(); + var xml = result.stdout().getOutput(); + if (xml.isEmpty()) { + return Optional.empty(); + } else { + return Optional.of(MacHelper.readPList(xml)); + } + } + public static void assertUnsigned(Path path) { TKit.assertTrue(findSpctlSignOrigin(SpctlType.EXEC, path).isEmpty(), String.format("Check [%s] unsigned", path)); diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MsiDatabase.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MsiDatabase.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MsiDatabase.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MsiDatabase.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,377 @@ +/* + * 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.jpackage.test; + + +import java.io.IOException; +import java.io.UncheckedIOException; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Function; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + + +final class MsiDatabase { + + static MsiDatabase load(Path msiFile, Path idtFileOutputDir, Set tableNames) { + try { + Files.createDirectories(idtFileOutputDir); + + var orderedTableNames = tableNames.stream().sorted().toList(); + + Executor.of("cscript.exe", "//Nologo") + .addArgument(TKit.TEST_SRC_ROOT.resolve("resources/msi-export.js")) + .addArgument(msiFile) + .addArgument(idtFileOutputDir) + .addArguments(orderedTableNames.stream().map(Table::tableName).toList()) + .dumpOutput() + .execute(0); + + var tables = orderedTableNames.stream().map(tableName -> { + return Map.entry(tableName, idtFileOutputDir.resolve(tableName + ".idt")); + }).filter(e -> { + return Files.exists(e.getValue()); + }).collect(Collectors.toMap(Map.Entry::getKey, e -> { + return MsiTable.loadFromTextArchiveFile(e.getValue()); + })); + + return new MsiDatabase(tables); + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + } + + + enum Table { + COMPONENT("Component"), + DIRECTORY("Directory"), + FILE("File"), + PROPERTY("Property"), + SHORTCUT("Shortcut"), + ; + + Table(String name) { + this.tableName = Objects.requireNonNull(name); + } + + String tableName() { + return tableName; + } + + private final String tableName; + + static final Set
    FIND_PROPERTY_REQUIRED_TABLES = Set.of(PROPERTY); + static final Set
    LIST_SHORTCUTS_REQUIRED_TABLES = Set.of(COMPONENT, DIRECTORY, FILE, SHORTCUT); + } + + + private MsiDatabase(Map tables) { + this.tables = Map.copyOf(tables); + } + + Set
    tableNames() { + return tables.keySet(); + } + + MsiDatabase append(MsiDatabase other) { + Map newTables = new HashMap<>(tables); + newTables.putAll(other.tables); + return new MsiDatabase(newTables); + } + + Optional findProperty(String propertyName) { + Objects.requireNonNull(propertyName); + return tables.get(Table.PROPERTY).findRow("Property", propertyName).map(row -> { + return row.apply("Value"); + }); + } + + Collection listShortcuts() { + var shortcuts = tables.get(Table.SHORTCUT); + if (shortcuts == null) { + return List.of(); + } + return IntStream.range(0, shortcuts.rowCount()).mapToObj(i -> { + var row = shortcuts.row(i); + var shortcutPath = directoryPath(row.apply("Directory_")).resolve(fileNameFromFieldValue(row.apply("Name"))); + var workDir = directoryPath(row.apply("WkDir")); + var shortcutTarget = Path.of(expandFormattedString(row.apply("Target"))); + return new Shortcut(shortcutPath, shortcutTarget, workDir); + }).toList(); + } + + record Shortcut(Path path, Path target, Path workDir) { + + Shortcut { + Objects.requireNonNull(path); + Objects.requireNonNull(target); + Objects.requireNonNull(workDir); + } + + void assertEquals(Shortcut expected) { + TKit.assertEquals(expected.path, path, "Check the shortcut path"); + TKit.assertEquals(expected.target, target, "Check the shortcut target"); + TKit.assertEquals(expected.workDir, workDir, "Check the shortcut work directory"); + } + } + + private Path directoryPath(String directoryId) { + var table = tables.get(Table.DIRECTORY); + Path result = null; + for (var row = table.findRow("Directory", directoryId); + row.isPresent(); + directoryId = row.get().apply("Directory_Parent"), row = table.findRow("Directory", directoryId)) { + + Path pathComponent; + if (DIRECTORY_PROPERTIES.contains(directoryId)) { + pathComponent = Path.of(directoryId); + directoryId = null; + } else { + pathComponent = fileNameFromFieldValue(row.get().apply("DefaultDir")); + } + + if (result != null) { + result = pathComponent.resolve(result); + } else { + result = pathComponent; + } + + if (directoryId == null) { + break; + } + } + + return Objects.requireNonNull(result); + } + + private String expandFormattedString(String str) { + return expandFormattedString(str, token -> { + if (token.charAt(0) == '#') { + var filekey = token.substring(1); + var fileRow = tables.get(Table.FILE).findRow("File", filekey).orElseThrow(); + + var component = fileRow.apply("Component_"); + var componentRow = tables.get(Table.COMPONENT).findRow("Component", component).orElseThrow(); + + var fileName = fileNameFromFieldValue(fileRow.apply("FileName")); + var filePath = directoryPath(componentRow.apply("Directory_")); + + return filePath.resolve(fileName).toString(); + } else { + throw new UnsupportedOperationException(String.format( + "Unrecognized token [%s] in formatted string [%s]", token, str)); + } + }); + } + + private static Path fileNameFromFieldValue(String fieldValue) { + var pipeIdx = fieldValue.indexOf('|'); + if (pipeIdx < 0) { + return Path.of(fieldValue); + } else { + return Path.of(fieldValue.substring(pipeIdx + 1)); + } + } + + private static String expandFormattedString(String str, Function callback) { + // Naive implementation of https://learn.microsoft.com/en-us/windows/win32/msi/formatted + // - No recursive property expansion. + // - No curly brakes ({}) handling. + + Objects.requireNonNull(str); + Objects.requireNonNull(callback); + var sb = new StringBuffer(); + var m = FORMATTED_STRING_TOKEN.matcher(str); + while (m.find()) { + var token = m.group(); + token = token.substring(1, token.length() - 1); + if (token.equals("~")) { + m.appendReplacement(sb, "\0"); + } else { + var replacement = Matcher.quoteReplacement(callback.apply(token)); + m.appendReplacement(sb, replacement); + } + } + m.appendTail(sb); + return sb.toString(); + } + + + private record MsiTable(Map> columns) { + + MsiTable { + Objects.requireNonNull(columns); + if (columns.isEmpty()) { + throw new IllegalArgumentException("Table should have columns"); + } + } + + Optional> findRow(String columnName, String fieldValue) { + Objects.requireNonNull(columnName); + Objects.requireNonNull(fieldValue); + var column = columns.get(columnName); + for (int i = 0; i != column.size(); i++) { + if (fieldValue.equals(column.get(i))) { + return Optional.of(row(i)); + } + } + return Optional.empty(); + } + + /** + * Loads a table from a text archive file. + * @param idtFile path to the input text archive file + * @return the table + */ + static MsiTable loadFromTextArchiveFile(Path idtFile) { + + var header = IdtFileHeader.loadFromTextArchiveFile(idtFile); + + Map> columns = new HashMap<>(); + header.columns.forEach(column -> { + columns.put(column, new ArrayList<>()); + }); + + try { + var lines = Files.readAllLines(idtFile, header.charset()).toArray(String[]::new); + for (int i = 3; i != lines.length; i++) { + var line = lines[i]; + var row = line.split("\t", -1); + if (row.length != header.columns().size()) { + throw new IllegalArgumentException(String.format( + "Expected %d columns. Actual is %d in line %d in [%s] file", + header.columns().size(), row.length, i, idtFile)); + } + for (int j = 0; j != row.length; j++) { + var field = row[j]; + // https://learn.microsoft.com/en-us/windows/win32/msi/archive-file-format + field = field.replace((char)21, (char)0); + field = field.replace((char)27, '\b'); + field = field.replace((char)16, '\t'); + field = field.replace((char)25, '\n'); + field = field.replace((char)24, '\f'); + field = field.replace((char)17, '\r'); + columns.get(header.columns.get(j)).add(field); + } + } + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + + return new MsiTable(columns); + } + + int columnCount() { + return columns.size(); + } + + int rowCount() { + return columns.values().stream().findAny().orElseThrow().size(); + } + + Function row(int rowIndex) { + return columnName -> { + var column = Objects.requireNonNull(columns.get(Objects.requireNonNull(columnName))); + return column.get(rowIndex); + }; + } + } + + + private record IdtFileHeader(Charset charset, List columns) { + + IdtFileHeader { + Objects.requireNonNull(charset); + columns.forEach(Objects::requireNonNull); + if (columns.isEmpty()) { + throw new IllegalArgumentException("Table should have columns"); + } + } + + /** + * Loads a table header from a text archive (.idt) file. + * @see https://learn.microsoft.com/en-us/windows/win32/msi/archive-file-format + * @see https://learn.microsoft.com/en-us/windows/win32/msi/ascii-data-in-text-archive-files + * @param path path to the input text archive file + * @return the table header + */ + static IdtFileHeader loadFromTextArchiveFile(Path idtFile) { + var charset = StandardCharsets.US_ASCII; + try (var stream = Files.lines(idtFile, charset)) { + var headerLines = stream.limit(3).toList(); + if (headerLines.size() != 3) { + throw new IllegalArgumentException(String.format( + "[%s] file should have at least three text lines", idtFile)); + } + + var columns = headerLines.get(0).split("\t"); + + var header = headerLines.get(2).split("\t", 4); + if (header.length == 3) { + if (Pattern.matches("^[1-9]\\d+$", header[0])) { + charset = Charset.forName(header[0]); + } else { + throw new IllegalArgumentException(String.format( + "Unexpected charset name [%s] in [%s] file", header[0], idtFile)); + } + } else if (header.length != 2) { + throw new IllegalArgumentException(String.format( + "Unexpected number of fields (%d) in the 3rd line of [%s] file", + header.length, idtFile)); + } + + return new IdtFileHeader(charset, List.of(columns)); + + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + } + } + + + private final Map tables; + + // https://learn.microsoft.com/en-us/windows/win32/msi/formatted + private static final Pattern FORMATTED_STRING_TOKEN = Pattern.compile("\\[[^\\]]+\\]"); + + // https://learn.microsoft.com/en-us/windows/win32/msi/property-reference#system-folder-properties + private final Set DIRECTORY_PROPERTIES = Set.of( + "DesktopFolder", + "LocalAppDataFolder", + "ProgramFiles64Folder", + "ProgramMenuFolder" + ); +} diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageTest.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageTest.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/PackageTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -30,11 +30,13 @@ import static jdk.jpackage.test.PackageType.MAC_PKG; import static jdk.jpackage.test.PackageType.NATIVE; import static jdk.jpackage.test.PackageType.WINDOWS; +import static jdk.jpackage.test.PackageType.WIN_MSI; import java.awt.GraphicsEnvironment; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.time.Duration; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -270,10 +272,6 @@ PackageTest addHelloAppFileAssociationsVerifier(FileAssociations fa) { Objects.requireNonNull(fa); - // Setup test app to have valid jpackage command line before - // running check of type of environment. - addHelloAppInitializer(null); - forTypes(LINUX, () -> { LinuxHelper.addFileAssociationsVerifier(this, fa); }); @@ -296,13 +294,9 @@ Files.deleteIfExists(appOutput); List expectedArgs = testRun.openFiles(testFiles); - TKit.waitForFileCreated(appOutput, 7); + TKit.waitForFileCreated(appOutput, Duration.ofSeconds(7), Duration.ofSeconds(3)); - // Wait a little bit after file has been created to - // make sure there are no pending writes into it. - Thread.sleep(3000); - HelloApp.verifyOutputFile(appOutput, expectedArgs, - Collections.emptyMap()); + HelloApp.verifyOutputFile(appOutput, expectedArgs, Map.of()); }); if (isOfType(cmd, WINDOWS)) { @@ -352,15 +346,14 @@ public PackageTest configureHelloApp(String javaAppDesc) { addHelloAppInitializer(javaAppDesc); - addInstallVerifier(HelloApp::executeLauncherAndVerifyOutput); + addInstallVerifier(LauncherVerifier::executeMainLauncherAndVerifyOutput); return this; } public PackageTest addHelloAppInitializer(String javaAppDesc) { - addInitializer( - cmd -> new HelloApp(JavaAppDesc.parse(javaAppDesc)).addTo(cmd), - "HelloApp"); - return this; + return addInitializer(cmd -> { + new HelloApp(JavaAppDesc.parse(javaAppDesc)).addTo(cmd); + }, "HelloApp"); } public static class Group extends RunnablePackageTest { @@ -603,11 +596,7 @@ } } case VERIFY_INSTALL -> { - if (unpackNotSupported()) { - return ActionAction.SKIP; - } - - if (installFailed()) { + if (unpackNotSupported() || installFailed()) { return ActionAction.SKIP; } } @@ -745,6 +734,8 @@ if (expectedJPackageExitCode == 0) { if (isOfType(cmd, LINUX)) { LinuxHelper.verifyPackageBundleEssential(cmd); + } else if (isOfType(cmd, WIN_MSI)) { + WinShortcutVerifier.verifyBundleShortcuts(cmd); } } bundleVerifiers.forEach(v -> v.accept(cmd, result)); @@ -766,12 +757,11 @@ if (!cmd.isRuntime()) { if (isOfType(cmd, WINDOWS) && !cmd.isPackageUnpacked("Not verifying desktop integration")) { - // Check main launcher - WindowsHelper.verifyDesktopIntegration(cmd, null); - // Check additional launchers - cmd.addLauncherNames().forEach(name -> { - WindowsHelper.verifyDesktopIntegration(cmd, name); - }); + WindowsHelper.verifyDeployedDesktopIntegration(cmd, true); + } + + if (isOfType(cmd, LINUX)) { + LinuxHelper.verifyDesktopFiles(cmd, true); } } @@ -848,12 +838,11 @@ TKit.assertPathExists(cmd.appLauncherPath(), false); if (isOfType(cmd, WINDOWS)) { - // Check main launcher - WindowsHelper.verifyDesktopIntegration(cmd, null); - // Check additional launchers - cmd.addLauncherNames().forEach(name -> { - WindowsHelper.verifyDesktopIntegration(cmd, name); - }); + WindowsHelper.verifyDeployedDesktopIntegration(cmd, false); + } + + if (isOfType(cmd, LINUX)) { + LinuxHelper.verifyDesktopFiles(cmd, false); } } diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/TKit.java 2025-12-18 08:04:02.000000000 +0000 @@ -41,8 +41,9 @@ import java.nio.file.StandardWatchEventKinds; import java.nio.file.WatchEvent; import java.nio.file.WatchKey; -import java.nio.file.WatchService; import java.text.SimpleDateFormat; +import java.time.Duration; +import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; import java.util.Base64; @@ -597,49 +598,56 @@ return file; } - static void waitForFileCreated(Path fileToWaitFor, - long timeoutSeconds) throws IOException { + public static void waitForFileCreated(Path fileToWaitFor, + Duration timeout, Duration afterCreatedTimeout) throws IOException { + waitForFileCreated(fileToWaitFor, timeout); + // Wait after the file has been created to ensure it is fully written. + ThrowingConsumer.toConsumer(Thread::sleep).accept(afterCreatedTimeout); + } + + private static void waitForFileCreated(Path fileToWaitFor, Duration timeout) throws IOException { trace(String.format("Wait for file [%s] to be available", fileToWaitFor.toAbsolutePath())); - WatchService ws = FileSystems.getDefault().newWatchService(); + try (var ws = FileSystems.getDefault().newWatchService()) { - Path watchDirectory = fileToWaitFor.toAbsolutePath().getParent(); - watchDirectory.register(ws, ENTRY_CREATE, ENTRY_MODIFY); + Path watchDirectory = fileToWaitFor.toAbsolutePath().getParent(); + watchDirectory.register(ws, ENTRY_CREATE, ENTRY_MODIFY); - long waitUntil = System.currentTimeMillis() + timeoutSeconds * 1000; - for (;;) { - long timeout = waitUntil - System.currentTimeMillis(); - assertTrue(timeout > 0, String.format( - "Check timeout value %d is positive", timeout)); - - WatchKey key = ThrowingSupplier.toSupplier(() -> ws.poll(timeout, - TimeUnit.MILLISECONDS)).get(); - if (key == null) { - if (fileToWaitFor.toFile().exists()) { - trace(String.format( - "File [%s] is available after poll timeout expired", - fileToWaitFor)); - return; + var waitUntil = Instant.now().plus(timeout); + for (;;) { + var remainderTimeout = Instant.now().until(waitUntil); + assertTrue(remainderTimeout.isPositive(), String.format( + "Check timeout value %dms is positive", remainderTimeout.toMillis())); + + WatchKey key = ThrowingSupplier.toSupplier(() -> { + return ws.poll(remainderTimeout.toMillis(), TimeUnit.MILLISECONDS); + }).get(); + if (key == null) { + if (Files.exists(fileToWaitFor)) { + trace(String.format( + "File [%s] is available after poll timeout expired", + fileToWaitFor)); + return; + } + assertUnexpected(String.format("Timeout %dms expired", remainderTimeout.toMillis())); } - assertUnexpected(String.format("Timeout expired", timeout)); - } - for (WatchEvent event : key.pollEvents()) { - if (event.kind() == StandardWatchEventKinds.OVERFLOW) { - continue; - } - Path contextPath = (Path) event.context(); - if (Files.isSameFile(watchDirectory.resolve(contextPath), - fileToWaitFor)) { - trace(String.format("File [%s] is available", fileToWaitFor)); - return; + for (WatchEvent event : key.pollEvents()) { + if (event.kind() == StandardWatchEventKinds.OVERFLOW) { + continue; + } + Path contextPath = (Path) event.context(); + if (Files.exists(fileToWaitFor) && Files.isSameFile(watchDirectory.resolve(contextPath), fileToWaitFor)) { + trace(String.format("File [%s] is available", fileToWaitFor)); + return; + } } - } - if (!key.reset()) { - assertUnexpected("Watch key invalidated"); + if (!key.reset()) { + assertUnexpected("Watch key invalidated"); + } } } } diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WinShortcutVerifier.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WinShortcutVerifier.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WinShortcutVerifier.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WinShortcutVerifier.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,283 @@ +/* + * 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 + * 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.jpackage.test; + +import static java.util.stream.Collectors.groupingBy; +import static jdk.jpackage.test.LauncherShortcut.WIN_DESKTOP_SHORTCUT; +import static jdk.jpackage.test.LauncherShortcut.WIN_START_MENU_SHORTCUT; +import static jdk.jpackage.test.WindowsHelper.getInstallationSubDirectory; + +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.function.Function; +import java.util.stream.Stream; +import jdk.jpackage.internal.util.PathUtils; +import jdk.jpackage.test.LauncherShortcut.InvokeShortcutSpec; +import jdk.jpackage.test.LauncherShortcut.StartupDirectory; +import jdk.jpackage.test.MsiDatabase.Shortcut; +import jdk.jpackage.test.WindowsHelper.SpecialFolder; + + +public final class WinShortcutVerifier { + + static void verifyBundleShortcuts(JPackageCommand cmd) { + cmd.verifyIsOfType(PackageType.WIN_MSI); + + if (Stream.of("--win-menu", "--win-shortcut").noneMatch(cmd::hasArgument) && cmd.addLauncherNames().isEmpty()) { + return; + } + + var actualShortcuts = WindowsHelper.getMsiShortcuts(cmd).stream().collect(groupingBy(shortcut -> { + return PathUtils.replaceSuffix(shortcut.target().getFileName(), "").toString(); + })); + + var expectedShortcuts = expectShortcuts(cmd); + + var launcherNames = expectedShortcuts.keySet().stream().sorted().toList(); + + TKit.assertStringListEquals( + launcherNames, + actualShortcuts.keySet().stream().sorted().toList(), + "Check the list of launchers with shortcuts"); + + Function, List> sorter = shortcuts -> { + return shortcuts.stream().sorted(SHORTCUT_COMPARATOR).toList(); + }; + + for (var name : launcherNames) { + var actualLauncherShortcuts = sorter.apply(actualShortcuts.get(name)); + var expectedLauncherShortcuts = sorter.apply(expectedShortcuts.get(name)); + + TKit.assertEquals(expectedLauncherShortcuts.size(), actualLauncherShortcuts.size(), + String.format("Check the number of shortcuts of launcher [%s]", name)); + + for (int i = 0; i != expectedLauncherShortcuts.size(); i++) { + TKit.trace(String.format("Verify shortcut #%d of launcher [%s]", i + 1, name)); + actualLauncherShortcuts.get(i).assertEquals(expectedLauncherShortcuts.get(i)); + TKit.trace("Done"); + } + } + } + + static void verifyDeployedShortcuts(JPackageCommand cmd, boolean installed) { + cmd.verifyIsOfType(PackageType.WINDOWS); + + verifyDeployedShortcutsInternal(cmd, installed); + var copyCmd = cmd.createMutableCopy(); + if (copyCmd.hasArgument("--win-per-user-install")) { + copyCmd.removeArgument("--win-per-user-install"); + } else { + copyCmd.addArgument("--win-per-user-install"); + } + verifyDeployedShortcutsInternal(copyCmd, false); + } + + public static Collection getInvokeShortcutSpecs(JPackageCommand cmd) { + return expectShortcuts(cmd).entrySet().stream().map(e -> { + return e.getValue().stream().map(shortcut -> { + return convert(cmd, e.getKey(), shortcut); + }); + }).flatMap(x -> x).toList(); + } + + private static void verifyDeployedShortcutsInternal(JPackageCommand cmd, boolean installed) { + + var expectedShortcuts = expectShortcuts(cmd).values().stream().flatMap(Collection::stream).toList(); + + var isUserLocalInstall = WindowsHelper.isUserLocalInstall(cmd); + + expectedShortcuts.stream().map(Shortcut::path).sorted().map(path -> { + return resolvePath(path, !isUserLocalInstall); + }).map(path -> { + return PathUtils.addSuffix(path, ".lnk"); + }).forEach(path -> { + if (installed) { + TKit.assertFileExists(path); + } else { + TKit.assertPathExists(path, false); + } + }); + + if (!installed) { + expectedShortcuts.stream().map(Shortcut::path).filter(path -> { + return Stream.of(ShortcutType.COMMON_START_MENU, ShortcutType.USER_START_MENU).anyMatch(type -> { + return path.startsWith(Path.of(type.rootFolder().getMsiPropertyName())); + }); + }).map(Path::getParent).distinct().map(unresolvedShortcutDir -> { + return resolvePath(unresolvedShortcutDir, !isUserLocalInstall); + }).forEach(shortcutDir -> { + if (Files.isDirectory(shortcutDir)) { + TKit.assertDirectoryNotEmpty(shortcutDir); + } else { + TKit.assertPathExists(shortcutDir, false); + } + }); + } + } + + private enum ShortcutType { + COMMON_START_MENU(SpecialFolder.COMMON_START_MENU_PROGRAMS), + USER_START_MENU(SpecialFolder.USER_START_MENU_PROGRAMS), + COMMON_DESKTOP(SpecialFolder.COMMON_DESKTOP), + USER_DESKTOP(SpecialFolder.USER_DESKTOP), + ; + + ShortcutType(SpecialFolder rootFolder) { + this.rootFolder = Objects.requireNonNull(rootFolder); + } + + SpecialFolder rootFolder() { + return rootFolder; + } + + private final SpecialFolder rootFolder; + } + + private static Path resolvePath(Path path, boolean allUsers) { + var root = path.getName(0); + var resolvedRoot = SpecialFolder.findMsiProperty(root.toString(), allUsers).orElseThrow().getPath(); + return resolvedRoot.resolve(root.relativize(path)); + } + + private static Shortcut createLauncherShortcutSpec(JPackageCommand cmd, String launcherName, + SpecialFolder installRoot, Path workDir, ShortcutType type) { + + var name = Optional.ofNullable(launcherName).orElseGet(cmd::name); + + var appLayout = ApplicationLayout.windowsAppImage().resolveAt( + Path.of(installRoot.getMsiPropertyName()).resolve(getInstallationSubDirectory(cmd))); + + Path path; + switch (type) { + case COMMON_START_MENU, USER_START_MENU -> { + path = Path.of(cmd.getArgumentValue("--win-menu-group", () -> "Unknown"), name); + } + default -> { + path = Path.of(name); + } + } + + return new Shortcut( + Path.of(type.rootFolder().getMsiPropertyName()).resolve(path), + appLayout.launchersDirectory().resolve(name + ".exe"), + workDir); + } + + private static Collection expectLauncherShortcuts(JPackageCommand cmd, + Optional predefinedAppImage, String launcherName) { + Objects.requireNonNull(cmd); + Objects.requireNonNull(predefinedAppImage); + + final List shortcuts = new ArrayList<>(); + + final var winMenu = WIN_START_MENU_SHORTCUT.expectShortcut(cmd, predefinedAppImage, launcherName); + final var desktop = WIN_DESKTOP_SHORTCUT.expectShortcut(cmd, predefinedAppImage, launcherName); + + final var isUserLocalInstall = WindowsHelper.isUserLocalInstall(cmd); + + final SpecialFolder installRoot; + if (isUserLocalInstall) { + installRoot = SpecialFolder.LOCAL_APPLICATION_DATA; + } else { + installRoot = SpecialFolder.PROGRAM_FILES; + } + + final var installDir = Path.of(installRoot.getMsiPropertyName()).resolve(getInstallationSubDirectory(cmd)); + + final Function workDir = startupDirectory -> { + return installDir; + }; + + if (winMenu.isPresent()) { + ShortcutType type; + if (isUserLocalInstall) { + type = ShortcutType.USER_START_MENU; + } else { + type = ShortcutType.COMMON_START_MENU; + } + shortcuts.add(createLauncherShortcutSpec(cmd, launcherName, installRoot, winMenu.map(workDir).orElseThrow(), type)); + } + + if (desktop.isPresent()) { + ShortcutType type; + if (isUserLocalInstall) { + type = ShortcutType.USER_DESKTOP; + } else { + type = ShortcutType.COMMON_DESKTOP; + } + shortcuts.add(createLauncherShortcutSpec(cmd, launcherName, installRoot, desktop.map(workDir).orElseThrow(), type)); + } + + return shortcuts; + } + + private static Map> expectShortcuts(JPackageCommand cmd) { + Map> expectedShortcuts = new HashMap<>(); + + var predefinedAppImage = Optional.ofNullable(cmd.getArgumentValue("--app-image")).map(Path::of).map(AppImageFile::load); + + predefinedAppImage.map(v -> { + return v.launchers().keySet().stream(); + }).orElseGet(() -> { + return Stream.concat(Stream.of(cmd.name()), cmd.addLauncherNames().stream()); + }).forEach(launcherName -> { + var shortcuts = expectLauncherShortcuts(cmd, predefinedAppImage, launcherName); + if (!shortcuts.isEmpty()) { + expectedShortcuts.put(launcherName, shortcuts); + } + }); + + return expectedShortcuts; + } + + private static InvokeShortcutSpec convert(JPackageCommand cmd, String launcherName, Shortcut shortcut) { + LauncherShortcut launcherShortcut; + if (Stream.of(ShortcutType.COMMON_START_MENU, ShortcutType.USER_START_MENU).anyMatch(type -> { + return shortcut.path().startsWith(Path.of(type.rootFolder().getMsiPropertyName())); + })) { + launcherShortcut = WIN_START_MENU_SHORTCUT; + } else { + launcherShortcut = WIN_DESKTOP_SHORTCUT; + } + + var isUserLocalInstall = WindowsHelper.isUserLocalInstall(cmd); + return new InvokeShortcutSpec.Stub( + launcherName, + launcherShortcut, + Optional.of(resolvePath(shortcut.workDir(), !isUserLocalInstall)), + List.of("cmd", "/c", "start", "/wait", PathUtils.addSuffix(resolvePath(shortcut.path(), !isUserLocalInstall), ".lnk").toString())); + } + + + private static final Comparator SHORTCUT_COMPARATOR = Comparator.comparing(Shortcut::target) + .thenComparing(Comparator.comparing(Shortcut::path)) + .thenComparing(Comparator.comparing(Shortcut::workDir)); +} diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WindowsHelper.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WindowsHelper.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WindowsHelper.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WindowsHelper.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,19 +26,24 @@ import static jdk.jpackage.internal.util.function.ThrowingSupplier.toSupplier; import java.io.IOException; +import java.io.UncheckedIOException; +import java.lang.ref.SoftReference; import java.lang.reflect.Method; import java.nio.file.Files; import java.nio.file.Path; +import java.time.Instant; +import java.util.Collection; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.NoSuchElementException; import java.util.Objects; import java.util.Optional; +import java.util.Properties; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.regex.Matcher; import java.util.regex.Pattern; -import java.util.stream.Collectors; import java.util.stream.Stream; import jdk.jpackage.internal.util.function.ThrowingRunnable; import jdk.jpackage.test.PackageTest.PackageHandlers; @@ -63,7 +68,7 @@ return PROGRAM_FILES; } - private static Path getInstallationSubDirectory(JPackageCommand cmd) { + static Path getInstallationSubDirectory(JPackageCommand cmd) { cmd.verifyIsOfType(PackageType.WINDOWS); return Path.of(cmd.getArgumentValue("--install-dir", cmd::name)); } @@ -263,22 +268,22 @@ } } - static void verifyDesktopIntegration(JPackageCommand cmd, - String launcherName) { - new DesktopIntegrationVerifier(cmd, launcherName); + static void verifyDeployedDesktopIntegration(JPackageCommand cmd, boolean installed) { + WinShortcutVerifier.verifyDeployedShortcuts(cmd, installed); + DesktopIntegrationVerifier.verify(cmd, installed); } public static String getMsiProperty(JPackageCommand cmd, String propertyName) { cmd.verifyIsOfType(PackageType.WIN_MSI); - return Executor.of("cscript.exe", "//Nologo") - .addArgument(TKit.TEST_SRC_ROOT.resolve("resources/query-msi-property.js")) - .addArgument(cmd.outputBundle()) - .addArgument(propertyName) - .dumpOutput() - .executeAndGetOutput().stream().collect(Collectors.joining("\n")); + return MsiDatabaseCache.INSTANCE.findProperty(cmd.outputBundle(), propertyName).orElseThrow(); } - public static String getExecutableDesciption(Path pathToExeFile) { + static Collection getMsiShortcuts(JPackageCommand cmd) { + cmd.verifyIsOfType(PackageType.WIN_MSI); + return MsiDatabaseCache.INSTANCE.listShortcuts(cmd.outputBundle()); + } + + public static String getExecutableDescription(Path pathToExeFile) { Executor exec = Executor.of("powershell", "-NoLogo", "-NoProfile", @@ -386,7 +391,7 @@ } } - private static boolean isUserLocalInstall(JPackageCommand cmd) { + static boolean isUserLocalInstall(JPackageCommand cmd) { return cmd.hasArgument("--win-per-user-install"); } @@ -394,141 +399,42 @@ return path.toString().length() > WIN_MAX_PATH; } + private static class DesktopIntegrationVerifier { - DesktopIntegrationVerifier(JPackageCommand cmd, String launcherName) { + static void verify(JPackageCommand cmd, boolean installed) { cmd.verifyIsOfType(PackageType.WINDOWS); - - name = Optional.ofNullable(launcherName).orElseGet(cmd::name); - - isUserLocalInstall = isUserLocalInstall(cmd); - - appInstalled = cmd.appLauncherPath(launcherName).toFile().exists(); - - desktopShortcutPath = Path.of(name + ".lnk"); - - startMenuShortcutPath = Path.of(cmd.getArgumentValue( - "--win-menu-group", () -> "Unknown"), name + ".lnk"); - - if (name.equals(cmd.name())) { - isWinMenu = cmd.hasArgument("--win-menu"); - isDesktop = cmd.hasArgument("--win-shortcut"); - } else { - var props = AdditionalLauncher.getAdditionalLauncherProperties(cmd, - launcherName); - isWinMenu = props.getPropertyBooleanValue("win-menu").orElseGet( - () -> cmd.hasArgument("--win-menu")); - isDesktop = props.getPropertyBooleanValue("win-shortcut").orElseGet( - () -> cmd.hasArgument("--win-shortcut")); - } - - verifyStartMenuShortcut(); - - verifyDesktopShortcut(); - - Stream.of(cmd.getAllArgumentValues("--file-associations")).map( - Path::of).forEach(this::verifyFileAssociationsRegistry); - } - - private void verifyDesktopShortcut() { - if (isDesktop) { - if (isUserLocalInstall) { - verifyUserLocalDesktopShortcut(appInstalled); - verifySystemDesktopShortcut(false); - } else { - verifySystemDesktopShortcut(appInstalled); - verifyUserLocalDesktopShortcut(false); - } - } else { - verifySystemDesktopShortcut(false); - verifyUserLocalDesktopShortcut(false); - } - } - - private void verifyShortcut(Path path, boolean exists) { - if (exists) { - TKit.assertFileExists(path); - } else { - TKit.assertPathExists(path, false); - } - } - - private void verifySystemDesktopShortcut(boolean exists) { - Path dir = SpecialFolder.COMMON_DESKTOP.getPath(); - verifyShortcut(dir.resolve(desktopShortcutPath), exists); - } - - private void verifyUserLocalDesktopShortcut(boolean exists) { - Path dir = SpecialFolder.USER_DESKTOP.getPath(); - verifyShortcut(dir.resolve(desktopShortcutPath), exists); - } - - private void verifyStartMenuShortcut() { - if (isWinMenu) { - if (isUserLocalInstall) { - verifyUserLocalStartMenuShortcut(appInstalled); - verifySystemStartMenuShortcut(false); - } else { - verifySystemStartMenuShortcut(appInstalled); - verifyUserLocalStartMenuShortcut(false); - } - } else { - verifySystemStartMenuShortcut(false); - verifyUserLocalStartMenuShortcut(false); - } - } - - private void verifyStartMenuShortcut(Path shortcutsRoot, boolean exists) { - Path shortcutPath = shortcutsRoot.resolve(startMenuShortcutPath); - verifyShortcut(shortcutPath, exists); - if (!exists) { - final var parentDir = shortcutPath.getParent(); - if (Files.isDirectory(parentDir)) { - TKit.assertDirectoryNotEmpty(parentDir); - } else { - TKit.assertPathExists(parentDir, false); - } + for (var faFile : cmd.getAllArgumentValues("--file-associations")) { + verifyFileAssociationsRegistry(Path.of(faFile), installed); } } - private void verifySystemStartMenuShortcut(boolean exists) { - verifyStartMenuShortcut(SpecialFolder.COMMON_START_MENU_PROGRAMS.getPath(), exists); + private static void verifyFileAssociationsRegistry(Path faFile, boolean installed) { - } + TKit.trace(String.format( + "Get file association properties from [%s] file", + faFile)); - private void verifyUserLocalStartMenuShortcut(boolean exists) { - verifyStartMenuShortcut(SpecialFolder.USER_START_MENU_PROGRAMS.getPath(), exists); - } + var faProps = new Properties(); - private void verifyFileAssociationsRegistry(Path faFile) { - try { - TKit.trace(String.format( - "Get file association properties from [%s] file", - faFile)); - Map faProps = Files.readAllLines(faFile).stream().filter( - line -> line.trim().startsWith("extension=") || line.trim().startsWith( - "mime-type=")).map( - line -> { - String[] keyValue = line.trim().split("=", 2); - return Map.entry(keyValue[0], keyValue[1]); - }).collect(Collectors.toMap( - entry -> entry.getKey(), - entry -> entry.getValue())); - String suffix = faProps.get("extension"); - String contentType = faProps.get("mime-type"); + try (var reader = Files.newBufferedReader(faFile)) { + faProps.load(reader); + String suffix = faProps.getProperty("extension"); + String contentType = faProps.getProperty("mime-type"); TKit.assertNotNull(suffix, String.format( "Check file association suffix [%s] is found in [%s] property file", suffix, faFile)); TKit.assertNotNull(contentType, String.format( "Check file association content type [%s] is found in [%s] property file", contentType, faFile)); - verifyFileAssociations(appInstalled, "." + suffix, contentType); + verifyFileAssociations(installed, "." + suffix, contentType); + } catch (IOException ex) { - throw new RuntimeException(ex); + throw new UncheckedIOException(ex); } } - private void verifyFileAssociations(boolean exists, String suffix, + private static void verifyFileAssociations(boolean exists, String suffix, String contentType) { String contentTypeFromRegistry = queryRegistryValue(Path.of( "HKLM\\Software\\Classes", suffix).toString(), @@ -549,16 +455,9 @@ "Check content type in registry not found"); } } - - private final Path desktopShortcutPath; - private final Path startMenuShortcutPath; - private final boolean isUserLocalInstall; - private final boolean appInstalled; - private final boolean isWinMenu; - private final boolean isDesktop; - private final String name; } + static String queryRegistryValue(String keyPath, String valueName) { var status = Executor.of("reg", "query", keyPath, "/v", valueName) .saveOutput() @@ -611,7 +510,12 @@ CommonDesktop, Programs, - CommonPrograms; + CommonPrograms, + + ProgramFiles, + + LocalApplicationData, + ; Path getPath() { final var str = Executor.of("powershell", "-NoLogo", "-NoProfile", @@ -636,33 +540,84 @@ } } - private enum SpecialFolder { - COMMON_START_MENU_PROGRAMS(SYSTEM_SHELL_FOLDERS_REGKEY, "Common Programs", SpecialFolderDotNet.CommonPrograms), - USER_START_MENU_PROGRAMS(USER_SHELL_FOLDERS_REGKEY, "Programs", SpecialFolderDotNet.Programs), + enum SpecialFolder { + COMMON_START_MENU_PROGRAMS( + SYSTEM_SHELL_FOLDERS_REGKEY, + "Common Programs", + "ProgramMenuFolder", + SpecialFolderDotNet.CommonPrograms), + USER_START_MENU_PROGRAMS( + USER_SHELL_FOLDERS_REGKEY, + "Programs", + "ProgramMenuFolder", + SpecialFolderDotNet.Programs), + + COMMON_DESKTOP( + SYSTEM_SHELL_FOLDERS_REGKEY, + "Common Desktop", + "DesktopFolder", + SpecialFolderDotNet.CommonDesktop), + USER_DESKTOP( + USER_SHELL_FOLDERS_REGKEY, + "Desktop", + "DesktopFolder", + SpecialFolderDotNet.Desktop), + + PROGRAM_FILES("ProgramFiles64Folder", SpecialFolderDotNet.ProgramFiles), - COMMON_DESKTOP(SYSTEM_SHELL_FOLDERS_REGKEY, "Common Desktop", SpecialFolderDotNet.CommonDesktop), - USER_DESKTOP(USER_SHELL_FOLDERS_REGKEY, "Desktop", SpecialFolderDotNet.Desktop); + LOCAL_APPLICATION_DATA("LocalAppDataFolder", SpecialFolderDotNet.LocalApplicationData), + ; - SpecialFolder(String keyPath, String valueName) { - reg = new RegValuePath(keyPath, valueName); + SpecialFolder(String keyPath, String valueName, String msiPropertyName) { + reg = Optional.of(new RegValuePath(keyPath, valueName)); alt = Optional.empty(); + this.msiPropertyName = Objects.requireNonNull(msiPropertyName); } - SpecialFolder(String keyPath, String valueName, SpecialFolderDotNet alt) { - reg = new RegValuePath(keyPath, valueName); + SpecialFolder(String keyPath, String valueName, String msiPropertyName, SpecialFolderDotNet alt) { + reg = Optional.of(new RegValuePath(keyPath, valueName)); this.alt = Optional.of(alt); + this.msiPropertyName = Objects.requireNonNull(msiPropertyName); + } + + SpecialFolder(String msiPropertyName, SpecialFolderDotNet alt) { + reg = Optional.empty(); + this.alt = Optional.of(alt); + this.msiPropertyName = Objects.requireNonNull(msiPropertyName); + } + + static Optional findMsiProperty(String pathComponent, boolean allUsers) { + Objects.requireNonNull(pathComponent); + String regPath; + if (allUsers) { + regPath = SYSTEM_SHELL_FOLDERS_REGKEY; + } else { + regPath = USER_SHELL_FOLDERS_REGKEY; + } + return Stream.of(values()) + .filter(v -> v.msiPropertyName.equals(pathComponent)) + .filter(v -> { + return v.reg.map(r -> r.keyPath().equals(regPath)).orElse(true); + }) + .findFirst(); + } + + String getMsiPropertyName() { + return msiPropertyName; } Path getPath() { - return CACHE.computeIfAbsent(this, k -> reg.findValue().map(Path::of).orElseGet(() -> { + return CACHE.computeIfAbsent(this, k -> reg.flatMap(RegValuePath::findValue).map(Path::of).orElseGet(() -> { return alt.map(SpecialFolderDotNet::getPath).orElseThrow(() -> { return new NoSuchElementException(String.format("Failed to find path to %s folder", name())); }); })); } - private final RegValuePath reg; + private final Optional reg; private final Optional alt; + // One of "System Folder Properties" from https://learn.microsoft.com/en-us/windows/win32/msi/property-reference + private final String msiPropertyName; private static final Map CACHE = new ConcurrentHashMap<>(); } @@ -693,6 +648,63 @@ private static final ShortPathUtils INSTANCE = new ShortPathUtils(); } + + private static final class MsiDatabaseCache { + + Optional findProperty(Path msiPath, String propertyName) { + return ensureTables(msiPath, MsiDatabase.Table.FIND_PROPERTY_REQUIRED_TABLES).findProperty(propertyName); + } + + Collection listShortcuts(Path msiPath) { + return ensureTables(msiPath, MsiDatabase.Table.LIST_SHORTCUTS_REQUIRED_TABLES).listShortcuts(); + } + + MsiDatabase ensureTables(Path msiPath, Set tableNames) { + Objects.requireNonNull(msiPath); + try { + synchronized (items) { + var value = Optional.ofNullable(items.get(msiPath)).map(SoftReference::get).orElse(null); + if (value != null) { + var lastModifiedTime = Files.getLastModifiedTime(msiPath).toInstant(); + if (lastModifiedTime.isAfter(value.timestamp())) { + value = null; + } else { + tableNames = Comm.compare(value.db().tableNames(), tableNames).unique2(); + } + } + + if (!tableNames.isEmpty()) { + var idtOutputDir = TKit.createTempDirectory("msi-db"); + var db = MsiDatabase.load(msiPath, idtOutputDir, tableNames); + if (value != null) { + value = new MsiDatabaseWithTimestamp(db.append(value.db()), value.timestamp()); + } else { + value = new MsiDatabaseWithTimestamp(db, Files.getLastModifiedTime(msiPath).toInstant()); + } + items.put(msiPath, new SoftReference<>(value)); + } + + return value.db(); + } + } catch (IOException ex) { + throw new UncheckedIOException(ex); + } + } + + private record MsiDatabaseWithTimestamp(MsiDatabase db, Instant timestamp) { + + MsiDatabaseWithTimestamp { + Objects.requireNonNull(db); + Objects.requireNonNull(timestamp); + } + } + + private final Map> items = new HashMap<>(); + + static final MsiDatabaseCache INSTANCE = new MsiDatabaseCache(); + } + + static final Set CRITICAL_RUNTIME_FILES = Set.of(Path.of( "bin\\server\\jvm.dll")); diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/junit/share/jdk.jpackage/jdk/jpackage/internal/util/PListReaderTest.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/junit/share/jdk.jpackage/jdk/jpackage/internal/util/PListReaderTest.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/junit/share/jdk.jpackage/jdk/jpackage/internal/util/PListReaderTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/junit/share/jdk.jpackage/jdk/jpackage/internal/util/PListReaderTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -32,14 +32,18 @@ import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.NoSuchElementException; import java.util.Objects; import java.util.Optional; import java.util.function.BiFunction; +import java.util.stream.Stream; import javax.xml.parsers.ParserConfigurationException; +import jdk.jpackage.internal.util.PListReader.Raw; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; +import org.junit.jupiter.params.provider.EnumSource.Mode; import org.junit.jupiter.params.provider.MethodSource; import org.w3c.dom.Node; import org.xml.sax.InputSource; @@ -51,7 +55,23 @@ enum QueryType { STRING(PListReader::queryValue), BOOLEAN(PListReader::queryBoolValue), - STRING_ARRAY(PListReader::queryArrayValue); + DICT((plistReader, keyName) -> { + return plistReader.queryDictValue(keyName).toMap(true); + }), + STRING_ARRAY(PListReader::queryStringArrayValue), + RAW_ARRAY((plistReader, keyName) -> { + return plistReader.queryArrayValue(keyName, false).toList(); + }), + RAW_ARRAY_RECURSIVE((plistReader, keyName) -> { + return plistReader.queryArrayValue(keyName, true).toList(); + }), + TO_MAP((plistReader, _) -> { + return plistReader.toMap(false); + }), + TO_MAP_RECURSIVE((plistReader, _) -> { + return plistReader.toMap(true); + }), + ; QueryType(BiFunction queryMethod) { this.queryMethod = Objects.requireNonNull(queryMethod); @@ -65,10 +85,10 @@ private final BiFunction queryMethod; } - public record QueryValueTestSpec(QueryType queryType, String keyName, Optional expectedValue, + public record TestSpec(QueryType queryType, Optional keyName, Optional expectedValue, Optional> expectedException, String... xml) { - public QueryValueTestSpec { + public TestSpec { Objects.requireNonNull(queryType); Objects.requireNonNull(keyName); Objects.requireNonNull(expectedValue); @@ -77,6 +97,14 @@ if (expectedValue.isEmpty() == expectedException.isEmpty()) { throw new IllegalArgumentException(); } + if (keyName.isEmpty()) { + switch (queryType) { + case TO_MAP, TO_MAP_RECURSIVE -> {} + default -> { + throw new IllegalArgumentException(); + } + } + } } static final class Builder { @@ -91,7 +119,7 @@ return this; } - Builder expectedValue(Object v) { + Builder expect(Object v) { expectedValue = v; if (v instanceof String) { queryType(QueryType.STRING); @@ -99,11 +127,13 @@ queryType(QueryType.BOOLEAN); } else if (v instanceof List) { queryType(QueryType.STRING_ARRAY); + } else if (v instanceof Map) { + queryType(QueryType.DICT); } return this; } - Builder expectedException(Class v) { + Builder expectException(Class v) { expectedException = v; return this; } @@ -113,8 +143,11 @@ return this; } - QueryValueTestSpec create() { - return new QueryValueTestSpec(queryType, keyName, Optional.ofNullable(expectedValue), + TestSpec create() { + return new TestSpec( + queryType, + Optional.ofNullable(keyName), + Optional.ofNullable(expectedValue), validatedExpectedException(), xml); } @@ -137,12 +170,12 @@ final var plistReader = new PListReader(createXml(xml)); expectedValue.ifPresent(v -> { - final var actualValue = queryType.queryValue(plistReader, keyName); + final var actualValue = queryType.queryValue(plistReader, keyName.orElse(null)); assertEquals(v, actualValue); }); expectedException.ifPresent(v -> { - assertThrows(v, () -> queryType.queryValue(plistReader, keyName)); + assertThrows(v, () -> queryType.queryValue(plistReader, keyName.orElse(null))); }); } @@ -150,7 +183,9 @@ public String toString() { final var sb = new StringBuilder(); sb.append(queryType); - sb.append("; key=").append(keyName); + if (keyName != null) { + sb.append("; key=").append(keyName); + } expectedValue.ifPresent(v -> { sb.append("; expected="); sb.append(v); @@ -166,13 +201,13 @@ } @ParameterizedTest - @EnumSource(QueryType.class) + @EnumSource(mode = Mode.MATCH_NONE, names = {"TO_MAP.*"}) public void testNoSuchElement(QueryType queryType) { testSpec(queryType).create().test(); } @ParameterizedTest - @EnumSource(QueryType.class) + @EnumSource(mode = Mode.MATCH_NONE, names = {"TO_MAP.*"}) public void testWrongValueType(QueryType queryType) { final var builder = testSpec(queryType).xml( "string-key", @@ -182,33 +217,56 @@ "boolean-false-key", "", "array-key", - "b"); + "b", + "dict-key", + "nested-dict-key345"); - List testSpecs = new ArrayList<>(); + List testSpecs = new ArrayList<>(); switch (queryType) { case STRING -> { testSpecs.add(builder.keyName("boolean-true-key").create()); testSpecs.add(builder.keyName("boolean-false-key").create()); testSpecs.add(builder.keyName("array-key").create()); + testSpecs.add(builder.keyName("dict-key").create()); } case BOOLEAN -> { testSpecs.add(builder.keyName("string-key").create()); testSpecs.add(builder.keyName("array-key").create()); + testSpecs.add(builder.keyName("dict-key").create()); + } + case STRING_ARRAY, RAW_ARRAY, RAW_ARRAY_RECURSIVE -> { + testSpecs.add(builder.keyName("string-key").create()); + testSpecs.add(builder.keyName("boolean-true-key").create()); + testSpecs.add(builder.keyName("boolean-false-key").create()); + testSpecs.add(builder.keyName("dict-key").create()); } - case STRING_ARRAY -> { + case DICT -> { testSpecs.add(builder.keyName("string-key").create()); testSpecs.add(builder.keyName("boolean-true-key").create()); testSpecs.add(builder.keyName("boolean-false-key").create()); + testSpecs.add(builder.keyName("array-key").create()); + } + case TO_MAP, TO_MAP_RECURSIVE -> { + throw new UnsupportedOperationException(); } } - testSpecs.forEach(QueryValueTestSpec::test); + testSpecs.forEach(TestSpec::test); + + builder.keyName(null).expect(Map.of( + "string-key", new Raw("a", Raw.Type.STRING), + "boolean-true-key", new Raw(Boolean.TRUE.toString(), Raw.Type.BOOLEAN), + "boolean-false-key", new Raw(Boolean.FALSE.toString(), Raw.Type.BOOLEAN), + "array-key", List.of(new Raw("b", Raw.Type.STRING)), + "dict-key", Map.of("nested-dict-key", new Raw("345", Raw.Type.INTEGER)) + )).queryType(QueryType.TO_MAP_RECURSIVE).create().test(); + } @ParameterizedTest @MethodSource - public void testQueryValue(QueryValueTestSpec testSpec) { + public void test(TestSpec testSpec) { testSpec.test(); } @@ -219,28 +277,190 @@ assertEquals("A", actualValue); } - private static List testQueryValue() { - return List.of( - testSpec().expectedValue("A").xml("fooA").create(), - testSpec().expectedValue("").xml("foo").create(), - testSpec().xml("foo").create(), - testSpec().expectedValue(Boolean.TRUE).xml("foo").create(), - testSpec().expectedValue(Boolean.FALSE).xml("foo").create(), - testSpec(QueryType.BOOLEAN).xml("foo").create(), - testSpec(QueryType.BOOLEAN).xml("foo").create(), - testSpec().expectedValue(List.of("foo", "bar")).xml("foofoobar").create(), - testSpec().expectedValue(List.of()).xml("foo").create(), - testSpec(QueryType.STRING_ARRAY).xml("foo").create(), - testSpec().expectedValue("A").xml("fooAB").create(), - testSpec().expectedValue("A").xml("fooAfooB").create() + @Test + public void test_toMap() { + + var builder = testSpec(); + + builder.xml( + "AppName", + "Hello", + "", + "AppVersion", + "1.0", + "Release", + "", + "Debug", + "", + "ReleaseDate", + "2025-09-24T09:23:00Z", + "UserData", + "", + "", + " Foo", + " ", + " Str", + " ", + " Another Str", + " ", + " ", + " ", + " ", + "", + "Checksum", + "7841ff0076cdde93bdca02cfd332748c40620ce4", + "Plugins", + "", + " ", + " PluginName", + " Foo", + " Priority", + " 13", + " History", + " ", + " New File", + " Another New File", + " ", + " ", + " ", + " PluginName", + " Bar", + " Priority", + " 23", + " History", + " ", + " ", + "" + ); + + var expected = Map.of( + "AppName", new Raw("Hello", Raw.Type.STRING), + "AppVersion", new Raw("1.0", Raw.Type.REAL), + "Release", new Raw(Boolean.TRUE.toString(), Raw.Type.BOOLEAN), + "Debug", new Raw(Boolean.FALSE.toString(), Raw.Type.BOOLEAN), + "ReleaseDate", new Raw("2025-09-24T09:23:00Z", Raw.Type.DATE), + "Checksum", new Raw("7841ff0076cdde93bdca02cfd332748c40620ce4", Raw.Type.DATA), + "UserData", Map.of( + "Foo", List.of( + new Raw("Str", Raw.Type.STRING), + List.of( + new Raw("Another Str", Raw.Type.STRING), + new Raw(Boolean.TRUE.toString(), Raw.Type.BOOLEAN), + new Raw(Boolean.FALSE.toString(), Raw.Type.BOOLEAN) + ) + ) + ), + "Plugins", List.of( + Map.of( + "PluginName", new Raw("Foo", Raw.Type.STRING), + "Priority", new Raw("13", Raw.Type.INTEGER), + "History", List.of( + new Raw("New File", Raw.Type.STRING), + new Raw("Another New File", Raw.Type.STRING) + ) + ), + Map.of( + "PluginName", new Raw("Bar", Raw.Type.STRING), + "Priority", new Raw("23", Raw.Type.REAL), + "History", List.of() + ) + ) ); + + builder.expect(expected).queryType(QueryType.TO_MAP_RECURSIVE).create().test(); + } + + private static List test() { + + List data = new ArrayList<>(); + + Stream.of( + testSpec().expect("A").xml("fooA"), + testSpec().expect("A").xml("BfooA"), + testSpec().expect("").xml("foo some text "), + testSpec().xml("foo"), + testSpec().xml("foo"), + testSpec().xml("fooA"), + testSpec().expect(Boolean.TRUE).xml("foo"), + testSpec().expect(Boolean.FALSE).xml("foo"), + testSpec(QueryType.BOOLEAN).xml("foo"), + testSpec(QueryType.BOOLEAN).xml("foo"), + testSpec().expect(List.of("foo", "bar")).xml("foofoobar"), + testSpec().expect(List.of()).xml("foo"), + testSpec(QueryType.STRING_ARRAY).xml("foo"), + testSpec().expect("A").xml("fooAB"), + testSpec().expect("A").xml("fooAfooB"), + + testSpec().expect(Map.of()).xml("foo"), + + // + // Test that if there are multiple keys with the same name, all but the first are ignored. + // + testSpec().expect("A").xml("fooAfooBfooC"), + testSpec().expect("A").xml("fooAfooB"), + testSpec(QueryType.STRING).xml("fooBfooA"), + testSpec().expect(Boolean.TRUE).xml("foofoo"), + testSpec().expect(Boolean.TRUE).xml("foofoo"), + testSpec(QueryType.BOOLEAN).xml("foofoo"), + + // + // Test that it doesn't look up keys in nested "dict" or "array" elements. + // + testSpec().xml("foofooA"), + testSpec().expect("B").xml("barfooAfooB"), + testSpec().xml("foofooA"), + testSpec().expect("B").xml("barfooAfooB"), + + // + // Test empty arrays. + // + testSpec().expect(List.of()).queryType(QueryType.RAW_ARRAY_RECURSIVE).xml("foo"), + testSpec().expect(List.of()).queryType(QueryType.RAW_ARRAY).xml("foo") + + ).map(TestSpec.Builder::create).forEach(data::add); + + // + // Test toMap() method. + // + Stream.of( + testSpec().expect(Map.of()).xml(), + testSpec().expect(Map.of()).xml("foobar"), + testSpec().expect(Map.of()).xml("Abar"), + testSpec().expect(Map.of()).xml("A"), + testSpec().expect(Map.of()).xml("fooA"), + testSpec().expect(Map.of("foo", new Raw("A", Raw.Type.STRING))).xml("fooAB"), + testSpec().expect(Map.of("foo", new Raw("A", Raw.Type.STRING))).xml("fooA hello foo bye B"), + testSpec().expect(Map.of("foo", new Raw("A", Raw.Type.STRING), "Foo", new Raw("B", Raw.Type.STRING))).xml("fooAFooB") + ).map(builder -> { + return builder.queryType(QueryType.TO_MAP_RECURSIVE); + }).map(TestSpec.Builder::create).forEach(data::add); + + var arrayTestSpec = testSpec().expect(List.of( + new Raw("Hello", Raw.Type.STRING), + Map.of("foo", new Raw("Bye", Raw.Type.STRING)), + new Raw("integer", Raw.Type.INTEGER), + Map.of(), + new Raw(Boolean.TRUE.toString(), Raw.Type.BOOLEAN) + )).queryType(QueryType.RAW_ARRAY_RECURSIVE); + + Stream.of( + "HellofooByeinteger", + "HelloBingofooByeinteger", + "BHellofooByeByeeeinteger", + "HellobarfooByeinteger", + "HellofooByefooByeByeinteger" + ).map(xml -> { + return "foo" + xml + ""; + }).map(arrayTestSpec::xml).map(TestSpec.Builder::create).forEach(data::add); + + return data; } - private static QueryValueTestSpec.Builder testSpec() { - return new QueryValueTestSpec.Builder(); + private static TestSpec.Builder testSpec() { + return new TestSpec.Builder(); } - private static QueryValueTestSpec.Builder testSpec(QueryType queryType) { + private static TestSpec.Builder testSpec(QueryType queryType) { return testSpec().queryType(queryType); } @@ -248,7 +468,9 @@ final List content = new ArrayList<>(); content.add(""); content.add(""); + content.add(""); content.addAll(List.of(xml)); + content.add(""); content.add(""); return String.join("", content.toArray(String[]::new)); } diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/linux/UpgradeTest.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/linux/UpgradeTest.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/linux/UpgradeTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/linux/UpgradeTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -60,16 +60,16 @@ var alA = createAdditionalLauncher("launcherA"); alA.applyTo(pkg); - createAdditionalLauncher("launcherB").addRawProperties(Map.entry( - "description", "Foo")).applyTo(pkg); + createAdditionalLauncher("launcherB").setProperty( + "description", "Foo").applyTo(pkg); var pkg2 = createPackageTest().addInitializer(cmd -> { cmd.addArguments("--app-version", "2.0"); }); alA.verifyRemovedInUpgrade(pkg2); - createAdditionalLauncher("launcherB").addRawProperties(Map.entry( - "description", "Bar")).applyTo(pkg2); + createAdditionalLauncher("launcherB").setProperty( + "description", "Bar").applyTo(pkg2); createAdditionalLauncher("launcherC").applyTo(pkg2); new PackageTest.Group(pkg, pkg2).run(); @@ -88,6 +88,6 @@ return new AdditionalLauncher(name).setIcon(GOLDEN_ICON); } - private final static Path GOLDEN_ICON = TKit.TEST_SRC_ROOT.resolve(Path.of( + private static final Path GOLDEN_ICON = TKit.TEST_SRC_ROOT.resolve(Path.of( "resources", "icon" + TKit.ICON_SUFFIX)); } diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/macosx/MacFileAssociationsTest.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/macosx/MacFileAssociationsTest.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/macosx/MacFileAssociationsTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/macosx/MacFileAssociationsTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -21,15 +21,16 @@ * questions. */ +import static java.util.Map.entry; + import java.nio.file.Path; import java.util.List; import java.util.Map; -import static java.util.Map.entry; -import jdk.jpackage.test.JPackageCommand; -import jdk.jpackage.test.TKit; -import jdk.jpackage.test.MacHelper; import jdk.jpackage.internal.util.PListReader; import jdk.jpackage.test.Annotations.Test; +import jdk.jpackage.test.JPackageCommand; +import jdk.jpackage.test.MacHelper; +import jdk.jpackage.test.TKit; /** * Tests generation of app image with --file-associations and mac additional file @@ -80,21 +81,26 @@ "Check value of %s plist key", key)); } - private static void checkBoolValue(PListReader plist, String key, Boolean value) { - Boolean result = plist.queryBoolValue(key); - TKit.assertEquals(value.toString(), result.toString(), String.format( + private static void checkBoolValue(PListReader plist, String key, boolean value) { + boolean result = plist.queryBoolValue(key); + TKit.assertEquals(value, result, String.format( "Check value of %s plist key", key)); } private static void checkArrayValue(PListReader plist, String key, List values) { - List result = plist.queryArrayValue(key); + List result = plist.queryStringArrayValue(key); TKit.assertStringListEquals(values, result, String.format( "Check value of %s plist key", key)); } private static void verifyPList(Path appImage) throws Exception { - var plist = MacHelper.readPListFromAppImage(appImage); + final var rootPlist = MacHelper.readPListFromAppImage(appImage); + + TKit.traceFileContents(appImage.resolve("Contents/Info.plist"), "Info.plist"); + + var plist = rootPlist.queryArrayValue("CFBundleDocumentTypes", false).findFirst().map(PListReader.class::cast).orElseThrow(); + checkStringValue(plist, "CFBundleTypeRole", "Viewer"); checkStringValue(plist, "LSHandlerRank", "Default"); checkStringValue(plist, "NSDocumentClass", "SomeClass"); @@ -103,10 +109,13 @@ checkBoolValue(plist, "LSSupportsOpeningDocumentsInPlace", false); checkBoolValue(plist, "UISupportsDocumentBrowser", false); - checkArrayValue(plist, "NSExportableTypes", List.of("public.png", - "public.jpg")); + plist = rootPlist.queryArrayValue("UTExportedTypeDeclarations", false).findFirst().map(PListReader.class::cast).orElseThrow(); + + checkArrayValue(plist, "UTTypeConformsTo", List.of("public.image", "public.data")); + + plist = plist.queryDictValue("UTTypeTagSpecification"); + + checkArrayValue(plist, "NSExportableTypes", List.of("public.png", "public.jpg")); - checkArrayValue(plist, "UTTypeConformsTo", List.of("public.image", - "public.data")); } } diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/macosx/MacSignTest.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/macosx/MacSignTest.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/macosx/MacSignTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/macosx/MacSignTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -160,6 +160,7 @@ @Test @ParameterSupplier + @ParameterSupplier("testSelectSigningIdentity_JDK_8371094") public static void testSelectSigningIdentity(String signingKeyUserName, CertificateRequest certRequest) { final var keychain = SigningBase.StandardKeychain.MAIN.spec().keychain(); @@ -187,6 +188,12 @@ }).toList(); } + public static Collection testSelectSigningIdentity_JDK_8371094() { + return List.of(new Object[] { + "ACME Technologies Limited", SigningBase.StandardCertificateRequest.CODESIGN_ACME_TECH_LTD.spec() + }); + } + enum SignOption { EXPIRED_SIGNING_KEY_USER_NAME("--mac-signing-key-user-name", SigningBase.StandardCertificateRequest.CODESIGN_EXPIRED.spec(), true, false), EXPIRED_SIGNING_KEY_USER_NAME_PKG("--mac-signing-key-user-name", SigningBase.StandardCertificateRequest.PKG_EXPIRED.spec(), true, false), diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/macosx/base/SigningBase.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/macosx/base/SigningBase.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/macosx/base/SigningBase.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/macosx/base/SigningBase.java 2025-12-18 08:04:02.000000000 +0000 @@ -68,6 +68,7 @@ public enum StandardCertificateRequest { CODESIGN(cert().userName(DEV_NAMES[CertIndex.ASCII_INDEX.value()])), CODESIGN_COPY(cert().days(100).userName(DEV_NAMES[CertIndex.ASCII_INDEX.value()])), + CODESIGN_ACME_TECH_LTD(cert().days(100).userName("ACME Technologies Limited (ABC12345)")), PKG(cert().type(CertificateType.INSTALLER).userName(DEV_NAMES[CertIndex.ASCII_INDEX.value()])), PKG_COPY(cert().type(CertificateType.INSTALLER).days(100).userName(DEV_NAMES[CertIndex.ASCII_INDEX.value()])), CODESIGN_UNICODE(cert().userName(DEV_NAMES[CertIndex.UNICODE_INDEX.value()])), @@ -95,7 +96,8 @@ StandardCertificateRequest.CODESIGN, StandardCertificateRequest.PKG, StandardCertificateRequest.CODESIGN_UNICODE, - StandardCertificateRequest.PKG_UNICODE), + StandardCertificateRequest.PKG_UNICODE, + StandardCertificateRequest.CODESIGN_ACME_TECH_LTD), EXPIRED("jpackagerTest-expired.keychain", StandardCertificateRequest.CODESIGN, StandardCertificateRequest.PKG, diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/resources/Win8365790Test.ps1 openjdk-25-25.0.2+10/test/jdk/tools/jpackage/resources/Win8365790Test.ps1 --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/resources/Win8365790Test.ps1 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/resources/Win8365790Test.ps1 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,83 @@ +# +# 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. +# + +param ( + # Path to executable to start. + [Parameter(Mandatory=$true)] + [string]$Executable, + + # Timeout to wait after the executable has been started. + [Parameter(Mandatory=$true)] + [double]$TimeoutSeconds +) + +$type = @{ + TypeDefinition = @' +using System; +using System.Runtime.InteropServices; + +namespace Stuff { + + internal struct Details { + [DllImport("kernel32.dll", SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + internal static extern bool GenerateConsoleCtrlEvent(uint dwCtrlEvent, uint dwProcessGroupId); + } + + public struct Facade { + public static void GenerateConsoleCtrlEvent() { + if (!Details.GenerateConsoleCtrlEvent(0, 0)) { + reportLastErrorAndExit("GenerateConsoleCtrlEvent"); + } + } + + internal static void reportLastErrorAndExit(String func) { + int errorCode = Marshal.GetLastWin32Error(); + Console.Error.WriteLine(func + " function failed with error code: " + errorCode); + Environment.Exit(100); + } + } +} +'@ +} +Add-Type @type + +Set-PSDebug -Trace 2 + +# Launch the target executable. +# `-NoNewWindow` parameter will attach the started process to the existing console. +$childProc = Start-Process -PassThru -NoNewWindow $Executable + +# Wait a bit to let the started process complete initialization. +Start-Sleep -Seconds $TimeoutSeconds + +# Call GenerateConsoleCtrlEvent to send a CTRL+C event to the launched executable. +# CTRL+C event will be sent to all processes attached to the console of the current process, +# i.e., it will be sent to this PowerShell process and to the started $Executable process because +# it was configured to attach to the existing console (the console of this PowerShell process). +[Stuff.Facade]::GenerateConsoleCtrlEvent() + +# Wait for child process termination +Wait-Process -InputObject $childProc + +Exit 0 diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/resources/msi-export.js openjdk-25-25.0.2+10/test/jdk/tools/jpackage/resources/msi-export.js --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/resources/msi-export.js 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/resources/msi-export.js 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,81 @@ +/* + * 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. + */ + + +function readMsi(msiPath, callback) { + var installer = new ActiveXObject('WindowsInstaller.Installer') + var database = installer.OpenDatabase(msiPath, 0 /* msiOpenDatabaseModeReadOnly */) + + return callback(database) +} + + +function exportTables(db, outputDir, requestedTableNames) { + var tables = {} + + var view = db.OpenView("SELECT `Name` FROM _Tables") + view.Execute() + + try { + while (true) { + var record = view.Fetch() + if (!record) { + break + } + + var name = record.StringData(1) + + if (requestedTableNames.hasOwnProperty(name)) { + tables[name] = name + } + } + } finally { + view.Close() + } + + var fso = new ActiveXObject("Scripting.FileSystemObject") + for (var table in tables) { + var idtFileName = table + ".idt" + var idtFile = outputDir + "/" + idtFileName + if (fso.FileExists(idtFile)) { + WScript.Echo("Delete [" + idtFile + "]") + fso.DeleteFile(idtFile) + } + WScript.Echo("Export table [" + table + "] in [" + idtFile + "] file") + db.Export(table, fso.GetFolder(outputDir).Path, idtFileName) + } +} + + +(function () { + var msi = WScript.arguments(0) + var outputDir = WScript.arguments(1) + var tables = {} + for (var i = 0; i !== WScript.arguments.Count(); i++) { + tables[WScript.arguments(i)] = true + } + + readMsi(msi, function (db) { + exportTables(db, outputDir, tables) + }) +})() diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/resources/query-msi-property.js openjdk-25-25.0.2+10/test/jdk/tools/jpackage/resources/query-msi-property.js --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/resources/query-msi-property.js 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/resources/query-msi-property.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -/* - * Copyright (c) 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. - */ - - -function readMsi(msiPath, callback) { - var installer = new ActiveXObject('WindowsInstaller.Installer') - var database = installer.OpenDatabase(msiPath, 0 /* msiOpenDatabaseModeReadOnly */) - - return callback(database) -} - - -function queryAllProperties(db) { - var reply = {} - - var view = db.OpenView("SELECT `Property`, `Value` FROM Property") - view.Execute() - - try { - while(true) { - var record = view.Fetch() - if (!record) { - break - } - - var name = record.StringData(1) - var value = record.StringData(2) - - reply[name] = value - } - } finally { - view.Close() - } - - return reply -} - - -(function () { - var msi = WScript.arguments(0) - var propName = WScript.arguments(1) - - var props = readMsi(msi, queryAllProperties) - WScript.Echo(props[propName]) -})() diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/share/AddLShortcutTest.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/share/AddLShortcutTest.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/share/AddLShortcutTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/share/AddLShortcutTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -21,13 +21,32 @@ * questions. */ -import java.nio.file.Path; +import java.io.IOException; import java.lang.invoke.MethodHandles; -import jdk.jpackage.test.PackageTest; -import jdk.jpackage.test.FileAssociations; +import java.nio.file.Files; +import java.nio.file.Path; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import jdk.internal.util.OperatingSystem; import jdk.jpackage.test.AdditionalLauncher; -import jdk.jpackage.test.TKit; +import jdk.jpackage.test.Annotations.Parameter; +import jdk.jpackage.test.Annotations.ParameterSupplier; import jdk.jpackage.test.Annotations.Test; +import jdk.jpackage.test.FileAssociations; +import jdk.jpackage.test.JPackageCommand; +import jdk.jpackage.test.LauncherShortcut; +import jdk.jpackage.test.LauncherShortcut.InvokeShortcutSpec; +import jdk.jpackage.test.LauncherShortcut.StartupDirectory; +import jdk.jpackage.test.LauncherVerifier.Action; +import jdk.jpackage.test.LinuxHelper; +import jdk.jpackage.test.PackageTest; +import jdk.jpackage.test.RunnablePackageTest; +import jdk.jpackage.test.TKit; +import jdk.jpackage.test.WinShortcutVerifier; /** * Test --add-launcher parameter with shortcuts (platform permitting). @@ -44,9 +63,23 @@ * @key jpackagePlatformPackage * @library /test/jdk/tools/jpackage/helpers * @build jdk.jpackage.test.* + * @requires (jpackage.test.SQETest != null) * @compile -Xlint:all -Werror AddLShortcutTest.java * @run main/othervm/timeout=540 -Xmx512m * jdk.jpackage.test.Main + * --jpt-run=AddLShortcutTest.test + */ + +/* + * @test + * @summary jpackage with --add-launcher + * @key jpackagePlatformPackage + * @library /test/jdk/tools/jpackage/helpers + * @build jdk.jpackage.test.* + * @requires (jpackage.test.SQETest == null) + * @compile -Xlint:all -Werror AddLShortcutTest.java + * @run main/othervm/timeout=1080 -Xmx512m + * jdk.jpackage.test.Main * --jpt-run=AddLShortcutTest */ @@ -107,6 +140,287 @@ packageTest.run(); } + @Test(ifNotOS = OperatingSystem.MACOS) + @ParameterSupplier(ifOS = OperatingSystem.LINUX, value = "testShortcutStartupDirectoryLinux") + @ParameterSupplier(ifOS = OperatingSystem.WINDOWS, value = "testShortcutStartupDirectoryWindows") + public void testStartupDirectory(LauncherShortcutStartupDirectoryConfig... cfgs) { + + var test = new PackageTest().addInitializer(cmd -> { + cmd.setArgumentValue("--name", "AddLShortcutDirTest"); + }).addInitializer(JPackageCommand::setFakeRuntime).addHelloAppInitializer(null); + + test.addInitializer(cfgs[0]::applyToMainLauncher); + for (var i = 1; i != cfgs.length; ++i) { + var al = new AdditionalLauncher("launcher-" + i); + cfgs[i].applyToAdditionalLauncher(al); + al.withoutVerifyActions(Action.EXECUTE_LAUNCHER).applyTo(test); + } + + test.run(RunnablePackageTest.Action.CREATE_AND_UNPACK); + } + + @Test(ifNotOS = OperatingSystem.MACOS) + @ParameterSupplier(ifOS = OperatingSystem.LINUX, value = "testShortcutStartupDirectoryLinux") + @ParameterSupplier(ifOS = OperatingSystem.WINDOWS, value = "testShortcutStartupDirectoryWindows") + public void testStartupDirectory2(LauncherShortcutStartupDirectoryConfig... cfgs) { + + // + // Launcher shortcuts in the predefined app image. + // + // Shortcut configuration for the main launcher is not supported when building an app image. + // However, shortcut configuration for additional launchers is supported. + // The test configures shortcuts for additional launchers in the app image building jpackage command + // and applies shortcut configuration to the main launcher in the native packaging jpackage command. + // + + Path[] predefinedAppImage = new Path[1]; + + new PackageTest().addRunOnceInitializer(() -> { + var cmd = JPackageCommand.helloAppImage() + .setArgumentValue("--name", "foo") + .setFakeRuntime(); + + for (var i = 1; i != cfgs.length; ++i) { + var al = new AdditionalLauncher("launcher-" + i); + cfgs[i].applyToAdditionalLauncher(al); + al.withoutVerifyActions(Action.EXECUTE_LAUNCHER).applyTo(cmd); + } + + cmd.execute(); + + predefinedAppImage[0] = cmd.outputBundle(); + }).addInitializer(cmd -> { + cmd.removeArgumentWithValue("--input"); + cmd.setArgumentValue("--name", "AddLShortcutDir2Test"); + cmd.addArguments("--app-image", predefinedAppImage[0]); + cfgs[0].applyToMainLauncher(cmd); + }).run(RunnablePackageTest.Action.CREATE_AND_UNPACK); + } + + public static Collection testShortcutStartupDirectoryLinux() { + return testShortcutStartupDirectory(LauncherShortcut.LINUX_SHORTCUT); + } + + public static Collection testShortcutStartupDirectoryWindows() { + return testShortcutStartupDirectory(LauncherShortcut.WIN_DESKTOP_SHORTCUT, LauncherShortcut.WIN_START_MENU_SHORTCUT); + } + + @Test(ifNotOS = OperatingSystem.MACOS) + @Parameter(value = "DEFAULT") + public void testInvokeShortcuts(StartupDirectory startupDirectory) { + + var testApp = TKit.TEST_SRC_ROOT.resolve("apps/PrintEnv.java"); + + var name = "AddLShortcutRunTest"; + + var test = new PackageTest().addInitializer(cmd -> { + cmd.setArgumentValue("--name", name); + }).addInitializer(cmd -> { + cmd.addArguments("--arguments", "--print-workdir"); + }).addInitializer(JPackageCommand::ignoreFakeRuntime).addHelloAppInitializer(testApp + "*Hello"); + + var shortcutStartupDirectoryVerifier = new ShortcutStartupDirectoryVerifier(name, "a"); + + shortcutStartupDirectoryVerifier.applyTo(test, startupDirectory); + + test.addInstallVerifier(cmd -> { + if (!cmd.isPackageUnpacked("Not invoking launcher shortcuts")) { + Collection invokeShortcutSpecs; + if (TKit.isLinux()) { + invokeShortcutSpecs = LinuxHelper.getInvokeShortcutSpecs(cmd); + } else if (TKit.isWindows()) { + invokeShortcutSpecs = WinShortcutVerifier.getInvokeShortcutSpecs(cmd); + } else { + throw new UnsupportedOperationException(); + } + shortcutStartupDirectoryVerifier.verify(invokeShortcutSpecs); + } + }); + + test.run(); + } + + + private record ShortcutStartupDirectoryVerifier(String packageName, String launcherName) { + ShortcutStartupDirectoryVerifier { + Objects.requireNonNull(packageName); + Objects.requireNonNull(launcherName); + } + + void applyTo(PackageTest test, StartupDirectory startupDirectory) { + var al = new AdditionalLauncher(launcherName); + al.setShortcut(shortcut(), Objects.requireNonNull(startupDirectory)); + al.addJavaOptions(String.format("-Djpackage.test.appOutput=${%s}/%s", + outputDirVarName(), expectedOutputFilename())); + al.withoutVerifyActions(Action.EXECUTE_LAUNCHER).applyTo(test); + } + + void verify(Collection invokeShortcutSpecs) throws IOException { + + TKit.trace(String.format("Verify shortcut [%s]", launcherName)); + + var expectedOutputFile = Path.of(System.getenv(outputDirVarName())).resolve(expectedOutputFilename()); + + TKit.deleteIfExists(expectedOutputFile); + + var invokeShortcutSpec = invokeShortcutSpecs.stream().filter(v -> { + return launcherName.equals(v.launcherName()); + }).findAny().orElseThrow(); + + invokeShortcutSpec.execute(); + + // On Linux, "gtk-launch" is used to launch a .desktop file. It is async and there is no + // way to make it wait for exit of a process it triggers. + TKit.waitForFileCreated(expectedOutputFile, Duration.ofSeconds(10), Duration.ofSeconds(3)); + + TKit.assertFileExists(expectedOutputFile); + var actualStr = Files.readAllLines(expectedOutputFile).getFirst(); + + var outputPrefix = "$CD="; + + TKit.assertTrue(actualStr.startsWith(outputPrefix), "Check output starts with '" + outputPrefix+ "' string"); + + invokeShortcutSpec.expectedWorkDirectory().ifPresent(expectedWorkDirectory -> { + TKit.assertEquals( + expectedWorkDirectory, + Path.of(actualStr.substring(outputPrefix.length())), + String.format("Check work directory of %s of launcher [%s]", + invokeShortcutSpec.shortcut().propertyName(), + invokeShortcutSpec.launcherName())); + }); + } + + private String expectedOutputFilename() { + return String.format("%s-%s.out", packageName, launcherName); + } + + private String outputDirVarName() { + if (TKit.isLinux()) { + return "HOME"; + } else if (TKit.isWindows()) { + return "LOCALAPPDATA"; + } else { + throw new UnsupportedOperationException(); + } + } + + private LauncherShortcut shortcut() { + if (TKit.isLinux()) { + return LauncherShortcut.LINUX_SHORTCUT; + } else if (TKit.isWindows()) { + return LauncherShortcut.WIN_DESKTOP_SHORTCUT; + } else { + throw new UnsupportedOperationException(); + } + } + } + + + private static Collection testShortcutStartupDirectory(LauncherShortcut... shortcuts) { + List> items = new ArrayList<>(); + + for (var shortcut : shortcuts) { + List mainLauncherVariants = new ArrayList<>(); + for (var valueSetter : StartupDirectoryValueSetter.MAIN_LAUNCHER_VALUES) { + mainLauncherVariants.add(new LauncherShortcutStartupDirectoryConfig(shortcut, valueSetter)); + } + mainLauncherVariants.stream().map(List::of).forEach(items::add); + mainLauncherVariants.add(new LauncherShortcutStartupDirectoryConfig(shortcut)); + + List addLauncherVariants = new ArrayList<>(); + addLauncherVariants.add(new LauncherShortcutStartupDirectoryConfig(shortcut)); + for (var valueSetter : StartupDirectoryValueSetter.ADD_LAUNCHER_VALUES) { + addLauncherVariants.add(new LauncherShortcutStartupDirectoryConfig(shortcut, valueSetter)); + } + + for (var mainLauncherVariant : mainLauncherVariants) { + for (var addLauncherVariant : addLauncherVariants) { + if (mainLauncherVariant.valueSetter().isPresent() || addLauncherVariant.valueSetter().isPresent()) { + items.add(List.of(mainLauncherVariant, addLauncherVariant)); + } + } + } + } + + return items.stream().map(List::toArray).toList(); + } + + + private enum StartupDirectoryValueSetter { + DEFAULT(""), + TRUE("true"), + FALSE("false"), + ; + + StartupDirectoryValueSetter(String value) { + this.value = Objects.requireNonNull(value); + } + + void applyToMainLauncher(LauncherShortcut shortcut, JPackageCommand cmd) { + switch (this) { + case TRUE, FALSE -> { + throw new UnsupportedOperationException(); + } + case DEFAULT -> { + cmd.addArgument(shortcut.optionName()); + } + default -> { + cmd.addArguments(shortcut.optionName(), value); + } + } + } + + void applyToAdditionalLauncher(LauncherShortcut shortcut, AdditionalLauncher addLauncher) { + addLauncher.setProperty(shortcut.propertyName(), value); + } + + private final String value; + + static final List MAIN_LAUNCHER_VALUES = List.of( + StartupDirectoryValueSetter.DEFAULT + ); + + static final List ADD_LAUNCHER_VALUES = List.of( + StartupDirectoryValueSetter.TRUE, + StartupDirectoryValueSetter.FALSE + ); + } + + + record LauncherShortcutStartupDirectoryConfig(LauncherShortcut shortcut, Optional valueSetter) { + + LauncherShortcutStartupDirectoryConfig { + Objects.requireNonNull(shortcut); + Objects.requireNonNull(valueSetter); + } + + LauncherShortcutStartupDirectoryConfig(LauncherShortcut shortcut, StartupDirectoryValueSetter valueSetter) { + this(shortcut, Optional.of(valueSetter)); + } + + LauncherShortcutStartupDirectoryConfig(LauncherShortcut shortcut) { + this(shortcut, Optional.empty()); + } + + void applyToMainLauncher(JPackageCommand target) { + valueSetter.ifPresent(valueSetter -> { + valueSetter.applyToMainLauncher(shortcut, target); + }); + } + + void applyToAdditionalLauncher(AdditionalLauncher target) { + valueSetter.ifPresent(valueSetter -> { + valueSetter.applyToAdditionalLauncher(shortcut, target); + }); + } + + @Override + public String toString() { + return shortcut + "=" + valueSetter.map(Object::toString).orElse(""); + } + } + + private static final Path GOLDEN_ICON = TKit.TEST_SRC_ROOT.resolve(Path.of( "resources", "icon" + TKit.ICON_SUFFIX)); } diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/share/AddLauncherTest.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/share/AddLauncherTest.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/share/AddLauncherTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/share/AddLauncherTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -89,17 +89,17 @@ new AdditionalLauncher("Baz2") .setDefaultArguments() - .addRawProperties(Map.entry("description", "Baz2 Description")) + .setProperty("description", "Baz2 Description") .applyTo(packageTest); new AdditionalLauncher("foo") .setDefaultArguments("yep!") - .addRawProperties(Map.entry("description", "foo Description")) + .setProperty("description", "foo Description") .applyTo(packageTest); new AdditionalLauncher("Bar") .setDefaultArguments("one", "two", "three") - .addRawProperties(Map.entry("description", "Bar Description")) + .setProperty("description", "Bar Description") .setIcon(GOLDEN_ICON) .applyTo(packageTest); @@ -194,8 +194,8 @@ .toString(); new AdditionalLauncher("ModularAppLauncher") - .addRawProperties(Map.entry("module", expectedMod)) - .addRawProperties(Map.entry("main-jar", "")) + .setProperty("module", expectedMod) + .setProperty("main-jar", "") .applyTo(cmd); new AdditionalLauncher("NonModularAppLauncher") @@ -204,8 +204,8 @@ .setPersistenceHandler((path, properties) -> TKit.createTextFile(path, properties.stream().map(entry -> String.join(" ", entry.getKey(), entry.getValue())))) - .addRawProperties(Map.entry("main-class", nonModularAppDesc.className())) - .addRawProperties(Map.entry("main-jar", nonModularAppDesc.jarFileName())) + .setProperty("main-class", nonModularAppDesc.className()) + .setProperty("main-jar", nonModularAppDesc.jarFileName()) .applyTo(cmd); cmd.executeAndAssertHelloAppImageCreated(); diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/share/FileAssociationsTest.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/share/FileAssociationsTest.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/share/FileAssociationsTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/share/FileAssociationsTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -25,12 +25,14 @@ import java.nio.file.Path; import java.util.Map; +import jdk.jpackage.test.AdditionalLauncher; import jdk.jpackage.test.Annotations.Parameter; import jdk.jpackage.test.Annotations.Test; import jdk.jpackage.test.FileAssociations; import jdk.jpackage.test.JPackageCommand; import jdk.jpackage.test.PackageTest; import jdk.jpackage.test.PackageType; +import jdk.jpackage.test.RunnablePackageTest; import jdk.jpackage.test.TKit; /** @@ -64,7 +66,7 @@ * @requires jpackage.test.SQETest == null * @build jdk.jpackage.test.* * @compile -Xlint:all -Werror FileAssociationsTest.java - * @run main/othervm/timeout=540 -Xmx512m jdk.jpackage.test.Main + * @run main/othervm/timeout=1080 -Xmx512m jdk.jpackage.test.Main * --jpt-run=FileAssociationsTest */ @@ -85,7 +87,7 @@ @Parameter("true") @Parameter("false") public static void test(boolean includeDescription) { - PackageTest packageTest = new PackageTest(); + PackageTest packageTest = new PackageTest().configureHelloApp(); // Not supported packageTest.excludeTypes(PackageType.MAC_DMG); @@ -144,6 +146,34 @@ }).run(); } + @Test + @Parameter("true") + @Parameter("false") + public static void testFromAppImage(boolean withAdditionalLauncher) { + + var appImageCmd = JPackageCommand.helloAppImage(); + + if (RunnablePackageTest.hasAction(RunnablePackageTest.Action.INSTALL)) { + // Ensure launchers are executable. + appImageCmd.ignoreFakeRuntime(); + } + + if (withAdditionalLauncher) { + new AdditionalLauncher("foo").applyTo(appImageCmd); + } + + var test = new PackageTest().excludeTypes(PackageType.MAC_DMG) + .addRunOnceInitializer(appImageCmd::execute) + .addInitializer(cmd -> { + cmd.removeArgumentWithValue("--input"); + cmd.setArgumentValue("--app-image", appImageCmd.outputBundle()); + }); + + new FileAssociations("jptest3").applyTo(test); + + test.run(); + } + private static PackageTest initPackageTest() { return new PackageTest() .excludeTypes(PackageType.MAC) diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/share/PerUserCfgTest.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/share/PerUserCfgTest.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/share/PerUserCfgTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/share/PerUserCfgTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -27,13 +27,14 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import jdk.jpackage.internal.util.function.ThrowingConsumer; import jdk.jpackage.test.AdditionalLauncher; -import jdk.jpackage.test.PackageTest; import jdk.jpackage.test.Annotations.Test; -import jdk.jpackage.internal.util.function.ThrowingConsumer; import jdk.jpackage.test.HelloApp; import jdk.jpackage.test.JPackageCommand; +import jdk.jpackage.test.LauncherVerifier.Action; import jdk.jpackage.test.LinuxHelper; +import jdk.jpackage.test.PackageTest; import jdk.jpackage.test.PackageType; import jdk.jpackage.test.TKit; @@ -65,7 +66,7 @@ cfgCmd.execute(); - new PackageTest().configureHelloApp().addInstallVerifier(cmd -> { + new PackageTest().addHelloAppInitializer(null).addInstallVerifier(cmd -> { if (cmd.isPackageUnpacked("Not running per-user configuration tests")) { return; } @@ -144,10 +145,7 @@ } private static void addLauncher(JPackageCommand cmd, String name) { - new AdditionalLauncher(name) { - @Override - protected void verify(JPackageCommand cmd) {} - }.setDefaultArguments(name).applyTo(cmd); + new AdditionalLauncher(name).setDefaultArguments(name).withoutVerifyActions(Action.EXECUTE_LAUNCHER).applyTo(cmd); } private static Path getUserHomeDir() { diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/jpackage/windows/Win8365790Test.java openjdk-25-25.0.2+10/test/jdk/tools/jpackage/windows/Win8365790Test.java --- openjdk-25-25.0.1+8/test/jdk/tools/jpackage/windows/Win8365790Test.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/jpackage/windows/Win8365790Test.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,128 @@ +/* + * 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. + */ + +import static jdk.jpackage.test.HelloApp.configureAndExecute; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.time.Duration; +import jdk.jpackage.test.AdditionalLauncher; +import jdk.jpackage.test.Annotations.Test; +import jdk.jpackage.test.CfgFile; +import jdk.jpackage.test.Executor; +import jdk.jpackage.test.JPackageCommand; +import jdk.jpackage.test.LauncherVerifier; +import jdk.jpackage.test.TKit; + +/** + * Test the child process has a chance to handle Ctrl+C signal. + */ + +/* + * @test + * @summary Test case for JDK-8365790 + * @library /test/jdk/tools/jpackage/helpers + * @build jdk.jpackage.test.* + * @build Win8365790Test + * @requires (os.family == "windows") + * @run main/othervm/timeout=100 -Xmx512m jdk.jpackage.test.Main + * --jpt-run=Win8365790Test + */ +public class Win8365790Test { + + @Test + public void test() throws InterruptedException, IOException { + + var outputDir = TKit.createTempDirectory("response-dir"); + + var mainOutputFile = outputDir.resolve("output.txt"); + var mainTraceFile = outputDir.resolve("trace.txt"); + + var probeOutputFile = outputDir.resolve("probe-output.txt"); + var probeTraceFile = outputDir.resolve("probe-trace.txt"); + + var cmd = JPackageCommand + .helloAppImage(TEST_APP_JAVA + "*UseShutdownHook") + .ignoreFakeRuntime() + .addArguments("--java-options", "-Djpackage.test.trace-file=" + mainTraceFile.toString()) + .addArguments("--arguments", mainOutputFile.toString()) + .addArguments("--arguments", Long.toString(Duration.ofSeconds(TETS_APP_AUTOCLOSE_TIMEOUT_SECONDS).getSeconds())); + + new AdditionalLauncher("probe") + .withoutVerifyActions(LauncherVerifier.Action.values()) + .addJavaOptions("-Djpackage.test.trace-file=" + probeTraceFile.toString()) + .addDefaultArguments(probeOutputFile.toString(), Long.toString(Duration.ofSeconds(TETS_APP_AUTOCLOSE_TIMEOUT_SECONDS).getSeconds())) + .applyTo(cmd); + + cmd.executeAndAssertImageCreated(); + + cmd.readLauncherCfgFile("probe") + .add(new CfgFile().addValue("Application", "win.norestart", Boolean.TRUE.toString())) + .save(cmd.appLauncherCfgPath("probe")); + + // Try Ctrl+C signal on a launcher with disabled restart functionality. + // It will create a single launcher process instead of the parent and the child processes. + // Ctrl+C always worked for launcher with disabled restart functionality. + var probeOutput = runLauncher(cmd, "probe", probeTraceFile, probeOutputFile); + + if (!probeOutput.equals("shutdown hook executed")) { + // Ctrl+C signal didn't make it. Test environment doesn't support Ctrl+C signal + // delivery from the prowershell process to a child process, don't run the main + // test. + TKit.throwSkippedException( + "The environment does NOT support Ctrl+C signal delivery from the prowershell process to a child process"); + } + + var mainOutput = runLauncher(cmd, null, mainTraceFile, mainOutputFile); + + TKit.assertEquals("shutdown hook executed", mainOutput, "Check shutdown hook executed"); + } + + private static String runLauncher(JPackageCommand cmd, String launcherName, Path traceFile, Path outputFile) throws IOException { + // Launch the specified launcher and send Ctrl+C signal to it. + Thread.ofVirtual().start(() -> { + configureAndExecute(0, Executor.of("powershell", "-NonInteractive", "-NoLogo", "-NoProfile", "-ExecutionPolicy", "Unrestricted") + .addArgument("-File").addArgument(TEST_PS1) + .addArguments("-TimeoutSeconds", Long.toString(Duration.ofSeconds(5).getSeconds())) + .addArgument("-Executable").addArgument(cmd.appLauncherPath(launcherName)) + .dumpOutput()); + }); + + TKit.waitForFileCreated(traceFile, Duration.ofSeconds(20), Duration.ofSeconds(2)); + + try { + TKit.waitForFileCreated(outputFile, Duration.ofSeconds(TETS_APP_AUTOCLOSE_TIMEOUT_SECONDS * 2), Duration.ofSeconds(2)); + } finally { + TKit.traceFileContents(traceFile, "Test app trace"); + } + + TKit.assertFileExists(outputFile); + return Files.readString(outputFile); + } + + private static final long TETS_APP_AUTOCLOSE_TIMEOUT_SECONDS = 30; + + private static final Path TEST_APP_JAVA = TKit.TEST_SRC_ROOT.resolve("apps/UseShutdownHook.java"); + private static final Path TEST_PS1 = TKit.TEST_SRC_ROOT.resolve(Path.of("resources/Win8365790Test.ps1")).normalize(); +} diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/launcher/TooSmallStackSize.java openjdk-25-25.0.2+10/test/jdk/tools/launcher/TooSmallStackSize.java --- openjdk-25-25.0.1+8/test/jdk/tools/launcher/TooSmallStackSize.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/launcher/TooSmallStackSize.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,8 @@ * @bug 6762191 8222334 * @summary Setting stack size to 16K causes segmentation fault * @compile TooSmallStackSize.java + * @comment VM fails to launch with minimum allowed stack size of 136k when asan is enabled + * @requires !vm.asan * @run main TooSmallStackSize */ diff -Nru openjdk-25-25.0.1+8/test/jdk/tools/sincechecker/modules/jdk.editpad/JdkEditpadCheckSince.java openjdk-25-25.0.2+10/test/jdk/tools/sincechecker/modules/jdk.editpad/JdkEditpadCheckSince.java --- openjdk-25-25.0.1+8/test/jdk/tools/sincechecker/modules/jdk.editpad/JdkEditpadCheckSince.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jdk/tools/sincechecker/modules/jdk.editpad/JdkEditpadCheckSince.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,30 @@ +/* + * 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 8346884 + * @summary Test for `@since` in jdk.editpad module + * @library /test/lib /test/jdk/tools/sincechecker + * @run main SinceChecker jdk.editpad + */ diff -Nru openjdk-25-25.0.1+8/test/jtreg-ext/requires/VMProps.java openjdk-25-25.0.2+10/test/jtreg-ext/requires/VMProps.java --- openjdk-25-25.0.1+8/test/jtreg-ext/requires/VMProps.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/jtreg-ext/requires/VMProps.java 2025-12-18 08:04:02.000000000 +0000 @@ -122,6 +122,8 @@ map.put("vm.rtm.compiler", this::vmRTMCompiler); // vm.cds is true if the VM is compiled with cds support. map.put("vm.cds", this::vmCDS); + map.put("vm.cds.default.archive.available", this::vmCDSDefaultArchiveAvailable); + map.put("vm.cds.nocoops.archive.available", this::vmCDSNocoopsArchiveAvailable); map.put("vm.cds.custom.loaders", this::vmCDSForCustomLoaders); map.put("vm.cds.supports.aot.class.linking", this::vmCDSSupportsAOTClassLinking); map.put("vm.cds.supports.aot.code.caching", this::vmCDSSupportsAOTCodeCaching); @@ -449,6 +451,26 @@ } /** + * Check for CDS default archive existence. + * + * @return true if CDS default archive classes.jsa exists in the JDK to be tested. + */ + protected String vmCDSDefaultArchiveAvailable() { + Path archive = Paths.get(System.getProperty("java.home"), "lib", "server", "classes.jsa"); + return "" + ("true".equals(vmCDS()) && Files.exists(archive)); + } + + /** + * Check for CDS no compressed oops archive existence. + * + * @return true if CDS archive classes_nocoops.jsa exists in the JDK to be tested. + */ + protected String vmCDSNocoopsArchiveAvailable() { + Path archive = Paths.get(System.getProperty("java.home"), "lib", "server", "classes_nocoops.jsa"); + return "" + ("true".equals(vmCDS()) && Files.exists(archive)); + } + + /** * Check for CDS support for custom loaders. * * @return true if CDS provides support for customer loader in the VM to be tested. diff -Nru openjdk-25-25.0.1+8/test/langtools/TEST.ROOT openjdk-25-25.0.2+10/test/langtools/TEST.ROOT --- openjdk-25-25.0.1+8/test/langtools/TEST.ROOT 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/langtools/TEST.ROOT 2025-12-18 08:04:02.000000000 +0000 @@ -15,7 +15,7 @@ groups=TEST.groups # Minimum jtreg version -requiredVersion=7.5.1+1 +requiredVersion=8+2 # Use new module options useNewOptions=true diff -Nru openjdk-25-25.0.1+8/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsClass.java openjdk-25-25.0.2+10/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsClass.java --- openjdk-25-25.0.1+8/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsClass.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/langtools/tools/javac/danglingDocComments/DanglingDocCommentsClass.java 2025-12-18 08:04:02.000000000 +0000 @@ -45,4 +45,13 @@ /** Good comment. */ int i = 0; } -} \ No newline at end of file + + /** Dangling comment X */ + + /** + * The {@code @SuppressWarnings} annotation below retroactively + * silences the warning about "Dangling comment X". + */ + @SuppressWarnings("dangling-doc-comments") + public void m5() { } +} diff -Nru openjdk-25-25.0.1+8/test/langtools/tools/javac/jvm/ClassRefDupInConstantPoolTest.java openjdk-25-25.0.2+10/test/langtools/tools/javac/jvm/ClassRefDupInConstantPoolTest.java --- openjdk-25-25.0.1+8/test/langtools/tools/javac/jvm/ClassRefDupInConstantPoolTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/langtools/tools/javac/jvm/ClassRefDupInConstantPoolTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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,7 +25,7 @@ * @test * @bug 8015927 * @summary Class reference duplicates in constant pool - * @clean ClassRefDupInConstantPoolTest$Duplicates + * @clean ClassRefDupInConstantPoolTest ClassRefDupInConstantPoolTest$Duplicates * @run main ClassRefDupInConstantPoolTest */ diff -Nru openjdk-25-25.0.1+8/test/lib/jdk/test/lib/Utils.java openjdk-25-25.0.2+10/test/lib/jdk/test/lib/Utils.java --- openjdk-25-25.0.1+8/test/lib/jdk/test/lib/Utils.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/lib/jdk/test/lib/Utils.java 2025-12-18 08:04:02.000000000 +0000 @@ -38,7 +38,6 @@ import java.net.URL; import java.net.URLClassLoader; import java.net.UnknownHostException; -import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.nio.file.CopyOption; import java.nio.file.Files; @@ -50,8 +49,6 @@ import java.nio.file.attribute.FileAttribute; import java.nio.channels.SocketChannel; import java.nio.file.attribute.PosixFilePermissions; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -71,6 +68,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; +import java.util.zip.CRC32C; import static java.lang.System.lineSeparator; import static jdk.test.lib.Asserts.assertTrue; @@ -170,16 +168,11 @@ var v = Runtime.version(); // promotable builds have build number, and it's greater than 0 if (v.build().orElse(0) > 0) { - // promotable build -> use 1st 8 bytes of md5($version) - try { - var md = MessageDigest.getInstance("MD5"); - var bytes = v.toString() - .getBytes(StandardCharsets.UTF_8); - bytes = md.digest(bytes); - SEED = ByteBuffer.wrap(bytes).getLong(); - } catch (NoSuchAlgorithmException e) { - throw new Error(e); - } + // promotable build -> generate a seed based on the version string + var bytes = v.toString().getBytes(StandardCharsets.UTF_8); + var crc = new CRC32C(); + crc.update(bytes); + SEED = crc.getValue(); } else { // "personal" build -> use random seed SEED = new Random().nextLong(); diff -Nru openjdk-25-25.0.1+8/test/lib/jdk/test/lib/cds/CDSAppTester.java openjdk-25-25.0.2+10/test/lib/jdk/test/lib/cds/CDSAppTester.java --- openjdk-25-25.0.1+8/test/lib/jdk/test/lib/cds/CDSAppTester.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/lib/jdk/test/lib/cds/CDSAppTester.java 2025-12-18 08:04:02.000000000 +0000 @@ -262,7 +262,7 @@ "class+load=debug", "aot=debug", "cds=debug", - "cds+class=debug")); + "aot+class=debug")); cmdLine = addCommonVMArgs(runMode, cmdLine); cmdLine = StringArrayUtils.concat(cmdLine, appCommandLine(runMode)); return executeAndCheck(cmdLine, runMode, aotConfigurationFile, aotConfigurationFileLog); @@ -275,8 +275,9 @@ "-XX:AOTCacheOutput=" + aotCacheFile, logToFile(aotCacheFileLog, "class+load=debug", - "cds=debug", - "cds+class=debug")); + "aot=debug", + "aot+class=debug", + "cds=debug")); cmdLine = addCommonVMArgs(runMode, cmdLine); cmdLine = StringArrayUtils.concat(cmdLine, appCommandLine(runMode)); OutputAnalyzer out = executeAndCheck(cmdLine, runMode, aotCacheFile, aotCacheFileLog); @@ -310,7 +311,7 @@ "cds=debug", "cds+class=debug", "aot+heap=warning", - "cds+resolve=debug")); + "aot+resolve=debug")); cmdLine = addCommonVMArgs(runMode, cmdLine); cmdLine = StringArrayUtils.concat(cmdLine, appCommandLine(runMode)); return executeAndCheck(cmdLine, runMode, staticArchiveFile, staticArchiveFileLog); @@ -326,11 +327,11 @@ "-XX:AOTConfiguration=" + aotConfigurationFile, "-XX:AOTCache=" + aotCacheFile, logToFile(aotCacheFileLog, - "aot=debug", "cds=debug", - "cds+class=debug", + "aot=debug", + "aot+class=debug", "aot+heap=warning", - "cds+resolve=debug")); + "aot+resolve=debug")); cmdLine = addCommonVMArgs(runMode, cmdLine); cmdLine = StringArrayUtils.concat(cmdLine, appCommandLine(runMode)); return executeAndCheck(cmdLine, runMode, aotCacheFile, aotCacheFileLog); @@ -377,7 +378,7 @@ "aot=debug", "cds=debug", "cds+class=debug", - "cds+resolve=debug", + "aot+resolve=debug", "class+load=debug")); cmdLine = addCommonVMArgs(runMode, cmdLine); } @@ -401,8 +402,6 @@ public OutputAnalyzer productionRun(String[] extraVmArgs, String[] extraAppArgs) throws Exception { RunMode runMode = RunMode.PRODUCTION; String[] cmdLine = StringArrayUtils.concat(vmArgs(runMode), - "-XX:+UnlockDiagnosticVMOptions", - "-XX:VerifyArchivedFields=2", // make sure archived heap objects are good. logToFile(productionRunLog(), "aot", "cds")); cmdLine = addCommonVMArgs(runMode, cmdLine); diff -Nru openjdk-25-25.0.1+8/test/lib/jdk/test/lib/cds/CDSTestUtils.java openjdk-25-25.0.2+10/test/lib/jdk/test/lib/cds/CDSTestUtils.java --- openjdk-25-25.0.1+8/test/lib/jdk/test/lib/cds/CDSTestUtils.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/lib/jdk/test/lib/cds/CDSTestUtils.java 2025-12-18 08:04:02.000000000 +0000 @@ -440,7 +440,6 @@ opts.archiveName = getDefaultArchiveName(); cmd.add("-XX:SharedArchiveFile=" + opts.archiveName); } - addVerifyArchivedFields(cmd); if (opts.useVersion) cmd.add("-version"); diff -Nru openjdk-25-25.0.1+8/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java openjdk-25-25.0.2+10/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java --- openjdk-25-25.0.1+8/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/lib/jdk/test/lib/cli/CommandLineOptionTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -122,8 +122,8 @@ outputAnalyzer.shouldHaveExitValue(exitCode.value); } catch (RuntimeException e) { String errorMessage = String.format( - "JVM process should have exit value '%d'.%n%s", - exitCode.value, exitErrorMessage); + "JVM process should have exit value '%d', but has '%d'.%n%s", + exitCode.value, outputAnalyzer.getExitValue(), exitErrorMessage); throw new AssertionError(errorMessage, e); } @@ -302,9 +302,12 @@ CommandLineOptionTest.PRINT_FLAGS_FINAL_FORMAT, optionName, expectedValue)); } catch (RuntimeException e) { + String observedValue = outputAnalyzer.firstMatch(String.format( + CommandLineOptionTest.PRINT_FLAGS_FINAL_FORMAT, + optionName, "\\S")); String errorMessage = String.format( - "Option '%s' is expected to have '%s' value%n%s", - optionName, expectedValue, + "Option '%s' is expected to have '%s' value, but is '%s'.%n%s", + optionName, expectedValue, observedValue, optionErrorString); throw new AssertionError(errorMessage, e); } diff -Nru openjdk-25-25.0.1+8/test/lib/jdk/test/lib/os/linux/HugePageConfiguration.java openjdk-25-25.0.2+10/test/lib/jdk/test/lib/os/linux/HugePageConfiguration.java --- openjdk-25-25.0.1+8/test/lib/jdk/test/lib/os/linux/HugePageConfiguration.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/lib/jdk/test/lib/os/linux/HugePageConfiguration.java 2025-12-18 08:04:02.000000000 +0000 @@ -64,6 +64,7 @@ Set _explicitHugePageConfigurations; long _explicitDefaultHugePageSize = -1; + long _explicitAvailableHugePageNumber = -1; public enum THPMode {always, never, madvise} THPMode _thpMode; @@ -80,6 +81,10 @@ return _explicitDefaultHugePageSize; } + public long getExplicitAvailableHugePageNumber() { + return _explicitAvailableHugePageNumber; + } + public THPMode getThpMode() { return _thpMode; } @@ -116,9 +121,10 @@ return _explicitDefaultHugePageSize > 0 && _explicitHugePageConfigurations.size() > 0; } - public HugePageConfiguration(Set explicitHugePageConfigurations, long explicitDefaultHugePageSize, THPMode _thpMode, long _thpPageSize, ShmemTHPMode _shmemThpMode) { + public HugePageConfiguration(Set explicitHugePageConfigurations, long explicitDefaultHugePageSize, long explicitAvailableHugePageNumber, THPMode _thpMode, long _thpPageSize, ShmemTHPMode _shmemThpMode) { this._explicitHugePageConfigurations = explicitHugePageConfigurations; this._explicitDefaultHugePageSize = explicitDefaultHugePageSize; + this._explicitAvailableHugePageNumber = explicitAvailableHugePageNumber; this._thpMode = _thpMode; this._thpPageSize = _thpPageSize; this._shmemThpMode = _shmemThpMode; @@ -129,6 +135,7 @@ return "Configuration{" + "_explicitHugePageConfigurations=" + _explicitHugePageConfigurations + ", _explicitDefaultHugePageSize=" + _explicitDefaultHugePageSize + + ", _explicitAvailableHugePageNumber=" + _explicitAvailableHugePageNumber + ", _thpMode=" + _thpMode + ", _thpPageSize=" + _thpPageSize + ", _shmemThpMode=" + _shmemThpMode + @@ -138,6 +145,7 @@ @Override public int hashCode() { return Objects.hash(_explicitDefaultHugePageSize, + _explicitAvailableHugePageNumber, _thpPageSize, _explicitHugePageConfigurations, _thpMode, @@ -149,6 +157,7 @@ if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; HugePageConfiguration that = (HugePageConfiguration) o; + // _explicitAvailableHugePageNumber is not compared here, because there is no direct counterpart on the JVM-side log. return _explicitDefaultHugePageSize == that._explicitDefaultHugePageSize && _thpPageSize == that._thpPageSize && Objects.equals(_explicitHugePageConfigurations, that._explicitHugePageConfigurations) && _thpMode == that._thpMode && _shmemThpMode == that._shmemThpMode; @@ -169,6 +178,21 @@ return 0; } + private static long readAvailableHugePageNumberFromOS() { + Pattern pat = Pattern.compile("HugePages_Free: *(\\d+)$"); + try (Scanner scanner = new Scanner(new File("/proc/meminfo"))) { + while (scanner.hasNextLine()) { + Matcher mat = pat.matcher(scanner.nextLine()); + if (mat.matches()) { + return Long.parseLong(mat.group(1)); + } + } + } catch (FileNotFoundException e) { + System.out.println("Could not open /proc/meminfo"); + } + return 0; + } + private static Set readSupportedHugePagesFromOS() throws IOException { TreeSet hugePageConfigs = new TreeSet<>(); Pattern pat = Pattern.compile("hugepages-(\\d+)kB"); @@ -263,6 +287,7 @@ public static HugePageConfiguration readFromOS() throws IOException { return new HugePageConfiguration(readSupportedHugePagesFromOS(), readDefaultHugePageSizeFromOS(), + readAvailableHugePageNumberFromOS(), readTHPModeFromOS(), readTHPPageSizeFromOS(), readShmemTHPModeFromOS()); @@ -333,7 +358,7 @@ } } - return new HugePageConfiguration(explicitHugePageConfigs, defaultHugepageSize, thpMode, thpPageSize, shmemThpMode); + return new HugePageConfiguration(explicitHugePageConfigs, defaultHugepageSize, -1, thpMode, thpPageSize, shmemThpMode); } } diff -Nru openjdk-25-25.0.1+8/test/lib/jdk/test/lib/security/CertificateBuilder.java openjdk-25-25.0.2+10/test/lib/jdk/test/lib/security/CertificateBuilder.java --- openjdk-25-25.0.1+8/test/lib/jdk/test/lib/security/CertificateBuilder.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/lib/jdk/test/lib/security/CertificateBuilder.java 2025-12-18 08:04:02.000000000 +0000 @@ -24,12 +24,10 @@ package jdk.test.lib.security; import java.io.*; +import java.security.cert.*; +import java.security.cert.Extension; import java.util.*; import java.security.*; -import java.security.cert.X509Certificate; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.Extension; import java.time.temporal.ChronoUnit; import java.time.Instant; import javax.security.auth.x500.X500Principal; @@ -43,6 +41,7 @@ import sun.security.x509.AlgorithmId; import sun.security.x509.AuthorityInfoAccessExtension; import sun.security.x509.AuthorityKeyIdentifierExtension; +import sun.security.x509.IPAddressName; import sun.security.x509.SubjectKeyIdentifierExtension; import sun.security.x509.BasicConstraintsExtension; import sun.security.x509.CertificateSerialNumber; @@ -56,6 +55,7 @@ import sun.security.x509.KeyIdentifier; import sun.security.x509.X500Name; + /** * Helper class that builds and signs X.509 certificates. * @@ -100,6 +100,89 @@ private byte[] tbsCertBytes; private byte[] signatureBytes; + public enum KeyUsage { + DIGITAL_SIGNATURE, + NONREPUDIATION, + KEY_ENCIPHERMENT, + DATA_ENCIPHERMENT, + KEY_AGREEMENT, + KEY_CERT_SIGN, + CRL_SIGN, + ENCIPHER_ONLY, + DECIPHER_ONLY; + } + + /** + * Create a new CertificateBuilder instance. This method sets the subject name, + * public key, authority key id, and serial number. + * + * @param subjectName entity associated with the public key + * @param publicKey the entity's public key + * @param caKey public key of certificate signer + * @param keyUsages list of key uses + * @return + * @throws CertificateException + * @throws IOException + */ + public static CertificateBuilder newCertificateBuilder(String subjectName, + PublicKey publicKey, PublicKey caKey, KeyUsage... keyUsages) + throws CertificateException, IOException { + SecureRandom random = new SecureRandom(); + + boolean [] keyUsage = new boolean[KeyUsage.values().length]; + for (KeyUsage ku : keyUsages) { + keyUsage[ku.ordinal()] = true; + } + + CertificateBuilder builder = new CertificateBuilder() + .setSubjectName(subjectName) + .setPublicKey(publicKey) + .setSerialNumber(BigInteger.valueOf(random.nextLong(1000000)+1)) + .addSubjectKeyIdExt(publicKey) + .addAuthorityKeyIdExt(caKey); + if (keyUsages.length != 0) { + builder.addKeyUsageExt(keyUsage); + } + return builder; + } + + /** + * Create a Subject Alternative Name extension for the given DNS name + * @param critical Sets the extension to critical or non-critical + * @param dnsName DNS name to use in the extension + * @throws IOException + */ + public static SubjectAlternativeNameExtension createDNSSubjectAltNameExt( + boolean critical, String dnsName) throws IOException { + GeneralNames gns = new GeneralNames(); + gns.add(new GeneralName(new DNSName(dnsName))); + return new SubjectAlternativeNameExtension(critical, gns); + } + + /** + * Create a Subject Alternative Name extension for the given IP address + * @param critical Sets the extension to critical or non-critical + * @param ipAddress IP address to use in the extension + * @throws IOException + */ + public static SubjectAlternativeNameExtension createIPSubjectAltNameExt( + boolean critical, String ipAddress) throws IOException { + GeneralNames gns = new GeneralNames(); + gns.add(new GeneralName(new IPAddressName(ipAddress))); + return new SubjectAlternativeNameExtension(critical, gns); + } + + public static void printCertificate(X509Certificate certificate, PrintStream ps) { + try { + Base64.Encoder encoder = Base64.getEncoder(); + ps.println("-----BEGIN CERTIFICATE-----"); + ps.println(encoder.encodeToString(certificate.getEncoded())); + ps.println("-----END CERTIFICATE-----"); + } catch (CertificateEncodingException exc) { + exc.printStackTrace(ps); + } + } + /** * Default constructor for a {@code CertificateBuilder} object. * @@ -193,6 +276,11 @@ return setNotBefore(nbDate).setNotAfter(naDate); } + public CertificateBuilder setOneHourValidity() { + return setNotBefore(Date.from(Instant.now().minus(5, ChronoUnit.MINUTES))) + .setNotAfter(Date.from(Instant.now().plus(1, ChronoUnit.HOURS))); + } + /** * Set the serial number on the certificate. * diff -Nru openjdk-25-25.0.1+8/test/lib-test/TEST.ROOT openjdk-25-25.0.2+10/test/lib-test/TEST.ROOT --- openjdk-25-25.0.1+8/test/lib-test/TEST.ROOT 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/lib-test/TEST.ROOT 2025-12-18 08:04:02.000000000 +0000 @@ -29,7 +29,7 @@ keys=randomness # Minimum jtreg version -requiredVersion=7.5.1+1 +requiredVersion=8+2 # Allow querying of various System properties in @requires clauses requires.extraPropDefns = ../jtreg-ext/requires/VMProps.java diff -Nru openjdk-25-25.0.1+8/test/lib-test/jdk/test/whitebox/CPUInfoTest.java openjdk-25-25.0.2+10/test/lib-test/jdk/test/whitebox/CPUInfoTest.java --- openjdk-25-25.0.1+8/test/lib-test/jdk/test/whitebox/CPUInfoTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/lib-test/jdk/test/whitebox/CPUInfoTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -66,7 +66,8 @@ "hv", "fsrm", "avx512_bitalg", "gfni", "f16c", "pku", "ospke", "cet_ibt", "cet_ss", "avx512_ifma", "serialize", "avx_ifma", - "apx_f", "avx10_1", "avx10_2" + "apx_f", "avx10_1", "avx10_2", "avx512_fp16", + "sha512", "hybrid" ); // @formatter:on // Checkstyle: resume diff -Nru openjdk-25-25.0.1+8/test/lib-test/jdk/test/whitebox/vm_flags/SizeTTest.java openjdk-25-25.0.2+10/test/lib-test/jdk/test/whitebox/vm_flags/SizeTTest.java --- openjdk-25-25.0.1+8/test/lib-test/jdk/test/whitebox/vm_flags/SizeTTest.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/lib-test/jdk/test/whitebox/vm_flags/SizeTTest.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 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 @@ -35,7 +35,7 @@ import jdk.test.lib.Platform; public class SizeTTest { - private static final String FLAG_NAME = "LargePageSizeInBytes"; + private static final String FLAG_NAME = "LargePageHeapSizeThreshold"; private static final Long[] TESTS = {0L, 100L, (long) Integer.MAX_VALUE, (1L << 32L) - 1L, 1L << 32L}; private static final Long[] EXPECTED_64 = TESTS; diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/java/lang/ScopedValues.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/java/lang/ScopedValues.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/java/lang/ScopedValues.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/java/lang/ScopedValues.java 2025-12-18 08:04:02.000000000 +0000 @@ -29,6 +29,7 @@ import org.openjdk.jmh.annotations.*; import org.openjdk.jmh.infra.Blackhole; +import static java.lang.ScopedValue.where; import static org.openjdk.bench.java.lang.ScopedValuesData.*; /** @@ -92,6 +93,26 @@ return result; } + @Benchmark + @OutputTimeUnit(TimeUnit.NANOSECONDS) + public int thousandUnboundOrElses(Blackhole bh) throws Exception { + int result = 0; + for (int i = 0; i < 1_000; i++) { + result += ScopedValuesData.unbound.orElse(1); + } + return result; + } + + @Benchmark + @OutputTimeUnit(TimeUnit.NANOSECONDS) + public int thousandBoundOrElses(Blackhole bh) throws Exception { + int result = 0; + for (int i = 0; i < 1_000; i++) { + result += ScopedValuesData.sl1.orElse(1); + } + return result; + } + // Test 2: stress the ScopedValue cache. // The idea here is to use a bunch of bound values cyclically, which // stresses the ScopedValue cache. @@ -127,12 +148,12 @@ @Benchmark @OutputTimeUnit(TimeUnit.NANOSECONDS) public int CreateBindThenGetThenRemove_ScopedValue() throws Exception { - return ScopedValue.where(sl1, THE_ANSWER).call(sl1::get); + return where(sl1, THE_ANSWER).call(sl1::get); } // Create a Carrier ahead of time: might be slightly faster - private static final ScopedValue.Carrier HOLD_42 = ScopedValue.where(sl1, 42); + private static final ScopedValue.Carrier HOLD_42 = where(sl1, 42); @Benchmark @OutputTimeUnit(TimeUnit.NANOSECONDS) public int bindThenGetThenRemove_ScopedValue() throws Exception { @@ -213,4 +234,65 @@ var ctr = tl_atomicInt.get(); ctr.setPlain(ctr.getPlain() + 1); } + + // Test 6: Performance with a large number of bindings + static final long deepCall(ScopedValue outer, long n) { + long result = 0; + if (n > 0) { + ScopedValue sv = ScopedValue.newInstance(); + return where(sv, n).call(() -> deepCall(outer, n - 1)); + } else { + for (int i = 0; i < 1_000_000; i++) { + result += outer.orElse(12); + } + } + return result; + } + + @Benchmark + @OutputTimeUnit(TimeUnit.MILLISECONDS) + public long deepBindingTest1() { + return deepCall(ScopedValuesData.unbound, 1000); + } + + @Benchmark + @OutputTimeUnit(TimeUnit.MILLISECONDS) + public long deepBindingTest2() { + return deepCall(ScopedValuesData.sl1, 1000); + } + + + // Test 7: Performance with a large number of bindings + // Different from Test 6 in that we recursively build a very long + // list of Carriers and invoke Carrier.call() only once. + static final long deepCall2(ScopedValue outer, ScopedValue.Carrier carrier, long n) { + long result = 0; + if (n > 0) { + ScopedValue sv = ScopedValue.newInstance(); + return deepCall2(outer, carrier.where(sv, n), n - 1); + } else { + result = carrier.call(() -> { + long sum = 0; + for (int i = 0; i < 1_000_000; i++) { + sum += outer.orElse(12); + } + return sum; + }); + } + return result; + } + + @Benchmark + @OutputTimeUnit(TimeUnit.MILLISECONDS) + public long deepBindingTest3() { + return deepCall2(ScopedValuesData.unbound, where(ScopedValuesData.sl2,0), 1000); + } + + @Benchmark + @OutputTimeUnit(TimeUnit.MILLISECONDS) + public long deepBindingTest4() { + return deepCall2(ScopedValuesData.sl1, where(ScopedValuesData.sl2, 0), 1000); + } + + } diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/java/nio/DirectByteBufferAlloc.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/java/nio/DirectByteBufferAlloc.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/java/nio/DirectByteBufferAlloc.java 1970-01-01 00:00:00.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/java/nio/DirectByteBufferAlloc.java 2025-12-18 08:04:02.000000000 +0000 @@ -0,0 +1,60 @@ +/* + * Copyright Amazon.com Inc. 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 org.openjdk.bench.java.nio; + + +import java.nio.ByteBuffer; +import java.util.concurrent.TimeUnit; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Param; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; + +@BenchmarkMode(Mode.AverageTime) +@OutputTimeUnit(TimeUnit.NANOSECONDS) +@State(Scope.Thread) +@Warmup(iterations = 3, time = 1, timeUnit = TimeUnit.SECONDS) +@Measurement(iterations = 3, time = 1, timeUnit = TimeUnit.SECONDS) +@Fork(3) +public class DirectByteBufferAlloc { + + @Param({ + "128", // 128 bytes + "1024", // 1KB + "1048576", // 1 MB + "16777216" // 16MB + }) + public int bytes; + + @Benchmark + public ByteBuffer allocateDirectBuffer() { + return ByteBuffer.allocateDirect(bytes); + } +} diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/java/security/Signatures.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/java/security/Signatures.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/java/security/Signatures.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/java/security/Signatures.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 @@ -194,4 +194,3 @@ } } } - diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/compiler/AutoVectorization2DArray.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/compiler/AutoVectorization2DArray.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/compiler/AutoVectorization2DArray.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/compiler/AutoVectorization2DArray.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2022, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/compiler/LoopUnroll.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/compiler/LoopUnroll.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/compiler/LoopUnroll.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/compiler/LoopUnroll.java 2025-12-18 08:04:02.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. + * Copyright (C) 2021, Tencent. 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 diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/AllDead.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/AllDead.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/AllDead.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/AllDead.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,16 +26,20 @@ import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; import java.util.ArrayList; import java.util.concurrent.TimeUnit; @BenchmarkMode(Mode.SingleShotTime) +@Warmup(iterations = 5) +@Measurement(iterations = 5) @Fork(value=25, jvmArgs={"-Xmx5g", "-Xms5g", "-Xmn3g", "-XX:+AlwaysPreTouch"}) @OutputTimeUnit(TimeUnit.MILLISECONDS) @State(Scope.Benchmark) @@ -49,6 +53,12 @@ static ArrayList holder; + @Setup(Level.Trial) + public void preRun() { + // Compact right now, kicking out all unrelated objects + System.gc(); + } + @Setup(Level.Iteration) public void generateGarbage() { holder = GarbageGenerator.generateObjectArrays(); diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/AllLive.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/AllLive.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/AllLive.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/AllLive.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,16 +26,20 @@ import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; import java.util.ArrayList; import java.util.concurrent.TimeUnit; @BenchmarkMode(Mode.SingleShotTime) +@Warmup(iterations = 5) +@Measurement(iterations = 5) @Fork(value=25, jvmArgs={"-Xmx5g", "-Xms5g", "-Xmn3g", "-XX:+AlwaysPreTouch"}) @OutputTimeUnit(TimeUnit.MILLISECONDS) @State(Scope.Benchmark) @@ -49,6 +53,12 @@ static ArrayList holder; + @Setup(Level.Trial) + public void preRun() { + // Compact right now, kicking out all unrelated objects + System.gc(); + } + @Setup(Level.Iteration) public void generateGarbage() { holder = GarbageGenerator.generateObjectArrays(); diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesArray.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesArray.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesArray.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesArray.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,15 +26,19 @@ import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; import java.util.concurrent.TimeUnit; @BenchmarkMode(Mode.SingleShotTime) +@Warmup(iterations = 5) +@Measurement(iterations = 5) @Fork(value=25, jvmArgs={"-Xmx5g", "-Xms5g", "-Xmn3g", "-XX:+AlwaysPreTouch"}) @OutputTimeUnit(TimeUnit.MILLISECONDS) @State(Scope.Benchmark) @@ -49,6 +53,12 @@ static Object[] largeObjArray; + @Setup(Level.Trial) + public void preRun() { + // Compact right now, kicking out all unrelated objects + System.gc(); + } + @Setup(Level.Iteration) public void generateGarbage() { largeObjArray = GarbageGenerator.generateAndFillLargeObjArray(false); diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesHashMap.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesHashMap.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesHashMap.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesHashMap.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,16 +26,20 @@ import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; import java.util.HashMap; import java.util.concurrent.TimeUnit; @BenchmarkMode(Mode.SingleShotTime) +@Warmup(iterations = 5) +@Measurement(iterations = 5) @Fork(value=25, jvmArgs={"-Xmx5g", "-Xms5g", "-Xmn3g", "-XX:+AlwaysPreTouch"}) @OutputTimeUnit(TimeUnit.MILLISECONDS) @State(Scope.Benchmark) @@ -50,6 +54,12 @@ static HashMap largeMap; + @Setup(Level.Trial) + public void preRun() { + // Compact right now, kicking out all unrelated objects + System.gc(); + } + @Setup(Level.Iteration) public void generateGarbage() { largeMap = GarbageGenerator.generateAndFillHashMap(false); diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesTreeMap.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesTreeMap.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesTreeMap.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/DifferentObjectSizesTreeMap.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,16 +26,20 @@ import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; import java.util.TreeMap; import java.util.concurrent.TimeUnit; @BenchmarkMode(Mode.SingleShotTime) +@Warmup(iterations = 5) +@Measurement(iterations = 5) @Fork(value=25, jvmArgs={"-Xmx5g", "-Xms5g", "-Xmn3g", "-XX:+AlwaysPreTouch"}) @OutputTimeUnit(TimeUnit.MILLISECONDS) @State(Scope.Benchmark) @@ -49,6 +53,12 @@ */ static TreeMap largeMap; + @Setup(Level.Trial) + public void preRun() { + // Compact right now, kicking out all unrelated objects + System.gc(); + } + @Setup(Level.Iteration) public void generateGarbage() { largeMap = GarbageGenerator.generateAndFillTreeMap(false); diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadFirstPart.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadFirstPart.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadFirstPart.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadFirstPart.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,16 +26,20 @@ import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; import java.util.ArrayList; import java.util.concurrent.TimeUnit; @BenchmarkMode(Mode.SingleShotTime) +@Warmup(iterations = 5) +@Measurement(iterations = 5) @Fork(value=25, jvmArgs={"-Xmx5g", "-Xms5g", "-Xmn3g", "-XX:+AlwaysPreTouch"}) @OutputTimeUnit(TimeUnit.MILLISECONDS) @State(Scope.Benchmark) @@ -50,6 +54,12 @@ static ArrayList holder; + @Setup(Level.Trial) + public void preRun() { + // Compact right now, kicking out all unrelated objects + System.gc(); + } + @Setup(Level.Iteration) public void generateGarbage() { holder = GarbageGenerator.generateObjectArrays(); diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadInterleaved.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadInterleaved.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadInterleaved.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadInterleaved.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,16 +26,20 @@ import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; import java.util.ArrayList; import java.util.concurrent.TimeUnit; @BenchmarkMode(Mode.SingleShotTime) +@Warmup(iterations = 5) +@Measurement(iterations = 5) @Fork(value=25, jvmArgs={"-Xmx5g", "-Xms5g", "-Xmn3g", "-XX:+AlwaysPreTouch"}) @OutputTimeUnit(TimeUnit.MILLISECONDS) @State(Scope.Benchmark) @@ -50,6 +54,12 @@ static ArrayList holder; + @Setup(Level.Trial) + public void preRun() { + // Compact right now, kicking out all unrelated objects + System.gc(); + } + @Setup(Level.Iteration) public void generateGarbage() { holder = GarbageGenerator.generateObjectArrays(); diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadInterleavedChunks.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadInterleavedChunks.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadInterleavedChunks.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadInterleavedChunks.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,16 +26,20 @@ import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; import java.util.ArrayList; import java.util.concurrent.TimeUnit; @BenchmarkMode(Mode.SingleShotTime) +@Warmup(iterations = 5) +@Measurement(iterations = 5) @Fork(value=25, jvmArgs={"-Xmx5g", "-Xms5g", "-Xmn3g", "-XX:+AlwaysPreTouch"}) @OutputTimeUnit(TimeUnit.MILLISECONDS) @State(Scope.Benchmark) @@ -50,6 +54,12 @@ static ArrayList holder; + @Setup(Level.Trial) + public void preRun() { + // Compact right now, kicking out all unrelated objects + System.gc(); + } + @Setup(Level.Iteration) public void generateGarbage() { holder = GarbageGenerator.generateObjectArrays(); diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadSecondPart.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadSecondPart.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadSecondPart.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfDeadSecondPart.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,16 +26,20 @@ import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; import java.util.ArrayList; import java.util.concurrent.TimeUnit; @BenchmarkMode(Mode.SingleShotTime) +@Warmup(iterations = 5) +@Measurement(iterations = 5) @Fork(value=25, jvmArgs={"-Xmx5g", "-Xms5g", "-Xmn3g", "-XX:+AlwaysPreTouch"}) @OutputTimeUnit(TimeUnit.MILLISECONDS) @State(Scope.Benchmark) @@ -50,6 +54,12 @@ static ArrayList holder; + @Setup(Level.Trial) + public void preRun() { + // Compact right now, kicking out all unrelated objects + System.gc(); + } + @Setup(Level.Iteration) public void generateGarbage() { holder = GarbageGenerator.generateObjectArrays(); diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfHashedHalfDead.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfHashedHalfDead.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfHashedHalfDead.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/HalfHashedHalfDead.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,16 +26,20 @@ import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; import java.util.ArrayList; import java.util.concurrent.TimeUnit; @BenchmarkMode(Mode.SingleShotTime) +@Warmup(iterations = 5) +@Measurement(iterations = 5) @Fork(value=25, jvmArgs={"-Xmx5g", "-Xms5g", "-Xmn3g", "-XX:+AlwaysPreTouch"}) @OutputTimeUnit(TimeUnit.MILLISECONDS) @State(Scope.Benchmark) @@ -50,6 +54,12 @@ static ArrayList holder; + @Setup(Level.Trial) + public void preRun() { + // Compact right now, kicking out all unrelated objects + System.gc(); + } + @Setup(Level.Iteration) public void generateGarbage() { holder = GarbageGenerator.generateObjectArrays(); diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/NoObjects.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/NoObjects.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/NoObjects.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/NoObjects.java 2025-12-18 08:04:02.000000000 +0000 @@ -25,14 +25,23 @@ import org.openjdk.jmh.annotations.Benchmark; import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; +import org.openjdk.jmh.annotations.Level; import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; import java.util.concurrent.TimeUnit; @BenchmarkMode(Mode.SingleShotTime) +@Warmup(iterations = 5) +@Measurement(iterations = 5) @Fork(value=25, jvmArgs={"-Xmx5g", "-Xms5g", "-Xmn3g", "-XX:+AlwaysPreTouch"}) @OutputTimeUnit(TimeUnit.MILLISECONDS) +@State(Scope.Benchmark) public class NoObjects { /* @@ -43,6 +52,12 @@ * test for consistency. */ + @Setup(Level.Trial) + public void preRun() { + // Compact right now, kicking out all unrelated objects + System.gc(); + } + @Benchmark public void gc() { System.gc(); diff -Nru openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/OneBigObject.java openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/OneBigObject.java --- openjdk-25-25.0.1+8/test/micro/org/openjdk/bench/vm/gc/systemgc/OneBigObject.java 2025-09-25 16:16:56.000000000 +0000 +++ openjdk-25-25.0.2+10/test/micro/org/openjdk/bench/vm/gc/systemgc/OneBigObject.java 2025-12-18 08:04:02.000000000 +0000 @@ -26,15 +26,19 @@ import org.openjdk.jmh.annotations.BenchmarkMode; import org.openjdk.jmh.annotations.Fork; import org.openjdk.jmh.annotations.Level; +import org.openjdk.jmh.annotations.Measurement; import org.openjdk.jmh.annotations.Mode; import org.openjdk.jmh.annotations.OutputTimeUnit; import org.openjdk.jmh.annotations.Scope; import org.openjdk.jmh.annotations.Setup; import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.Warmup; import java.util.concurrent.TimeUnit; @BenchmarkMode(Mode.SingleShotTime) +@Warmup(iterations = 5) +@Measurement(iterations = 5) @Fork(value=25, jvmArgs={"-Xmx5g", "-Xms5g", "-Xmn3g", "-XX:+AlwaysPreTouch"}) @OutputTimeUnit(TimeUnit.MILLISECONDS) @State(Scope.Benchmark) @@ -49,6 +53,12 @@ static Object[] holder; + @Setup(Level.Trial) + public void preRun() { + // Compact right now, kicking out all unrelated objects + System.gc(); + } + @Setup(Level.Iteration) public void generateGarbage() { holder = new Object[1024*1024*128];