8191129: AARCH64: Invalid value passed to critical JNI function
authordchuyko
Fri, 01 Dec 2017 18:20:00 +0300
changeset 48182 5fb0f3f24f6b
parent 48181 61a14b5cb1c6
child 48183 ee8e37f85775
8191129: AARCH64: Invalid value passed to critical JNI function Reviewed-by: vlivanov
src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp
src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
test/hotspot/jtreg/compiler/runtime/criticalnatives/argumentcorruption/CheckLongArgs.java
test/hotspot/jtreg/compiler/runtime/criticalnatives/lookup/LookUp.java
--- a/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp	Fri Dec 01 18:19:39 2017 +0530
+++ b/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp	Fri Dec 01 18:20:00 2017 +0300
@@ -1664,7 +1664,7 @@
   // 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--) {
--- a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp	Fri Dec 01 18:19:39 2017 +0530
+++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp	Fri Dec 01 18:20:00 2017 +0300
@@ -384,4 +384,6 @@
                                    g.generate_getPsrInfo());
 
   get_processor_features();
+
+  UNSUPPORTED_OPTION(CriticalJNINatives);
 }
--- a/test/hotspot/jtreg/compiler/runtime/criticalnatives/argumentcorruption/CheckLongArgs.java	Fri Dec 01 18:19:39 2017 +0530
+++ b/test/hotspot/jtreg/compiler/runtime/criticalnatives/argumentcorruption/CheckLongArgs.java	Fri Dec 01 18:20:00 2017 +0300
@@ -24,7 +24,8 @@
 
 /* @test
  * @bug 8167409
- * @run main/othervm/native -Xcomp compiler.runtime.criticalnatives.argumentcorruption.CheckLongArgs
+ * @requires os.arch != "aarch64"
+ * @run main/othervm/native -Xcomp -XX:+CriticalJNINatives compiler.runtime.criticalnatives.argumentcorruption.CheckLongArgs
  */
 package compiler.runtime.criticalnatives.argumentcorruption;
 public class CheckLongArgs {
--- a/test/hotspot/jtreg/compiler/runtime/criticalnatives/lookup/LookUp.java	Fri Dec 01 18:19:39 2017 +0530
+++ b/test/hotspot/jtreg/compiler/runtime/criticalnatives/lookup/LookUp.java	Fri Dec 01 18:20:00 2017 +0300
@@ -24,7 +24,8 @@
 
 /* @test
  * @bug 8167408
- * @run main/othervm/native -Xcomp compiler.runtime.criticalnatives.lookup.LookUp
+ * @requires os.arch != "aarch64"
+ * @run main/othervm/native -Xcomp -XX:+CriticalJNINatives compiler.runtime.criticalnatives.lookup.LookUp
  */
 package compiler.runtime.criticalnatives.lookup;
 public class LookUp {