1 Star 0 Fork 81

wujiahua/openjdk-1.8.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
8191129.patch 5.34 KB
一键复制 编辑 原始数据 按行查看 历史
jdkboy 提交于 2020-03-21 11:30 . delete redundant info
From aee65626b97f366705d47c2d02df34aca5c64251 Mon Sep 17 00:00:00 2001
Date: Fri, 12 Jul 2019 12:45:54 +0000
Subject: [PATCH] Backport of JDK-8191129
summary: AARCH64: Invalid value passed to critical JNI function
LLT:
Bug url: https://bugs.openjdk.java.net/browse/JDK-8191129
---
.../src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp | 2 +-
hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp | 3 +++
hotspot/src/share/vm/runtime/arguments.cpp | 22 ----------------------
hotspot/src/share/vm/runtime/arguments.hpp | 22 ++++++++++++++++++++++
4 files changed, 26 insertions(+), 23 deletions(-)
diff --git a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp
index 3eec8a3273..c48f2235ee 100644
--- a/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/sharedRuntime_aarch64.cpp
@@ -1660,7 +1660,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
// critical natives they are offset down.
GrowableArray<int> arg_order(2 * total_in_args);
VMRegPair tmp_vmreg;
- tmp_vmreg.set1(r19->as_VMReg());
+ tmp_vmreg.set2(r19->as_VMReg());
if (!is_critical_native) {
for (int i = total_in_args - 1, c_arg = total_c_args - 1; i >= 0; i--, c_arg--) {
diff --git a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp
index fe0f49a209..df81bacbd7 100644
--- a/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp
+++ b/hotspot/src/cpu/aarch64/vm/vm_version_aarch64.cpp
@@ -31,6 +31,7 @@
#include "runtime/java.hpp"
#include "runtime/stubCodeGenerator.hpp"
#include "vm_version_aarch64.hpp"
+#include "runtime/arguments.hpp"
#ifdef TARGET_OS_FAMILY_linux
# include "os_linux.inline.hpp"
#endif
@@ -343,4 +344,6 @@ void VM_Version::initialize() {
g.generate_getPsrInfo());
get_processor_features();
+
+ UNSUPPORTED_OPTION(CriticalJNINatives, "CriticalJNINatives");
}
diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp
index 6995c30405..83f5d3cfee 100644
--- a/hotspot/src/share/vm/runtime/arguments.cpp
+++ b/hotspot/src/share/vm/runtime/arguments.cpp
@@ -76,28 +76,6 @@
#endif
#define DEFAULT_JAVA_LAUNCHER "generic"
-// Disable options not supported in this release, with a warning if they
-// were explicitly requested on the command-line
-#define UNSUPPORTED_OPTION(opt, description) \
-do { \
- if (opt) { \
- if (FLAG_IS_CMDLINE(opt)) { \
- warning(description " is disabled in this release."); \
- } \
- FLAG_SET_DEFAULT(opt, false); \
- } \
-} while(0)
-
-#define UNSUPPORTED_GC_OPTION(gc) \
-do { \
- if (gc) { \
- if (FLAG_IS_CMDLINE(gc)) { \
- warning(#gc " is not supported in this VM. Using Serial GC."); \
- } \
- FLAG_SET_DEFAULT(gc, false); \
- } \
-} while(0)
-
char** Arguments::_jvm_flags_array = NULL;
int Arguments::_num_jvm_flags = 0;
char** Arguments::_jvm_args_array = NULL;
diff --git a/hotspot/src/share/vm/runtime/arguments.hpp b/hotspot/src/share/vm/runtime/arguments.hpp
index 86c415e6a2..a5cd59ea60 100644
--- a/hotspot/src/share/vm/runtime/arguments.hpp
+++ b/hotspot/src/share/vm/runtime/arguments.hpp
@@ -39,6 +39,28 @@ extern "C" {
typedef jint (JNICALL *vfprintf_hook_t)(FILE *fp, const char *format, va_list args) ATTRIBUTE_PRINTF(2, 0);
}
+// Disable options not supported in this release, with a warning if they
+// were explicitly requested on the command-line
+#define UNSUPPORTED_OPTION(opt, description) \
+do { \
+ if (opt) { \
+ if (FLAG_IS_CMDLINE(opt)) { \
+ warning(description " is disabled in this release."); \
+ } \
+ FLAG_SET_DEFAULT(opt, false); \
+ } \
+} while(0)
+
+#define UNSUPPORTED_GC_OPTION(gc) \
+do { \
+ if (gc) { \
+ if (FLAG_IS_CMDLINE(gc)) { \
+ warning(#gc " is not supported in this VM. Using Serial GC."); \
+ } \
+ FLAG_SET_DEFAULT(gc, false); \
+ } \
+} while(0)
+
// Forward declarations
class SysClassPath;
--
2.12.3
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/varlardohaeris/openjdk-1.8.0.git
git@gitee.com:varlardohaeris/openjdk-1.8.0.git
varlardohaeris
openjdk-1.8.0
openjdk-1.8.0
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385