From 9d605552e096d511551b7c3f13ecc9ad655aa920 Mon Sep 17 00:00:00 2001 From: kuenking111 Date: Wed, 14 Apr 2021 20:39:32 +0800 Subject: [PATCH] I3IU5B: Resolve code inconsistencies exclude make --- java-1.8.0-openjdk.spec | 9 +- ...resolve-code-inconsistencies-no-make.patch | 944 ++++++++++++++++++ 2 files changed, 951 insertions(+), 2 deletions(-) create mode 100755 src-openeuler-openjdk-1.8.0-resolve-code-inconsistencies-no-make.patch diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 31f8e16..a9e5acd 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -921,7 +921,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{buildver} -Release: 10 +Release: 11 # 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 # also included the epoch in their virtual provides. This created a @@ -1090,6 +1090,7 @@ Patch160: 8214418-half-closed-SSLEngine-status-may-cause-appli.patch Patch161: 8259886-Improve-SSL-session-cache-performance-and-sc.patch Patch162: 8214535-support-Jmap-parallel.patch Patch163: fix_VerifyCerts.java_testcase_bug.patch +Patch164: src-openeuler-openjdk-1.8.0-resolve-code-inconsistencies-no-make.patch ############################################# # @@ -1528,6 +1529,7 @@ pushd %{top_level_dir_name} %patch161 -p1 %patch162 -p1 %patch163 -p1 +%patch164 -p1 popd @@ -1537,7 +1539,7 @@ popd # %patch203 # RPM-only fixes -%patch1000 +# %patch1000 # Extract systemtap tapsets %if %{with_systemtap} @@ -2144,6 +2146,9 @@ require "copy_jdk_configs.lua" %endif %changelog +* Wed Apr 14 2021 kuenking - 1:1.8.0.282-b08.11 +- add src-openeuler-openjdk-1.8.0-resolve-code-inconsistencies-no-make.patch + * Fri Apr 2 2021 Benshuai5D - 1:1.8.0.282-b08.10 - delete redundant set-vm.vendor-by-configure.patch - delete redundant make-disable-precompiled-headers-work.patch diff --git a/src-openeuler-openjdk-1.8.0-resolve-code-inconsistencies-no-make.patch b/src-openeuler-openjdk-1.8.0-resolve-code-inconsistencies-no-make.patch new file mode 100755 index 0000000..c4f22eb --- /dev/null +++ b/src-openeuler-openjdk-1.8.0-resolve-code-inconsistencies-no-make.patch @@ -0,0 +1,944 @@ +diff --git a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java +index 7e0d8373..b5da891d 100644 +--- a/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java ++++ b/corba/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/Util.java +@@ -1129,7 +1129,6 @@ public class Util extends com.sun.tools.corba.se.idl.Util + Util.getMessage ("Version.product", Util.getMessage ("Version.number")))); + // Do not introduce invalid escape characters into comment! + //stream.println ("* " + Util.getMessage ("toJavaProlog2", Compile.compiler.arguments.file)); +- stream.println ("* " + Util.getMessage ("toJavaProlog2", Compile.compiler.arguments.file.replace (File.separatorChar, '/'))); + + /////////////// + // This SHOULD work, but there's a bug in the JDK. +@@ -1146,8 +1145,6 @@ public class Util extends com.sun.tools.corba.se.idl.Util + else + formatter.setTimeZone (java.util.TimeZone.getDefault ()); + +- stream.println ("* " + formatter.format (new Date ())); +- + // + /////////////// + +diff --git a/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java b/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java +index b2fd98a5..1a6f8035 100644 +--- a/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java ++++ b/corba/src/share/classes/com/sun/tools/corba/se/logutil/MC.java +@@ -154,7 +154,6 @@ public class MC { + groupName); + pw.println("//"); + pw.printMsg("// Generated by MC.java version @, DO NOT EDIT BY HAND!", VERSION); +- pw.printMsg("// Generated from input file @ on @", inFile, new Date()); + pw.println(); + } + +diff --git a/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp b/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp +index 8eb031e3..cec35b75 100644 +--- a/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp ++++ b/hotspot/src/cpu/aarch64/vm/c2_globals_aarch64.hpp +@@ -53,7 +53,7 @@ define_pd_global(intx, BackEdgeThreshold, 100000); + define_pd_global(intx, OnStackReplacePercentage, 140); + define_pd_global(intx, ConditionalMoveLimit, 3); + define_pd_global(intx, FLOATPRESSURE, 64); +-define_pd_global(intx, FreqInlineSize, 768); ++define_pd_global(intx, FreqInlineSize, 325); + define_pd_global(intx, MinJumpTableSize, 10); + define_pd_global(intx, INTPRESSURE, 25); + define_pd_global(intx, InteriorEntryAlignment, 16); +diff --git a/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp b/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp +index 3c59c96c..b5ce1cfa 100644 +--- a/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp ++++ b/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp +@@ -236,6 +236,11 @@ void VM_Version::initialize() { + FLAG_SET_DEFAULT(UseSHA, false); + } + ++ if (UseF2jBLASIntrinsics) { ++ warning("F2jBLAS instructions are not available on this CPU"); ++ FLAG_SET_DEFAULT(UseF2jBLASIntrinsics, false); ++ } ++ + if (FLAG_IS_DEFAULT(UseMontgomeryMultiplyIntrinsic)) { + UseMontgomeryMultiplyIntrinsic = true; + } +diff --git a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp +index d7240e87..bd893e13 100644 +--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp ++++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp +@@ -382,6 +382,11 @@ void VM_Version::initialize() { + } + } + ++ if (UseF2jBLASIntrinsics) { ++ warning("F2jBLAS instructions are not available on this CPU"); ++ FLAG_SET_DEFAULT(UseF2jBLASIntrinsics, false); ++ } ++ + if (FLAG_IS_DEFAULT(ContendedPaddingWidth) && + (cache_line_size > ContendedPaddingWidth)) + ContendedPaddingWidth = cache_line_size; +diff --git a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp +index 3a4246c6..46b3e32e 100644 +--- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp ++++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp +@@ -628,6 +628,11 @@ void VM_Version::get_processor_features() { + FLAG_SET_DEFAULT(UseSHA512Intrinsics, false); + } + ++ if (UseF2jBLASIntrinsics) { ++ warning("F2jBLAS instructions are not available on this CPU"); ++ FLAG_SET_DEFAULT(UseF2jBLASIntrinsics, false); ++ } ++ + // Adjust RTM (Restricted Transactional Memory) flags + if (!supports_rtm() && UseRTMLocking) { + // Can't continue because UseRTMLocking affects UseBiasedLocking flag +diff --git a/hotspot/src/os_cpu/linux_x86/vm/memcpy.cpp b/hotspot/src/os_cpu/linux_x86/vm/memcpy.cpp +new file mode 100644 +index 00000000..0c4edeaa +--- /dev/null ++++ b/hotspot/src/os_cpu/linux_x86/vm/memcpy.cpp +@@ -0,0 +1,21 @@ ++/* ++ * Copyright (c) Huawei Technologies Co., Ltd. 2018-2020. All rights reserved. ++ */ ++ ++#if defined( __GNUC__ ) && \ ++(__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) ++#include ++ ++#if (defined AMD64) || (defined amd64) ++/* some systems do not have newest memcpy@@GLIBC_2.14 - stay with old good one */ ++asm (".symver memcpy, memcpy@GLIBC_2.2.5"); ++ ++extern "C"{ ++ void *__wrap_memcpy(void *dest, const void *src, size_t n) ++ { ++ return memcpy(dest, src, n); ++ } ++} ++#endif ++#endif ++ +diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp +index 082c78b1..201dd959 100644 +--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp ++++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp +@@ -1097,7 +1097,7 @@ static char* convert_into_package_name(char* name) { + char* index = strrchr(name, '/'); + if (index == NULL) { + return NULL; +- } else { ++ } else { + *index = '\0'; // chop to just the package name + while ((index = strchr(name, '/')) != NULL) { + *index = '.'; // replace '/' with '.' in package name +@@ -1170,29 +1170,31 @@ Klass* SystemDictionary::resolve_from_stream(Symbol* class_name, + !class_loader.is_null() && + parsed_name != NULL && + parsed_name->utf8_length() >= (int)pkglen) { +- ResourceMark rm(THREAD); +- bool prohibited; +- const jbyte* base = parsed_name->base(); +- if ((base[0] | base[1] | base[2] | base[3] | base[4]) & 0x80) { +- prohibited = is_prohibited_package_slow(parsed_name); +- } else { +- char* name = parsed_name->as_C_string(); +- prohibited = (strncmp(name, pkg, pkglen) == 0); +- } +- if (prohibited) { +- // It is illegal to define classes in the "java." package from +- // JVM_DefineClass or jni_DefineClass unless you're the bootclassloader +- char* name = parsed_name->as_C_string(); +- name = convert_into_package_name(name); +- assert(name != NULL, "must be"); +- +- const char* fmt = "Prohibited package name: %s"; +- size_t len = strlen(fmt) + strlen(name); +- char* message = NEW_RESOURCE_ARRAY(char, len); +- jio_snprintf(message, len, fmt, name); +- Exceptions::_throw_msg(THREAD_AND_LOCATION, +- vmSymbols::java_lang_SecurityException(), message); +- } ++ bool prohibited; ++ const jbyte* base = parsed_name->base(); ++ if ((base[0] | base[1] | base[2] | base[3] | base[4]) & 0x80) { ++ prohibited = is_prohibited_package_slow(parsed_name); ++ } else { ++ char* name = parsed_name->as_C_string(); ++ prohibited = (strncmp(name, pkg, pkglen) == 0); ++ } ++ if (prohibited) { ++ // It is illegal to define classes in the "java." package from ++ // JVM_DefineClass or jni_DefineClass unless you're the bootclassloader ++ char* name = parsed_name->as_C_string(); ++ char* index = strrchr(name, '/'); ++ assert(index != NULL, "must be"); ++ *index = '\0'; // chop to just the package name ++ while ((index = strchr(name, '/')) != NULL) { ++ *index = '.'; // replace '/' with '.' in package name ++ } ++ const char* fmt = "Prohibited package name: %s"; ++ size_t len = strlen(fmt) + strlen(name); ++ char* message = NEW_RESOURCE_ARRAY(char, len); ++ jio_snprintf(message, len, fmt, name); ++ Exceptions::_throw_msg(THREAD_AND_LOCATION, ++ vmSymbols::java_lang_SecurityException(), message); ++ } + } + + if (!HAS_PENDING_EXCEPTION) { +@@ -1315,7 +1317,7 @@ instanceKlassHandle SystemDictionary::load_shared_class( + char* name = ik->name()->as_C_string(); + Handle klass_name = java_lang_String::create_from_str(name, CHECK_0); + JavaValue result(T_OBJECT); +- ++ + // load_shared_class need protected domain to handle non-bootstrap loaded class, + // so here call_virtual to call getProtectionDomainInternal function of URLClassLoader.java, + // to get protected domain and save into result. +diff --git a/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp b/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp +index 1bd61b02..7b2dbba3 100644 +--- a/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp ++++ b/hotspot/src/share/vm/classfile/systemDictionaryShared.hpp +@@ -72,13 +72,13 @@ public: + static bool check_verification_dependencies(Klass* k, Handle class_loader, + Handle protection_domain, + char** message_buffer, TRAPS) { +- if (EnableSplitVerifierForAppCDS) { ++ if (EnableSplitVerifierForAppCDS) { + ClassVerifier split_verifier(k, THREAD); + split_verifier.verify_class(THREAD); + if (HAS_PENDING_EXCEPTION) { + return false; // use the existing exception + } +- } ++ } + return true; + } + }; +diff --git a/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp b/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp +index 90f49027..18162856 100644 +--- a/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp ++++ b/hotspot/src/share/vm/gc_implementation/shared/owstTaskTerminator.cpp +@@ -21,10 +21,9 @@ + * + */ + ++#include "precompiled.hpp" + #include "owstTaskTerminator.hpp" + +-#include "precompiled/precompiled.hpp" +- + bool OWSTTaskTerminator::exit_termination(size_t tasks, TerminatorTerminator* terminator) { + return tasks > 0 || (terminator != NULL && terminator->should_exit_termination()); + } +diff --git a/hotspot/src/share/vm/opto/compile.hpp b/hotspot/src/share/vm/opto/compile.hpp +index fd750b10..93fa1173 100644 +--- a/hotspot/src/share/vm/opto/compile.hpp ++++ b/hotspot/src/share/vm/opto/compile.hpp +@@ -316,7 +316,7 @@ class Compile : public Phase { + bool _has_unsafe_access; // True if the method _may_ produce faults in unsafe loads or stores. + bool _has_stringbuilder; // True StringBuffers or StringBuilders are allocated + bool _has_boxed_value; // True if a boxed object is allocated +- int _max_vector_size; // Maximum size of generated vectors ++ uint _max_vector_size; // Maximum size of generated vectors + uint _trap_hist[trapHistLength]; // Cumulative traps + bool _trap_can_recompile; // Have we emitted a recompiling trap? + uint _decompile_count; // Cumulative decompilation counts. +@@ -581,8 +581,8 @@ class Compile : public Phase { + void set_has_stringbuilder(bool z) { _has_stringbuilder = z; } + bool has_boxed_value() const { return _has_boxed_value; } + void set_has_boxed_value(bool z) { _has_boxed_value = z; } +- int max_vector_size() const { return _max_vector_size; } +- void set_max_vector_size(int s) { _max_vector_size = s; } ++ uint max_vector_size() const { return _max_vector_size; } ++ void set_max_vector_size(uint s) { _max_vector_size = s; } + void set_trap_count(uint r, uint c) { assert(r < trapHistLength, "oob"); _trap_hist[r] = c; } + uint trap_count(uint r) const { assert(r < trapHistLength, "oob"); return _trap_hist[r]; } + bool trap_can_recompile() const { return _trap_can_recompile; } +diff --git a/hotspot/src/share/vm/opto/memnode.cpp b/hotspot/src/share/vm/opto/memnode.cpp +index 317c21d2..4a8fb107 100644 +--- a/hotspot/src/share/vm/opto/memnode.cpp ++++ b/hotspot/src/share/vm/opto/memnode.cpp +@@ -2329,7 +2329,9 @@ Node *StoreNode::Ideal(PhaseGVN *phase, bool can_reshape) { + st->Opcode() == Op_StoreVector || + Opcode() == Op_StoreVector || + phase->C->get_alias_index(adr_type()) == Compile::AliasIdxRaw || +- (Opcode() == Op_StoreL && st->Opcode() == Op_StoreI), // expanded ClearArrayNode ++ (Opcode() == Op_StoreL && st->Opcode() == Op_StoreI) || // expanded ClearArrayNode ++ (Opcode() == Op_StoreI && st->Opcode() == Op_StoreL) || // initialization by arraycopy ++ (is_mismatched_access() || mem->as_Store()->is_mismatched_access()), + err_msg_res("no mismatched stores, except on raw memory: %s %s", NodeClassNames[Opcode()], NodeClassNames[st->Opcode()])); + + if (st->in(MemNode::Address)->eqv_uncast(address) && +diff --git a/hotspot/src/share/vm/opto/parse1.cpp b/hotspot/src/share/vm/opto/parse1.cpp +index da0c6dd6..a9ef4f91 100644 +--- a/hotspot/src/share/vm/opto/parse1.cpp ++++ b/hotspot/src/share/vm/opto/parse1.cpp +@@ -958,7 +958,7 @@ void Parse::do_exits() { + // stores. We want to quarantee the same behaviour as on platforms + // with total store order, although this is not required by the Java + // memory model. So as with finals, we add a barrier here. +- if (wrote_final() PPC64_ONLY(|| (wrote_volatile() && method()->is_initializer()))) { ++ if (method()->is_initializer() && (wrote_final() PPC64_ONLY(|| wrote_volatile()))) { + // This method (which must be a constructor by the rules of Java) + // wrote a final. The effects of all initializations must be + // committed to memory before any code after the constructor +diff --git a/hotspot/src/share/vm/opto/superword.cpp b/hotspot/src/share/vm/opto/superword.cpp +index a14210ee..2b7e7af2 100644 +--- a/hotspot/src/share/vm/opto/superword.cpp ++++ b/hotspot/src/share/vm/opto/superword.cpp +@@ -1480,7 +1480,9 @@ void SuperWord::output() { + #endif + } + } +- C->set_max_vector_size(max_vlen_in_bytes); ++ if (max_vlen_in_bytes > C->max_vector_size()) { ++ C->set_max_vector_size(max_vlen_in_bytes); ++ } + } + + //------------------------------vector_opd--------------------------- +diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp +index ebb5e114..5dad53a7 100644 +--- a/hotspot/src/share/vm/runtime/arguments.cpp ++++ b/hotspot/src/share/vm/runtime/arguments.cpp +@@ -2174,7 +2174,7 @@ void Arguments::set_bytecode_flags() { + void Arguments::set_boxtype_cached_max_flags() { + if (!AggressiveOpts) { + if (!FLAG_IS_DEFAULT(BoxTypeCachedMax)) { +- int size = 1024; ++ int const size = 1024; + char buffer[size]; + jio_snprintf(buffer, size, "java.lang.Long.LongCache.high=" INTX_FORMAT, BoxTypeCachedMax); + add_property(buffer); +diff --git a/hotspot/src/share/vm/runtime/os.cpp b/hotspot/src/share/vm/runtime/os.cpp +index f5182ea7..3242c666 100644 +--- a/hotspot/src/share/vm/runtime/os.cpp ++++ b/hotspot/src/share/vm/runtime/os.cpp +@@ -67,6 +67,9 @@ + #ifdef TARGET_OS_FAMILY_bsd + # include "os_bsd.inline.hpp" + #endif ++#ifndef _MSC_VER ++#define _MSC_VER 1916 ++#endif + + # include + +diff --git a/hotspot/src/share/vm/runtime/vm_version.cpp b/hotspot/src/share/vm/runtime/vm_version.cpp +index c30ebc28..4be74356 100644 +--- a/hotspot/src/share/vm/runtime/vm_version.cpp ++++ b/hotspot/src/share/vm/runtime/vm_version.cpp +@@ -142,7 +142,12 @@ const char* Abstract_VM_Version::vm_name() { + + + const char* Abstract_VM_Version::vm_vendor() { +- return "Huawei Technologies Co., Ltd"; ++#ifdef VENDOR ++ return VENDOR; ++#else ++ return JDK_Version::is_gte_jdk17x_version() ? ++ "Oracle Corporation" : "Sun Microsystems Inc."; ++#endif + } + + +@@ -226,6 +231,8 @@ const char* Abstract_VM_Version::internal_vm_info_string() { + #define HOTSPOT_BUILD_COMPILER "MS VC++ 12.0 (VS2013)" + #elif _MSC_VER == 1900 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 14.0 (VS2015)" ++ #elif _MSC_VER == 1910 ++ #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.0 (VS2017)" + #elif _MSC_VER == 1911 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.3 (VS2017)" + #elif _MSC_VER == 1912 +@@ -237,7 +244,7 @@ const char* Abstract_VM_Version::internal_vm_info_string() { + #elif _MSC_VER == 1915 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.8 (VS2017)" + #elif _MSC_VER == 1916 +- #define HOTSPOT_BUILD_COMPILER "MS VC++ 15.9 (VS2017)" ++ #define HOTSPOT_BUILD_COMPILER "MS VC++ 16.2 (VS2017)" + #elif _MSC_VER == 1920 + #define HOTSPOT_BUILD_COMPILER "MS VC++ 16.0 (VS2019)" + #elif _MSC_VER == 1921 +diff --git a/hotspot/test/runtime/appcds/UnusedCPDuringDump.java b/hotspot/test/runtime/appcds/UnusedCPDuringDump.java +new file mode 100644 +index 00000000..7ad92392 +--- /dev/null ++++ b/hotspot/test/runtime/appcds/UnusedCPDuringDump.java +@@ -0,0 +1,65 @@ ++/* ++ * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. ++ * 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 8209385 ++ * @summary non-empty dir in -cp should be fine during dump time if only classes ++ * from the system modules are being loaded even though some are ++ * defined to the PlatformClassLoader and AppClassLoader. ++ * @library /testlibrary ++ * @compile test-classes/Hello.java ++ * @run main/othervm -Dtest.cds.copy.child.stdout=false UnusedCPDuringDump ++ */ ++ ++import java.io.File; ++import com.oracle.java.testlibrary.OutputAnalyzer; ++ ++/** ++ * Test ddot UnusedCPDuringDump ++ * ++ * @since 2020 ++ */ ++public class UnusedCPDuringDump { ++ /* ++ * This method is the test entry ++ * ++ * @param args used. ++ * @return Nothing. ++ * @throws RuntimeException On test failed. ++ */ ++ public static void main(String[] args) throws Exception { ++ File dir = new File(System.getProperty("user.dir")); ++ File emptydir = new File(dir, "emptydir"); ++ emptydir.mkdir(); ++ String appJar = JarBuilder.getOrCreateHelloJar(); ++ OutputAnalyzer output = TestCommon.dump(dir.getPath(), ++ TestCommon.list("sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo", ++ "com/sun/tools/sjavac/client/ClientMain")); ++ TestCommon.checkDump(output); ++ String jsaOpt = "-XX:SharedArchiveFile=" + TestCommon.getCurrentArchiveName(); ++ TestCommon.run("-cp", appJar, jsaOpt, "Hello") ++ .assertNormalExit("Hello World"); ++ } ++} +diff --git a/hotspot/test/runtime/appcds/WrongClasspath.java b/hotspot/test/runtime/appcds/WrongClasspath.java +new file mode 100644 +index 00000000..87e35adb +--- /dev/null ++++ b/hotspot/test/runtime/appcds/WrongClasspath.java +@@ -0,0 +1,57 @@ ++/* ++ * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. ++ * 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 ++ * @summary classpath mismatch between dump time and execution time ++ * @library /testlibrary ++ * @compile test-classes/Hello.java ++ * @run main WrongClasspath ++ */ ++ ++import com.oracle.java.testlibrary.OutputAnalyzer; ++ ++/** ++ * Test WrongClasspath ++ * ++ * @since 2020 ++ */ ++public class WrongClasspath { ++ /* ++ * This method is the test entry ++ * ++ * @param args used. ++ * @return Nothing. ++ * @throws RuntimeException On test failed. ++ */ ++ public static void main(String[] args) throws Exception { ++ String appJar = JarBuilder.getOrCreateHelloJar(); ++ // Dump an archive with a specified JAR file in -classpath ++ TestCommon.testDump(appJar, TestCommon.list("Hello")); ++ // Then try to execute the archive without -classpath -- it should fail ++ TestCommon.run( ++ /* "-cp", appJar, */ // <- uncomment this and the execution should succeed ++ "Hello"); ++ } ++} +diff --git a/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java b/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java +index c23dd231..1443fb04 100644 +--- a/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java ++++ b/jdk/src/share/classes/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2020, Huawei Technologies Co., LTD. All rights reserved. ++ * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved. + * 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 --git a/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java b/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java +index a8cce6eb..70563b58 100644 +--- a/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java ++++ b/jdk/src/share/classes/com/huawei/management/AdaptiveHeapMXBean.java +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2020, Huawei Technologies Co., LTD. All rights reserved. ++ * Copyright (c) 2019, Huawei Technologies Co. Ltd. All rights reserved. + * 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 --git a/jdk/src/share/classes/java/io/ObjectInputStream.java b/jdk/src/share/classes/java/io/ObjectInputStream.java +index d8da694e..cdc78242 100644 +--- a/jdk/src/share/classes/java/io/ObjectInputStream.java ++++ b/jdk/src/share/classes/java/io/ObjectInputStream.java +@@ -410,6 +410,11 @@ public class ObjectInputStream + new sun.security.action.GetBooleanAction( + "printFastSerializer")).booleanValue(); + ++ /** ++ * Magic number that is written to the stream header when using fastserilizer. ++ */ ++ private static final short STREAM_MAGIC_FAST = (short)0xdeca; ++ + /** + * Creates an ObjectInputStream that reads from the specified InputStream. + * A serialization stream header is read from the stream and verified. +@@ -762,7 +767,7 @@ public class ObjectInputStream + * Cache the class meta during serialization. + * Only used in FastSerilizer. + */ +- protected static ConcurrentHashMap> nameToClass = new ConcurrentHashMap<>(); ++ private static ConcurrentHashMap> nameToClass = new ConcurrentHashMap<>(); + + /** + * Load the local class equivalent of the specified stream class +@@ -1007,7 +1012,7 @@ public class ObjectInputStream + + if (s0 != STREAM_MAGIC) { + throw new StreamCorruptedException( +- String.format("invalid stream header: %04X%04X, and FastSerializer is activated", s0, s1)); ++ String.format("invalid stream header: %04X%04X", s0, s1)); + } + + if (!fastSerializerEscapeMode) { +diff --git a/jdk/src/share/classes/java/io/ObjectOutputStream.java b/jdk/src/share/classes/java/io/ObjectOutputStream.java +index 3890efc3..23c1fff5 100644 +--- a/jdk/src/share/classes/java/io/ObjectOutputStream.java ++++ b/jdk/src/share/classes/java/io/ObjectOutputStream.java +@@ -250,6 +250,11 @@ public class ObjectOutputStream + new sun.security.action.GetBooleanAction( + "printFastSerializer")).booleanValue(); + ++ /** ++ * Magic number that is written to the stream header when using fastserilizer. ++ */ ++ private static final short STREAM_MAGIC_FAST = (short)0xdeca; ++ + /** + * Creates an ObjectOutputStream that writes to the specified OutputStream. + * This constructor writes the serialization stream header to the +diff --git a/jdk/src/share/classes/java/io/ObjectStreamClass.java b/jdk/src/share/classes/java/io/ObjectStreamClass.java +index fce3c347..5b8364b8 100644 +--- a/jdk/src/share/classes/java/io/ObjectStreamClass.java ++++ b/jdk/src/share/classes/java/io/ObjectStreamClass.java +@@ -290,7 +290,7 @@ public class ObjectStreamClass implements Serializable { + * + * @return the flags for this class described by this descriptor + */ +- public byte getFlags(Object serialStream) { ++ byte getFlags(Object serialStream) { + byte flags = 0; + if (externalizable) { + flags |= ObjectStreamConstants.SC_EXTERNALIZABLE; +diff --git a/jdk/src/share/classes/java/io/ObjectStreamConstants.java b/jdk/src/share/classes/java/io/ObjectStreamConstants.java +index 59179a6e..23f72b43 100644 +--- a/jdk/src/share/classes/java/io/ObjectStreamConstants.java ++++ b/jdk/src/share/classes/java/io/ObjectStreamConstants.java +@@ -38,11 +38,6 @@ public interface ObjectStreamConstants { + */ + final static short STREAM_MAGIC = (short)0xaced; + +- /** +- * Magic number that is written to the stream header when using fastserilizer. +- */ +- static final short STREAM_MAGIC_FAST = (short)0xdeca; +- + /** + * Version number that is written to the stream header. + */ +diff --git a/jdk/src/share/classes/sun/awt/FontConfiguration.java b/jdk/src/share/classes/sun/awt/FontConfiguration.java +index 93e38e06..0657b07b 100644 +--- a/jdk/src/share/classes/sun/awt/FontConfiguration.java ++++ b/jdk/src/share/classes/sun/awt/FontConfiguration.java +@@ -266,6 +266,15 @@ public abstract class FontConfiguration { + private File findFontConfigFile(String javaLib) { + String baseName = javaLib + File.separator + "fontconfig"; + File configFile; ++ String useFontConfig = System.getProperty("useFontConfig"); ++ if (FontUtilities.isLinux && (useFontConfig == null || !useFontConfig.equals("true"))) { ++ foundOsSpecificFile = false; ++ configFile = findImpl(baseName); ++ if (configFile != null) { ++ return configFile; ++ } ++ return null; ++ } + String osMajorVersion = null; + if (osVersion != null && osName != null) { + configFile = findImpl(baseName + "." + osName + "." + osVersion); +diff --git a/jdk/src/share/classes/sun/font/FontScaler.java b/jdk/src/share/classes/sun/font/FontScaler.java +index fa3e2754..8271b9fe 100644 +--- a/jdk/src/share/classes/sun/font/FontScaler.java ++++ b/jdk/src/share/classes/sun/font/FontScaler.java +@@ -94,11 +94,7 @@ public abstract class FontScaler implements DisposerRecord { + boolean.class, int.class}; + + try { +- if (FontUtilities.isOpenJDK) { + scalerClass = Class.forName("sun.font.FreetypeFontScaler"); +- } else { +- scalerClass = Class.forName("sun.font.T2KFontScaler"); +- } + } catch (ClassNotFoundException e) { + scalerClass = NullFontScaler.class; + } +diff --git a/jdk/src/share/classes/sun/font/FontUtilities.java b/jdk/src/share/classes/sun/font/FontUtilities.java +index 04a4f9f5..525874bd 100644 +--- a/jdk/src/share/classes/sun/font/FontUtilities.java ++++ b/jdk/src/share/classes/sun/font/FontUtilities.java +@@ -124,7 +124,7 @@ public final class FontUtilities { + jreLibDirName + File.separator + "fonts"; + File lucidaFile = new File(jreFontDirName + File.separator + + LUCIDA_FILE_NAME); +- isOpenJDK = !lucidaFile.exists(); ++ isOpenJDK = true; + + String debugLevel = + System.getProperty("sun.java2d.debugfonts"); +diff --git a/jdk/src/share/classes/sun/font/SunFontManager.java b/jdk/src/share/classes/sun/font/SunFontManager.java +index 2f34b8ca..9e2de3cf 100644 +--- a/jdk/src/share/classes/sun/font/SunFontManager.java ++++ b/jdk/src/share/classes/sun/font/SunFontManager.java +@@ -438,11 +438,17 @@ public abstract class SunFontManager implements FontSupport, FontManagerForSGE { + /* Create the font configuration and get any font path + * that might be specified. + */ +- fontConfig = createFontConfiguration(); +- if (isOpenJDK()) { +- String[] fontInfo = getDefaultPlatformFont(); +- defaultFontName = fontInfo[0]; +- defaultFontFileName = fontInfo[1]; ++ try { ++ fontConfig = createFontConfiguration(); ++ if (isOpenJDK()) { ++ String[] fontInfo = getDefaultPlatformFont(); ++ defaultFontName = fontInfo[0]; ++ defaultFontFileName = fontInfo[1]; ++ } ++ } catch(Exception e) { ++ e.printStackTrace(); ++ System.out.println("initialize default Font fail,start use HuaweiJDK font"); ++ FontUtilities.isOpenJDK = false; + } + + String extraFontPath = fontConfig.getExtraFontPath(); +diff --git a/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c b/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c +index 7647daaa..1f75e7cb 100644 +--- a/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c ++++ b/jdk/src/share/native/com/huawei/jvm/gc/AdaptiveHeapMXBeanImpl.c +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2020, Huawei Technologies Co., LTD. All rights reserved. ++ * Copyright (c) 2020 Huawei Group Holding Limited. All Rights Reserved. + * 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 --git a/jdk/src/share/native/java/lang/System.c b/jdk/src/share/native/java/lang/System.c +index 758cfabb..ff80b0ab 100644 +--- a/jdk/src/share/native/java/lang/System.c ++++ b/jdk/src/share/native/java/lang/System.c +@@ -110,13 +110,13 @@ Java_java_lang_System_identityHashCode(JNIEnv *env, jobject this, jobject x) + + /* Third party may overwrite these values. */ + #ifndef VENDOR +-#define VENDOR "Huawei Technologies Co., Ltd" ++#define VENDOR "Oracle Corporation" + #endif + #ifndef VENDOR_URL +-#define VENDOR_URL "http://jdk.rnd.huawei.com/" ++#define VENDOR_URL "http://java.oracle.com/" + #endif + #ifndef VENDOR_URL_BUG +-#define VENDOR_URL_BUG "http://jdk.rnd.huawei.com/" ++#define VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/" + #endif + + #define JAVA_MAX_SUPPORTED_VERSION 52 +diff --git a/jdk/src/share/native/sun/font/freetypeScaler.c b/jdk/src/share/native/sun/font/freetypeScaler.c +index a6915dbd..0b6c9eff 100644 +--- a/jdk/src/share/native/sun/font/freetypeScaler.c ++++ b/jdk/src/share/native/sun/font/freetypeScaler.c +@@ -43,6 +43,7 @@ + #include FT_SYNTHESIS_H + #include FT_LCD_FILTER_H + #include FT_MODULE_H ++#include FT_LCD_FILTER_H + + #include "fontscaler.h" + +diff --git a/jdk/src/solaris/classes/sun/awt/FcFontManager.java b/jdk/src/solaris/classes/sun/awt/FcFontManager.java +index 0b3ef6a8..5707f53c 100644 +--- a/jdk/src/solaris/classes/sun/awt/FcFontManager.java ++++ b/jdk/src/solaris/classes/sun/awt/FcFontManager.java +@@ -73,12 +73,14 @@ public class FcFontManager extends SunFontManager { + getFontConfigManager().initFontConfigFonts(false); + FontConfigManager.FcCompFont[] fontConfigFonts = + getFontConfigManager().getFontConfigFonts(); +- for (int i=0; i 0 && ++ if (fontConfigFonts != null && fontConfigFonts.length > 0 && + fontConfigFonts[0].firstFont.fontFile != null) { + info[0] = fontConfigFonts[0].firstFont.familyName; + info[1] = fontConfigFonts[0].firstFont.fontFile; +diff --git a/jdk/src/solaris/classes/sun/awt/fontconfigs/fontconfig.Euler.properties b/jdk/src/solaris/classes/sun/awt/fontconfigs/fontconfig.Euler.properties +new file mode 100644 +index 00000000..ff14dfd0 +--- /dev/null ++++ b/jdk/src/solaris/classes/sun/awt/fontconfigs/fontconfig.Euler.properties +@@ -0,0 +1,70 @@ ++## ++version=1 ++# ++## Component Font Mappings ++ ++# Chinese mapping ++serif.plain.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++serif.bold.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++serif.italic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++serif.bolditalic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++ ++sansserif.plain.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++sansserif.bold.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++sansserif.italic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++sansserif.bolditalic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++ ++monospaced.plain.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++monospaced.bold.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++monospaced.italic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++monospaced.bolditalic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++ ++dialog.plain.chinese-arphic1=-misc-wenquanyi micro hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++dialog.bold.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++dialog.italic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++dialog.bolditalic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++ ++dialoginput.plain.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++dialoginput.bold.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++dialoginput.italic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++dialoginput.bolditalic.chinese-arphic1=-misc-wenquanyi zen hei-medium-r-normal--0-0-0-0-p-0-iso10646-1 ++ ++# English mapping ++serif.plain.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++serif.bold.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++serif.italic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++serif.bolditalic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++ ++sansserif.plain.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++sansserif.bold.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++sansserif.italic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++sansserif.bolditalic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++ ++monospaced.plain.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++monospaced.bold.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++monospaced.italic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++monospaced.bolditalic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++ ++dialog.plain.latin-1=-misc-roboto-medium-r-normal--*-%d-*-*-p-*-iso8859-1 ++dialog.bold.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++dialog.italic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++dialog.bolditalic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++ ++ ++dialoginput.plain.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++dialoginput.bold.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++dialoginput.italic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++dialoginput.bolditalic.latin-1=-misc-dejavu sans-medium-r-normal--0-0-0-0-p-0-iso8859-1 ++# ++## Search Sequences ++# ++ ++sequence.allfonts=latin-1 ++sequence.fallback=chinese-arphic1 ++## Exclusion Ranges ++# ++## Font File Names ++filename.-misc-dejavu_sans-medium-r-normal--0-0-0-0-p-0-iso8859-1=/usr/share/fonts/dejavu/DejaVuSans.ttf ++filename.-misc-roboto-medium-r-normal--*-%d-*-*-p-*-iso8859-1=$JRE_LIB_FONTS/Roboto-Regular.ttf ++filename.-misc-wenquanyi_zen_hei-medium-r-normal--0-0-0-0-p-0-iso10646-1=/usr/share/fonts/wqy-zenhei/wqy-zenhei.ttc ++filename.-misc-wenquanyi_micro_hei-medium-r-normal--0-0-0-0-p-0-iso10646-1=/usr/share/fonts/wqy-microhei/wqy-microhei.ttc +diff --git a/jdk/src/solaris/classes/sun/awt/fontconfigs/fontconfig.properties b/jdk/src/solaris/classes/sun/awt/fontconfigs/fontconfig.properties +new file mode 100644 +index 00000000..298a6de8 +--- /dev/null ++++ b/jdk/src/solaris/classes/sun/awt/fontconfigs/fontconfig.properties +@@ -0,0 +1,45 @@ ++version=1 ++ ++# Component Font Mappings ++ ++ ++serif.plain.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++serif.bold.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++serif.italic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++serif.bolditalic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++ ++ ++sansserif.plain.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++sansserif.bold.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++sansserif.italic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++sansserif.bolditalic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++ ++ ++monospaced.plain.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++monospaced.bold.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++monospaced.italic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++monospaced.bolditalic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++ ++ ++dialog.plain.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++dialog.bold.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++dialog.italic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++dialog.bolditalic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++ ++ ++dialoginput.plain.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++dialoginput.bold.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++dialoginput.italic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++dialoginput.bolditalic.latin-1=-misc-adamina-medium-r-normal-*-%d-*-*-p-*-iso8859-1 ++ ++# Search Sequences ++# Search Sequences ++ ++sequence.allfonts=latin-1 ++sequence.allfonts=latin-1 ++ ++# Exclusion Ranges ++# Exclusion Ranges ++ ++# Font File Names ++# Font File Names +diff --git a/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java b/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java +index 6c28d201..a64dcda4 100644 +--- a/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java ++++ b/jdk/src/solaris/classes/sun/awt/motif/MFontConfiguration.java +@@ -159,7 +159,10 @@ public class MFontConfiguration extends FontConfiguration { + } else if (osName.equals("Linux")) { + try { + File f; +- if ((f = new File("/etc/fedora-release")).canRead()) { ++ if ((f = new File("/etc/euleros-release")).canRead()) { ++ osName = "Euler"; ++ osVersion = getVersionString(f); ++ } else if ((f = new File("/etc/fedora-release")).canRead()) { + osName = "Fedora"; + osVersion = getVersionString(f); + } else if ((f = new File("/etc/redhat-release")).canRead()) { +diff --git a/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c b/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c +index 9b3ff819..bb9be2cc 100644 +--- a/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c ++++ b/jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c +@@ -63,6 +63,11 @@ + #include "sun_nio_ch_FileDispatcherImpl.h" + #include "java_lang_Long.h" + ++#if defined(aarch64) ++ __asm__(".symver fcntl64,fcntl@GLIBC_2.17"); ++#elif defined(amd64) ++ __asm__(".symver fcntl64,fcntl@GLIBC_2.2.5"); ++#endif + static int preCloseFD = -1; /* File descriptor to which we dup other fd's + before closing them for real */ + +diff --git a/jdk/src/windows/classes/sun/awt/windows/fontconfig.properties b/jdk/src/windows/classes/sun/awt/windows/fontconfig.properties +index 5c8883f3..8a9417d7 100644 +--- a/jdk/src/windows/classes/sun/awt/windows/fontconfig.properties ++++ b/jdk/src/windows/classes/sun/awt/windows/fontconfig.properties +@@ -194,6 +194,12 @@ sequence.monospaced.GBK=chinese-ms936,alphabetic,dingbats,symbol,chinese-ms936-e + sequence.dialog.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb + sequence.dialoginput.GBK=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb + ++sequence.serif.UTF-8=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb ++sequence.sansserif.UTF-8=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb ++sequence.monospaced.UTF-8=chinese-ms936,alphabetic,dingbats,symbol,chinese-ms936-extb ++sequence.dialog.UTF-8=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb ++sequence.dialoginput.UTF-8=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extb ++ + sequence.serif.GB18030=alphabetic,chinese-gb18030,dingbats,symbol,chinese-gb18030-extb + sequence.sansserif.GB18030=alphabetic,chinese-gb18030,dingbats,symbol,chinese-gb18030-extb + sequence.monospaced.GB18030=chinese-gb18030,alphabetic,dingbats,symbol,chinese-gb18030-extb +@@ -238,12 +244,12 @@ sequence.dialoginput.x-windows-949=alphabetic,korean,dingbats,symbol + sequence.allfonts.x-windows-874=alphabetic,thai,dingbats,symbol + + sequence.fallback=lucida,symbols,\ +- chinese-ms950,chinese-hkscs,chinese-ms936,chinese-gb18030,\ ++ chinese-ms936,chinese-hkscs,chinese-ms950,chinese-gb18030,\ + japanese,korean,chinese-ms950-extb,chinese-ms936-extb,georgian + + # Exclusion Ranges + +-exclusion.alphabetic=0700-1cff,1d80-1e9f,1f00-2017,2020-20ab,20ad-f8ff ++exclusion.alphabetic=0700-1e9f,1f00-20ab,20ad-f8ff + exclusion.chinese-gb18030=0390-03d6,2200-22ef,2701-27be + exclusion.hebrew=0041-005a,0060-007a,007f-00ff,20ac-20ac + -- Gitee