sync master to openEuler-24.03-LTS-SP1

This commit is contained in:
佛系少年中二 2025-02-21 11:33:23 +08:00
parent 331f26a4c6
commit 02bdc0bcba
9 changed files with 1093 additions and 776 deletions

View File

@ -616,13 +616,6 @@ diff --git a/make/RunTests.gmk b/make/RunTests.gmk
index 57a282bfd..9fad1ed43 100644
--- a/make/RunTests.gmk
+++ b/make/RunTests.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
# 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,7 +46,7 @@ endif
$(eval $(call ParseKeywordVariable, TEST_OPTS, \
@ -676,20 +669,20 @@ index 57a282bfd..9fad1ed43 100644
+ $$($1_AOT_LIB): $$(JDK_UNDER_TEST)/release \
+ $$(call DependOnVariable, $1_JAOTC_OPTS) \
+ $$(call DependOnVariable, JDK_UNDER_TEST)
+ $$(call LogWarn, Generating $$(patsubst $$(OUTPUTDIR)/%, %, $$@))
+ $$(call MakeTargetDir)
+ $$(call ExecuteWithLog, $$@, \
+ $((COV_ENVIRONMENT) \
+ $$(FIXPATH) $$(JDK_UNDER_TEST)/bin/jaotc \
+ $$($1_JAOTC_OPTS) --output $$@ --module $$($1_MODULE) \
+ )
+ $$(call ExecuteWithLog, $$@.check, ( \
+ $$(FIXPATH) $$(JDK_UNDER_TEST)/bin/java \
+ $$($1_VM_OPTIONS) -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions \
+ -XX:+PrintAOT -XX:+UseAOTStrictLoading \
+ -XX:AOTLibrary=$$@ -version \
+ > $$@.verify-aot \
+ ))
+ $$(call LogWarn, Generating $$(patsubst $$(OUTPUTDIR)/%, %, $$@))
+ $$(call MakeTargetDir)
+ $$(call ExecuteWithLog, $$@, \
+ $((COV_ENVIRONMENT) \
+ $$(FIXPATH) $$(JDK_UNDER_TEST)/bin/jaotc \
+ $$($1_JAOTC_OPTS) --output $$@ --module $$($1_MODULE) \
+ )
+ $$(call ExecuteWithLog, $$@.check, ( \
+ $$(FIXPATH) $$(JDK_UNDER_TEST)/bin/java \
+ $$($1_VM_OPTIONS) -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions \
+ -XX:+PrintAOT -XX:+UseAOTStrictLoading \
+ -XX:AOTLibrary=$$@ -version \
+ > $$@.verify-aot \
+ ))
+
+ $1_AOT_OPTIONS += -XX:+UnlockExperimentalVMOptions
+ $1_AOT_OPTIONS += -XX:AOTLibrary=$$($1_AOT_LIB)
@ -739,30 +732,30 @@ index 57a282bfd..9fad1ed43 100644
$(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG))
@@ -202,7 +293,7 @@ $(eval $(call ParseKeywordVariable, JTREG, \
TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM RUN_PROBLEM_LISTS \
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT, \
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
- EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS, \
+ EXTRA_PROBLEM_LISTS AOT_MODULES LAUNCHER_OPTIONS, \
- EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS\
+ EXTRA_PROBLEM_LISTS AOT_MODULES LAUNCHER_OPTIONS\
$(CUSTOM_JTREG_STRING_KEYWORDS), \
))
ifneq ($(JTREG), )
@@ -214,10 +305,11 @@ endif
@@ -306,10 +306,11 @@ endif
$(eval $(call SetTestOpt,VM_OPTIONS,GTEST))
$(eval $(call SetTestOpt,JAVA_OPTIONS,GTEST))
+$(eval $(call SetTestOpt,AOT_MODULES,GTEST))
$(eval $(call ParseKeywordVariable, GTEST, \
SINGLE_KEYWORDS := REPEAT, \
- STRING_KEYWORDS := OPTIONS VM_OPTIONS JAVA_OPTIONS, \
+ STRING_KEYWORDS := OPTIONS VM_OPTIONS JAVA_OPTIONS AOT_MODULES, \
))
ifneq ($(GTEST), )
@@ -498,7 +590,14 @@ define SetupRunGtestTestBody
@@ -499,7 +590,14 @@ define SetupRunGtestTestBody
$1_GTEST_REPEAT :=--gtest_repeat=$$(GTEST_REPEAT)
endif
- run-test-$1: pre-run-test
+ ifneq ($$(GTEST_AOT_MODULES), )
+ $$(eval $$(call SetupAot, $1, \
@ -775,7 +768,7 @@ index 57a282bfd..9fad1ed43 100644
$$(call LogWarn)
$$(call LogWarn, Running test '$$($1_TEST)')
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
@@ -509,7 +608,7 @@ define SetupRunGtestTestBody
@@ -510,7 +608,7 @@ define SetupRunGtestTestBody
--gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \
--gtest_catch_exceptions=0 \
$$($1_GTEST_REPEAT) $$(GTEST_OPTIONS) $$(GTEST_VM_OPTIONS) \
@ -784,9 +777,9 @@ index 57a282bfd..9fad1ed43 100644
> >($(TEE) $$($1_TEST_RESULTS_DIR)/gtest.txt) \
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
@@ -844,6 +943,17 @@ define SetupRunJtregTestBody
endif
endif
@@ -874,6 +972,17 @@ define SetupRunJtregTestBody
JTREG_TIMEOUT_FACTOR ?= $$(JTREG_AUTO_TIMEOUT_FACTOR)
+ ifneq ($$(JTREG_AOT_MODULES), )
+ $$(eval $$(call SetupAot, $1, \
@ -802,7 +795,7 @@ index 57a282bfd..9fad1ed43 100644
clean-outputdirs-$1:
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
$$(RM) -r $$($1_TEST_RESULTS_DIR)
@@ -891,7 +1001,7 @@ define SetupRunJtregTestBody
@@ -921,7 +1030,7 @@ define SetupRunJtregTestBody
done
endif
@ -32837,13 +32830,6 @@ diff --git a/test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfo/Test.java b
index 118d6c8f8..a3cc54cfd 100644
--- a/test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfo/Test.java
+++ b/test/hotspot/jtreg/vmTestbase/vm/compiler/CodeCacheInfo/Test.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -62,6 +62,15 @@ public class Test {
String segPrefix = "^(CodeHeap '[^']+':" + p1 + p2 + ")+";
String nosegPrefix = "^CodeCache:" + p1 + p2;
@ -32904,24 +32890,17 @@ diff --git a/test/jdk/java/lang/Class/getDeclaredField/FieldSetAccessibleTest.ja
index 12cab1f5d..7c647d6d4 100644
--- a/test/jdk/java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java
+++ b/test/jdk/java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -288,8 +288,8 @@ public class FieldSetAccessibleTest {
static Set<String> systemModules() {
Set<String> mods = Set.of("javafx.deploy", "jdk.deploy", "jdk.plugin", "jdk.javaws",
// All JVMCI packages other than jdk.vm.ci.services are dynamically
- // exported to jdk.internal.vm.compiler
- "jdk.internal.vm.compiler"
+ // exported to jdk.internal.vm.compiler and jdk.aot
+ "jdk.internal.vm.compiler", "jdk.aot"
@@ -312,8 +312,8 @@ public class FieldSetAccessibleTest {
Set<String> mods = Set.of(
// All JVMCI packages other than jdk.vm.ci.services are dynamically
- // exported to jdk.internal.vm.compiler
- "jdk.internal.vm.compiler", "jdk.internal.vm.compiler.management"
+ // exported to jdk.internal.vm.compiler and jdk.aot
+ "jdk.internal.vm.compiler", "jdk.internal.vm.compiler.management", "jdk.aot"
);
return ModuleFinder.ofSystem().findAll().stream()
.map(mref -> mref.descriptor().name())
// Filters all modules that directly or indirectly require jdk.internal.vm.compiler
// and jdk.internal.vm.compiler.management, as these are upgradeable and
diff --git a/test/jdk/jdk/modules/etc/UpgradeableModules.java b/test/jdk/jdk/modules/etc/UpgradeableModules.java
index 59ff5aa6b..a7e467b50 100644
--- a/test/jdk/jdk/modules/etc/UpgradeableModules.java

View File

@ -305,7 +305,7 @@ index f47331a6d..000000000
- "-XX:CompileCommand=option," + className + "::main,bool,PrintAssembly,true",
- className};
-
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(procArgs);
- ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(procArgs);
- OutputAnalyzer output = new OutputAnalyzer(pb.start());
- List<String> lines = output.asLines();
-

View File

@ -11,14 +11,14 @@ index 860d3ce48..1a4c13132 100644
--- a/test/hotspot/jtreg/gc/g1/TestSkipRebuildRemsetPhase.java
+++ b/test/hotspot/jtreg/gc/g1/TestSkipRebuildRemsetPhase.java
@@ -45,7 +45,7 @@ public class TestSkipRebuildRemsetPhase {
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+WhiteBoxAPI",
- "-XX:G1MixedGCLiveThresholdPercent=20",
+ "-XX:G1MixedGCLiveThresholdPercent=0",
"-Xlog:gc+marking=debug,gc+phases=debug,gc+remset+tracking=trace",
"-Xms10M",
"-Xmx10M",
"-XX:+UnlockExperimentalVMOptions",
"-XX:+UnlockDiagnosticVMOptions",
"-XX:+WhiteBoxAPI",
- "-XX:G1MixedGCLiveThresholdPercent=20",
+ "-XX:G1MixedGCLiveThresholdPercent=0",
"-Xlog:gc+marking=debug,gc+phases=debug,gc+remset+tracking=trace",
"-Xms10M",
"-Xmx10M",
--
2.22.0

View File

@ -13,17 +13,14 @@
src/hotspot/share/opto/loopopts.cpp | 6 +-
src/hotspot/share/opto/macroArrayCopy.cpp | 4 +-
src/hotspot/share/utilities/exceptions.cpp | 4 +-
.../classes/java/nio/charset/Charset.java | 8 +-
.../sun/security/jca/ProviderList.java | 8 +-
.../classes/sun/security/provider/SHA3.java | 14 +-
.../sun/security/provider/SHAKE128.java | 49 ++++
.../media/sound/StandardMidiFileReader.java | 10 +-
.../classes/java/awt/image/BufferedImage.java | 28 +--
.../java/awt/image/WritableRaster.java | 37 +--
.../swing/plaf/basic/BasicComboPopup.java | 4 +-
.../swing/plaf/basic/BasicDirectoryModel.java | 103 ++++-----
.../classes/javax/swing/text/html/CSS.java | 6 +-
.../sun/jndi/ldap/sasl/SaslInputStream.java | 4 +-
.../jdk/internal/net/http/common/Utils.java | 10 +-
.../share/native/libj2gss/GSSLibStub.c | 10 +-
.../com/sun/tools/javac/comp/Annotate.java | 7 +-
@ -36,9 +33,7 @@
.../containers/docker/TestContainerInfo.java | 97 ++++++++
.../java/awt/image/BufferedImage/SetData.java | 114 ++++++++++
.../net/httpclient/HttpClientBuilderTest.java | 19 +-
.../java/nio/charset/Charset/AliasesCopy.java | 69 ++++++
.../File/SMFInterruptedRunningStatus.java | 143 ++++++++++++
.../javax/swing/JComboBox/ComboPopupBug.java | 91 ++++++++
.../jfr/api/consumer/TestRecordedClass.java | 115 ++++++++++
.../ConcurrentGetMonitoredHost.java | 90 ++++++++
.../sun/security/jca/NullPreferredList.java | 41 ++++
@ -54,9 +49,7 @@
create mode 100644 test/hotspot/jtreg/compiler/splitif/TestSplitDivThroughPhiWithControl.java
create mode 100644 test/hotspot/jtreg/containers/docker/TestContainerInfo.java
create mode 100644 test/jdk/java/awt/image/BufferedImage/SetData.java
create mode 100644 test/jdk/java/nio/charset/Charset/AliasesCopy.java
create mode 100644 test/jdk/javax/sound/midi/File/SMFInterruptedRunningStatus.java
create mode 100644 test/jdk/javax/swing/JComboBox/ComboPopupBug.java
create mode 100644 test/jdk/jdk/jfr/api/consumer/TestRecordedClass.java
create mode 100644 test/jdk/sun/jvmstat/monitor/MonitoredVm/ConcurrentGetMonitoredHost.java
create mode 100644 test/jdk/sun/security/jca/NullPreferredList.java
@ -336,32 +329,6 @@ index cf9291f6d..499542235 100644
ls->print_cr("%s throws BSME for " INTPTR_FORMAT, is_indy ? "invokedynamic" : "dynamic constant", p2i((void *)exception));
exception->print_on(ls);
}
diff --git a/src/java.base/share/classes/java/nio/charset/Charset.java b/src/java.base/share/classes/java/nio/charset/Charset.java
index 0ac18a23b..2b1942122 100644
--- a/src/java.base/share/classes/java/nio/charset/Charset.java
+++ b/src/java.base/share/classes/java/nio/charset/Charset.java
@@ -41,7 +41,6 @@ import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.NoSuchElementException;
-import java.util.Objects;
import java.util.ServiceConfigurationError;
import java.util.ServiceLoader;
import java.util.Set;
@@ -636,7 +635,12 @@ public abstract class Charset
* If the canonical name or any of the aliases are illegal
*/
protected Charset(String canonicalName, String[] aliases) {
- String[] as = Objects.requireNonNullElse(aliases, zeroAliases);
+ String[] as =
+ aliases == null ?
+ zeroAliases :
+ VM.isSystemDomainLoader(getClass().getClassLoader()) ?
+ aliases :
+ Arrays.copyOf(aliases, aliases.length);
// Skip checks for the standard, built-in Charsets we always load
// during initialization.
diff --git a/src/java.base/share/classes/sun/security/jca/ProviderList.java b/src/java.base/share/classes/sun/security/jca/ProviderList.java
index 9b41172c0..4b30c76cf 100644
--- a/src/java.base/share/classes/sun/security/jca/ProviderList.java
@ -615,26 +582,6 @@ index 0e345026c..bcca029c1 100644
switch (srcRaster.getSampleModel().getDataType()) {
case DataBuffer.TYPE_BYTE:
diff --git a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
index 050f27e72..197f3238b 100644
--- a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
+++ b/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicComboPopup.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -921,7 +921,7 @@ public class BasicComboPopup extends JPopupMenu implements ComboPopup {
if (e.getSource() == list) {
return;
}
- if (!SwingUtilities.isLeftMouseButton(e) || !comboBox.isEnabled())
+ if (!SwingUtilities.isLeftMouseButton(e) || !comboBox.isEnabled() || !comboBox.isShowing())
return;
if ( comboBox.isEditable() ) {
diff --git a/src/java.desktop/share/classes/javax/swing/text/html/CSS.java b/src/java.desktop/share/classes/javax/swing/text/html/CSS.java
index c14b5a126..311f172b8 100644
--- a/src/java.desktop/share/classes/javax/swing/text/html/CSS.java
@ -666,26 +613,6 @@ index c14b5a126..311f172b8 100644
}
}
}
diff --git a/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/SaslInputStream.java b/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/SaslInputStream.java
index f0746c103..534f7dac7 100644
--- a/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/SaslInputStream.java
+++ b/src/java.naming/share/classes/com/sun/jndi/ldap/sasl/SaslInputStream.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -78,7 +78,7 @@ public class SaslInputStream extends InputStream {
byte[] inBuf = new byte[1];
int count = read(inBuf, 0, 1);
if (count > 0) {
- return inBuf[0];
+ return inBuf[0] & 0xff;
} else {
return -1;
}
diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java b/src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java
index a3f6a11aa..0955bdffe 100644
--- a/src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java
@ -1488,81 +1415,6 @@ index 121793014..ef43ec8b9 100644
}
@Test
diff --git a/test/jdk/java/nio/charset/Charset/AliasesCopy.java b/test/jdk/java/nio/charset/Charset/AliasesCopy.java
new file mode 100644
index 000000000..66ee830c5
--- /dev/null
+++ b/test/jdk/java/nio/charset/Charset/AliasesCopy.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
+ * 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 8319817
+ * @summary Check that aliases cannot be mutated
+ * @run junit AliasesCopy
+ */
+
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CharsetEncoder;
+import java.util.Set;
+
+import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertIterableEquals;
+
+public class AliasesCopy {
+ private static final Set<String> ALIASES_SET = Set.of("foo-alias");
+ private static final String[] ALIASES_ARRAY = ALIASES_SET.toArray(String[]::new);
+
+ @Test
+ public void aliasesCopy() {
+ final FooCharset cs = new FooCharset(ALIASES_ARRAY);
+ ALIASES_ARRAY[0] = "bar-alias";
+ assertIterableEquals(ALIASES_SET, cs.aliases());
+ }
+
+ private static final class FooCharset extends Charset {
+ private FooCharset(String[] aliases) {
+ super("foo", aliases);
+ }
+
+ @Override
+ public CharsetEncoder newEncoder() {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public CharsetDecoder newDecoder() {
+ throw new RuntimeException("not implemented");
+ }
+
+ @Override
+ public boolean contains(Charset cs) {
+ throw new RuntimeException("not implemented");
+ }
+ }
+}
diff --git a/test/jdk/javax/sound/midi/File/SMFInterruptedRunningStatus.java b/test/jdk/javax/sound/midi/File/SMFInterruptedRunningStatus.java
new file mode 100644
index 000000000..1b82e2f73
@ -1712,103 +1564,6 @@ index 000000000..1b82e2f73
+ (byte) 0xFF, 0x2F, 0x00 // META (end of track)
+ };
+}
diff --git a/test/jdk/javax/swing/JComboBox/ComboPopupBug.java b/test/jdk/javax/swing/JComboBox/ComboPopupBug.java
new file mode 100644
index 000000000..830216f0d
--- /dev/null
+++ b/test/jdk/javax/swing/JComboBox/ComboPopupBug.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 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.
+ */
+
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.SwingUtilities;
+
+/*
+ * @test
+ * @bug 8322754
+ * @summary Verifies clicking JComboBox during frame closure causes Exception
+ * @library /java/awt/regtesthelpers
+ * @build PassFailJFrame
+ * @run main/manual ComboPopupBug
+ */
+
+public class ComboPopupBug {
+ private static final String instructionsText = """
+ This test is used to verify that clicking on JComboBox
+ when frame containing it is about to close should not
+ cause IllegalStateException.
+ A JComboBox is shown with Close button at the bottom.
+ Click on Close and then click on JComboBox arrow button
+ to try to show combobox popup.
+ If IllegalStateException is thrown, test will automatically Fail
+ otherwise click Pass. """;
+
+ public static void main(String[] args) throws Exception {
+ PassFailJFrame passFailJFrame = new PassFailJFrame.Builder()
+ .title("ComboPopup Instructions")
+ .instructions(instructionsText)
+ .testTimeOut(5)
+ .rows(10)
+ .columns(35)
+ .build();
+
+ SwingUtilities.invokeAndWait(() -> {
+ JFrame frame = new JFrame("ComboPopup");
+
+ JComboBox cb = new JComboBox();
+ cb.setEditable(true);
+ cb.addItem("test");
+ cb.addItem("test2");
+ cb.addItem("test3");
+ frame.getContentPane().add(cb, "North");
+
+ JButton b = new JButton("Close");
+ b.addActionListener(
+ (e)->{
+ try {
+ Thread.sleep(3000);
+ }
+ catch (Exception ex) {
+ }
+ frame.setVisible(false);
+
+ });
+ frame.getContentPane().add(b, "South");
+ frame.setSize(200, 200);
+
+ PassFailJFrame.addTestWindow(frame);
+ PassFailJFrame.positionTestWindow(frame,
+ PassFailJFrame.Position.HORIZONTAL);
+
+ frame.setVisible(true);
+ });
+
+ passFailJFrame.awaitAndCheck();
+ }
+}
diff --git a/test/jdk/sun/jvmstat/monitor/MonitoredVm/ConcurrentGetMonitoredHost.java b/test/jdk/sun/jvmstat/monitor/MonitoredVm/ConcurrentGetMonitoredHost.java
new file mode 100644
index 000000000..a6049f6a0

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@ index 000000000..b717bafbe
--- /dev/null
+++ b/version.txt
@@ -0,0 +1 @@
+17.0.13.0.13
+17.0.14.0.13
--
2.19.0

View File

@ -10630,7 +10630,7 @@ index 1e16c157f..9ed420d52 100644
import java.util.List;
@@ -53,7 +54,13 @@ public class KeyAgreementTest {
String kpgAlgo = args[1];
String provider = args[2];
String provider = System.getProperty("test.provider.name", args[2]);
System.out.println("Testing " + kaAlgo);
- AlgoSpec aSpec = AlgoSpec.valueOf(AlgoSpec.class, kaAlgo);
+ AlgoSpec aSpec;
@ -10663,16 +10663,18 @@ diff --git a/test/jdk/java/security/Signature/SignatureGetInstance.java b/test/j
index c246773f8..b69258cd9 100644
--- a/test/jdk/java/security/Signature/SignatureGetInstance.java
+++ b/test/jdk/java/security/Signature/SignatureGetInstance.java
@@ -49,8 +49,11 @@ public class SignatureGetInstance {
@@ -54,9 +54,13 @@ public class SignatureGetInstance {
MyPrivKey testPriv = new MyPrivKey();
MyPubKey testPub = new MyPubKey();
+ Provider kaeProvider = Security.getProvider("KAEProvider");
+ String expectedProvName = kaeProvider != null ? "KAEProvider" : "SunRsaSign";
+ String expectedProvName = kaeProvider != null ? "KAEProvider" : "SunRsaSign";
+
+
testDblInit(testPriv, testPub, true, "TestProvider");
- testDblInit(kp.getPrivate(), kp.getPublic(), true, "SunRsaSign");
+ testDblInit(kp.getPrivate(), kp.getPublic(), true, expectedProvName);
testDblInit(kp.getPrivate(), kp.getPublic(), true,
- System.getProperty("test.provider.name", "SunRsaSign"));
+ System.getProperty("test.provider.name", expectedProName));
testDblInit(testPriv, kp.getPublic(), false, null);
testDblInit(kp.getPrivate(), testPub, false, null);
@ -12833,7 +12835,7 @@ index 58bcbe911..bfc38df35 100644
String expected;
String value = args[1];
- expected = "SunJCE";
- expected = System.getProperty("test.provider.name", "SunJCE");
+
+ if (Security.getProperty("security.provider.1").equals("KAEProvider")) {
+ expected = "KAEProvider";
@ -12873,12 +12875,12 @@ diff --git a/test/jdk/sun/security/pkcs11/policy b/test/jdk/sun/security/pkcs11/
index 54281a781..4d887e239 100644
--- a/test/jdk/sun/security/pkcs11/policy
+++ b/test/jdk/sun/security/pkcs11/policy
@@ -1,3 +1,4 @@
@@ -1,4 +1,5 @@
grant {
permission java.lang.RuntimePermission "setSecurityManager";
permission java.util.PropertyPermission "test.provider.name", "read";
+ permission java.util.PropertyPermission "kae.disableKaeDispose", "read";
};
\ No newline at end of file
diff --git a/test/jdk/sun/security/ssl/CipherSuite/DisabledCurve.java b/test/jdk/sun/security/ssl/CipherSuite/DisabledCurve.java
index 26304c5df..ca618ccfe 100644
--- a/test/jdk/sun/security/ssl/CipherSuite/DisabledCurve.java

View File

@ -162,7 +162,7 @@
# Used via new version scheme. JDK 17 was
# GA'ed in March 2021 => 21.9
%global vendor_version_string 21.9
%global securityver 13
%global securityver 14
# buildjdkver is usually same as %%{majorver},
# but in time of bootstrap of next jdk, it is majorver-1,
# and this it is better to change it here, on single place
@ -188,7 +188,7 @@
%global origin_nice OpenJDK
%global top_level_dir_name %{origin}
%global minorver 0
%global buildver 11
%global buildver 7
# priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit
%if %is_system_jdk
%global priority %( printf '%02d%02d%02d%02d' %{majorver} %{minorver} %{securityver} %{buildver} )
@ -914,7 +914,7 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
Name: java-%{javaver}-%{origin}
Version: %{newjavaver}.%{buildver}
Release: 6
Release: 2
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
@ -1289,117 +1289,117 @@ fi
# OpenJDK patches
%ifnarch loongarch64 riscv64
%ifnarch loongarch64 riscv64
pushd %{top_level_dir_name}
%patch1 -p1
%patch3 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch16 -p1
%patch18 -p1
%patch19 -p1
%patch22 -p1
%patch23 -p1
%patch26 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch36 -p1
%patch41 -p1
%patch42 -p1
%patch43 -p1
%patch44 -p1
%patch45 -p1
%patch46 -p1
%patch47 -p1
%patch48 -p1
%patch49 -p1
%patch50 -p1
%patch51 -p1
%patch52 -p1
%patch53 -p1
%patch54 -p1
%patch55 -p1
%patch56 -p1
%patch57 -p1
%patch58 -p1
%patch59 -p1
%patch60 -p1
%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p1
%patch65 -p1
%patch66 -p1
%patch67 -p1
%patch68 -p1
%patch69 -p1
%patch70 -p1
%patch71 -p1
%patch72 -p1
%patch73 -p1
%patch74 -p1
%patch75 -p1
%patch76 -p1
%patch77 -p1
%patch78 -p1
%patch 1 -p1
%patch 3 -p1
%patch 6 -p1
%patch 7 -p1
%patch 8 -p1
%patch 9 -p1
%patch 10 -p1
%patch 11 -p1
%patch 12 -p1
%patch 13 -p1
%patch 14 -p1
%patch 16 -p1
%patch 18 -p1
%patch 19 -p1
%patch 22 -p1
%patch 23 -p1
%patch 26 -p1
%patch 28 -p1
%patch 29 -p1
%patch 30 -p1
%patch 31 -p1
%patch 32 -p1
%patch 36 -p1
%patch 41 -p1
%patch 42 -p1
%patch 43 -p1
%patch 44 -p1
%patch 45 -p1
%patch 46 -p1
%patch 47 -p1
%patch 48 -p1
%patch 49 -p1
%patch 50 -p1
%patch 51 -p1
%patch 52 -p1
%patch 53 -p1
%patch 54 -p1
%patch 55 -p1
%patch 56 -p1
%patch 57 -p1
%patch 58 -p1
%patch 59 -p1
%patch 60 -p1
%patch 61 -p1
%patch 62 -p1
%patch 63 -p1
%patch 64 -p1
%patch 65 -p1
%patch 66 -p1
%patch 67 -p1
%patch 68 -p1
%patch 69 -p1
%patch 70 -p1
%patch 71 -p1
%patch 72 -p1
%patch 73 -p1
%patch 74 -p1
%patch 75 -p1
%patch 76 -p1
%patch 77 -p1
%patch 78 -p1
popd # openjdk
%endif
%ifarch riscv64
pushd %{top_level_dir_name}
%patch1 -p1
%patch3 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch16 -p1
%patch18 -p1
%patch19 -p1
%patch22 -p1
%patch23 -p1
%patch26 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch36 -p1
%patch41 -p1
%patch42 -p1
%patch43 -p1
%patch57 -p1
%patch58 -p1
%patch59 -p1
%patch60 -p1
%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p1
%patch65 -p1
%patch66 -p1
%patch68 -p1
%patch 1 -p1
%patch 3 -p1
%patch 6 -p1
%patch 7 -p1
%patch 8 -p1
%patch 9 -p1
%patch 10 -p1
%patch 11 -p1
%patch 12 -p1
%patch 13 -p1
%patch 14 -p1
%patch 16 -p1
%patch 18 -p1
%patch 19 -p1
%patch 22 -p1
%patch 23 -p1
%patch 26 -p1
%patch 28 -p1
%patch 29 -p1
%patch 30 -p1
%patch 31 -p1
%patch 32 -p1
%patch 36 -p1
%patch 41 -p1
%patch 42 -p1
%patch 43 -p1
%patch 57 -p1
%patch 58 -p1
%patch 59 -p1
%patch 60 -p1
%patch 61 -p1
%patch 62 -p1
%patch 63 -p1
%patch 64 -p1
%patch 65 -p1
%patch 66 -p1
%patch 68 -p1
popd
%endif
%ifarch loongarch64
pushd %{top_level_dir_name}
%patch2000 -p1
%patch 2000 -p1
popd
%endif
@ -1963,19 +1963,37 @@ cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect
%changelog
* Thu Dec 12 2024 kuenking111 <wangkun49@huawei.com> - 1:17.0.13.11-6
- Add Fix-a-concurrent-issue-of-program-data-ref-cnt.patch
* Fri Feb 21 2025 songliyang <songliyang@kylinos.cn> - 1:17.0.14.7-2
- fix LoongArch64 support patch apply error
* Fri Dec 6 2024 kuenking111 <wangkun49@huawei.com> - 1:17.0.13.11-5
* Tue Feb 11 2025 Pan Xuefeng <panxuefeng@loongson.cn> - 1:17.0.14.7-1
- upgrade LoongArch64 port to 17.0.14
* Thu Jan 23 2025 Benshuai5D <benshuai5d@huawei> - 1:17.0.14.7-0
- update to 17.0.14
- modify 8264805-Backport-Ahead-of-Time-Compiler.patch
- modify 8280872-Reorder-code-cache-segments-to-improv.patch
- modify 8323066-TestSkipRebuildRemsetPhase.java-fails-with-S.patch
- modify Backport-Important-Fixed-Issues.patch
- modify add-version-txt.patch
- modify jdk17-Add-KAE-provider.patch
* Thu Dec 12 2024 kuenking111 <wangkun49@huawei.com> - 1:17.0.13.11-8
- add Fix-a-concurrent-issue-of-program-data-ref-cnt.patch
* Fri Dec 6 2024 kuenking111 <wangkun49@huawei.com> - 1:17.0.13.11-7
- modify Add-jbolt-feature.patch
- modify Add-specialized-hashmap-version-of-the-long-type.patch
- modify Enable-TLS-to-communciation-between-JBooster-Server-.patch
* Tue Dec 3 2024 Dingli Zhang <dingli@iscas.ac.cn> - 1:17.0.13.11-4
* Wed Dec 4 2024 Dingli Zhang <dingli@iscas.ac.cn> - 1:17.0.13.11-6
- Split patches for riscv64
- Increase the architecture isolation of jaotc
* Fri Nov 29 2024 kuenking111 <wangkun49@huawei.com> - 1:17.0.13.11-3
* Tue Dec 03 2024 shenzhongwei <shenzhongwei@kylinos.cn> - 1:17.0.13.11-5
- fix: %patchN is deprecated (51 usages found), use %patch N (or %patch -P N)
* Fri Nov 29 2024 kuenking111 <wangkun49@huawei.com> - 1:17.0.13.11-4
- add Add-jbolt-feature.patch
- add Enable-TLS-to-communciation-between-JBooster-Server-.patch
- add SA-redact-support-password.patch
@ -1987,6 +2005,9 @@ cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect
- add 8323066-TestSkipRebuildRemsetPhase.java-fails-with-S.patch
- modify downgrade-the-glibc-symver-of-memcpy.patch
* Tue Nov 12 2024 Dingli Zhang <dingli@iscas.ac.cn> - 1:17.0.13.11-3
- Fix build error for riscv64
* Wed Nov 6 2024 Pan Xuefeng <panxuefeng@loongson.cn> - 1:17.0.13.11-2
- upgrade LoongArch64 port to 17.0.13