!21 I6BA0T: upgrade to jdk17.0.6-ga

From: @kuenking111 
Reviewed-by: @alexanderbill 
Signed-off-by: @alexanderbill
This commit is contained in:
openeuler-ci-bot 2023-01-29 07:18:57 +00:00 committed by Gitee
commit 6953f28528
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
7 changed files with 15 additions and 10223 deletions

View File

@ -1,145 +0,0 @@
diff --git a/src/hotspot/share/opto/stringopts.cpp b/src/hotspot/share/opto/stringopts.cpp
index 8c0a060d8..78317fe0a 100644
--- a/src/hotspot/share/opto/stringopts.cpp
+++ b/src/hotspot/share/opto/stringopts.cpp
@@ -1030,6 +1030,21 @@ bool StringConcat::validate_control_flow() {
fail = true;
break;
} else if (ptr->is_Proj() && ptr->in(0)->is_Initialize()) {
+ // Check for side effect between Initialize and the constructor
+ for (SimpleDUIterator iter(ptr); iter.has_next(); iter.next()) {
+ Node* use = iter.get();
+ if (!use->is_CFG() && !use->is_CheckCastPP() && !use->is_Load()) {
+#ifndef PRODUCT
+ if (PrintOptimizeStringConcat) {
+ tty->print_cr("unexpected control use of Initialize");
+ ptr->in(0)->dump(); // Initialize node
+ use->dump(1);
+ }
+#endif
+ fail = true;
+ break;
+ }
+ }
ptr = ptr->in(0)->in(0);
} else if (ptr->is_Region()) {
Node* copy = ptr->as_Region()->is_copy();
diff --git a/test/hotspot/jtreg/compiler/stringopts/SideEffectBeforeConstructor.jasm b/test/hotspot/jtreg/compiler/stringopts/SideEffectBeforeConstructor.jasm
new file mode 100644
index 000000000..cbc6d754b
--- /dev/null
+++ b/test/hotspot/jtreg/compiler/stringopts/SideEffectBeforeConstructor.jasm
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+
+super public class compiler/stringopts/SideEffectBeforeConstructor
+ version 51:0
+{
+ public static Field result:I;
+
+ static Method "<clinit>":"()V"
+ stack 2 locals 0
+ {
+ iconst_0;
+ putstatic Field result:"I";
+ return;
+ }
+ public Method "<init>":"()V"
+ stack 1 locals 1
+ {
+ aload_0;
+ invokespecial Method java/lang/Object."<init>":"()V";
+ return;
+ }
+
+ public static Method test:"(Ljava/lang/String;)V"
+ stack 4 locals 1
+ {
+ new class java/lang/StringBuffer;
+ dup;
+ getstatic Field result:"I";
+ iconst_1;
+ iadd;
+ putstatic Field result:"I";
+ aload_0;
+ invokespecial Method java/lang/StringBuffer."<init>":"(Ljava/lang/String;)V";
+ invokevirtual Method java/lang/StringBuffer.toString:"()Ljava/lang/String;";
+ return;
+ }
+}
diff --git a/test/hotspot/jtreg/compiler/stringopts/TestSideEffectBeforeConstructor.java b/test/hotspot/jtreg/compiler/stringopts/TestSideEffectBeforeConstructor.java
new file mode 100644
index 000000000..86c5eca1d
--- /dev/null
+++ b/test/hotspot/jtreg/compiler/stringopts/TestSideEffectBeforeConstructor.java
@@ -0,0 +1,49 @@
+/*
+ * 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 8290705
+ * @summary Test correctness of the string concatenation optimization with
+ * a store between StringBuffer allocation and constructor invocation.
+ * @compile SideEffectBeforeConstructor.jasm
+ * @run main/othervm -Xbatch compiler.stringopts.TestSideEffectBeforeConstructor
+ */
+
+package compiler.stringopts;
+
+public class TestSideEffectBeforeConstructor {
+
+ public static void main(String[] args) {
+ for (int i = 0; i < 100_000; ++i) {
+ try {
+ SideEffectBeforeConstructor.test(null);
+ } catch (NullPointerException npe) {
+ // Expected
+ }
+ }
+ if (SideEffectBeforeConstructor.result != 100_000) {
+ throw new RuntimeException("Unexpected result: " + SideEffectBeforeConstructor.result);
+ }
+ }
+}

View File

@ -1,42 +0,0 @@
From c40df7ed8cb6d6c0f687c1d68071729fab7c1b2d Mon Sep 17 00:00:00 2001
Date: Wed, 4 Jan 2023 20:42:04 +0800
Subject: 8296480: Fix the problem that the TestPolicy.java
case fails because the certificate expires.
---
.../java/security/cert/pkix/policyChanges/TestPolicy.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/test/jdk/java/security/cert/pkix/policyChanges/TestPolicy.java b/test/jdk/java/security/cert/pkix/policyChanges/TestPolicy.java
index a92eee2c5..de2f94d27 100644
--- a/test/jdk/java/security/cert/pkix/policyChanges/TestPolicy.java
+++ b/test/jdk/java/security/cert/pkix/policyChanges/TestPolicy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -34,6 +34,7 @@
*/
import java.io.*;
+import java.text.DateFormat;
import java.util.*;
import java.security.Security;
@@ -97,6 +98,10 @@ public class TestPolicy {
params.setRevocationEnabled(false);
params.setInitialPolicies(testCase.initialPolicies);
+ // Certs expired on 7th Nov 2022
+ params.setDate(DateFormat.getDateInstance(DateFormat.MEDIUM,
+ Locale.US).parse("June 01, 2022"));
+
CertPath path = factory.generateCertPath(Arrays.asList(new X509Certificate[] {ee, ca}));
PKIXCertPathValidatorResult result = (PKIXCertPathValidatorResult)validator.validate(path, params);
--
2.37.0

View File

@ -1,40 +0,0 @@
From 59bc22bb9d2cdcc7d12d163c30432bd8c9d2c976 Mon Sep 17 00:00:00 2001
Date: Wed, 4 Jan 2023 20:44:46 +0800
Subject: 8296485: BuildEEBasicConstraints.java test fails
with SunCertPathBuilderException
---
.../targetConstraints/BuildEEBasicConstraints.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/test/jdk/java/security/cert/CertPathBuilder/targetConstraints/BuildEEBasicConstraints.java b/test/jdk/java/security/cert/CertPathBuilder/targetConstraints/BuildEEBasicConstraints.java
index c7cc90f95..edb68cf29 100644
--- a/test/jdk/java/security/cert/CertPathBuilder/targetConstraints/BuildEEBasicConstraints.java
+++ b/test/jdk/java/security/cert/CertPathBuilder/targetConstraints/BuildEEBasicConstraints.java
@@ -45,9 +45,11 @@ import java.security.cert.PKIXCertPathBuilderResult;
import java.security.cert.TrustAnchor;
import java.security.cert.X509Certificate;
import java.security.cert.X509CertSelector;
+import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.Locale;
import jdk.test.lib.security.CertUtils;
public final class BuildEEBasicConstraints {
@@ -65,6 +67,11 @@ public final class BuildEEBasicConstraints {
PKIXBuilderParameters params = new PKIXBuilderParameters
(Collections.singleton(anchor), sel);
params.setRevocationEnabled(false);
+
+ // Certs expired on 7th Nov 2022
+ params.setDate(DateFormat.getDateInstance(DateFormat.MEDIUM,
+ Locale.US).parse("June 01, 2022"));
+
X509Certificate eeCert = CertUtils.getCertFromFile("ee.cer");
X509Certificate caCert = CertUtils.getCertFromFile("ca.cer");
ArrayList<X509Certificate> certs = new ArrayList<X509Certificate>();
--
2.37.0

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.5.0.13
+17.0.6.0.13
--
2.19.0

View File

@ -155,7 +155,7 @@
# Used via new version scheme. JDK 17 was
# GA'ed in March 2021 => 21.9
%global vendor_version_string 21.9
%global securityver 5
%global securityver 6
# 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
@ -175,7 +175,7 @@
%global origin_nice OpenJDK
%global top_level_dir_name %{origin}
%global minorver 0
%global buildver 8
%global buildver 9
# 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} )
@ -885,7 +885,7 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release}
Name: java-%{javaver}-%{origin}
Version: %{newjavaver}.%{buildver}
Release: 1
Release: 0
# 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
@ -970,16 +970,12 @@ Patch15: Delete-expired-certificate.patch
Patch16: Clean-up-JDK17-codeDEX-fix-Non-static-numa_node_dist.patch
# 17.0.4
Patch17: 8290705_fix_StringConcat_validate_mem_flow_asserts_with_unexpected_userStoreI.patch
Patch18: Apply-TBI-to-ZGC-of-JDK17.patch
# 17.0.5
Patch19: 8253495-CDS-generates-non-deterministic-outpu.patch
Patch20: 8296480-Fix-the-problem-that-the-TestPolicy.j.patch
Patch21: 8296485-BuildEEBasicConstraints.java-test-fai.patch
Patch22: Fast-Serializer.patch
Patch23: Apply-TBI-barrier-patch-to-C1.patch
Patch24: Add-Fast-serializer-testcase.patch
BuildRequires: autoconf
BuildRequires: automake
@ -1213,8 +1209,10 @@ pushd %{top_level_dir_name}
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch22 -p1
%patch23 -p1
popd # openjdk
# Extract systemtap tapsets
@ -1766,6 +1764,14 @@ cjc.mainProgram(arg)
%changelog
* Sat Jan 28 2023 kuenking111 <wangkun49@huawei.com> - 1:17.0.6.9-0.rolling
- modified add-version-txt.patch
- del 8290705_fix_StringConcat_validate_mem_flow_asserts_with_unexpected_userStoreI.patch
- del 8296480-Fix-the-problem-that-the-TestPolicy.j.patch
- del 8296485-BuildEEBasicConstraints.java-test-fai.patch
- del Add-Fast-serializer-testcase.patch
- add jdk17.0.6-ga
* Thu Jan 5 2023 neu-mobi <liuyulong.work@qq.com> - 1:17.0.5.8-0.1
- add 8253495-CDS-generates-non-deterministic-outpu.patch
- add 8296480-Fix-the-problem-that-the-TestPolicy.j.patch