代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/openjdk-1.8.0 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 0b24d78d6e226413d9e95eb13646a313dd2396ef Mon Sep 17 00:00:00 2001
From: zhangyipeng <zhangyipeng7@huawei.com>
Date: Thu, 11 Mar 2021 16:31:50 +0800
Subject: [PATCH] [Huawei]update to keep same with master
Signed-off-by: Lin Haibing <linhaibing@huawei.com>
---
.../share/vm/classfile/systemDictionary.cpp | 51 +++++++++----------
4 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp
index c3dec0a30..201dd9594 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,32 @@ 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);
- }
+ 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();
+ 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) {
--
2.19.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。