JDK-8191129 : AARCH64: Invalid value passed to critical JNI function
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: aarch64
  • Submitted: 2017-11-13
  • Updated: 2021-02-11
  • Resolved: 2017-12-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 Other
10 b36Fixed openjdk8u292Resolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
compiler.runtime.criticalnatives.argumentcorruption.CheckLongArgs fails on AArch64.
At first sight the fix from JDK-8167409 looks fine but it actually VM actually crashes with

#  Internal Error (/export/dchuyko/hs10/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp:1130), pid=28285, tid=28327
#  Error: Unimplemented()

Which is SharedRuntime::check_needs_gc_for_critical_native() called from generate_native_wrapper().

CriticalJNI support is at the time implemented in AArch64 port just partially. It will require unpack_array_argument() and generally some save_or_restore_arguments().

For 10 scope I'd propose to do 2 things (both):
1. Adopt original fix for incomplete implementation.
2. Set CriticalJNINatives to false on AArch64.

The latter will allow the test to pass in default configuration. There should be no performance hit currently because critical natives are only used by OracleUcrypto provider on Solaris.
Comments
Updated per comments http://cr.openjdk.java.net/~dchuyko/8191129/webrev.01/
30-11-2017

http://cr.openjdk.java.net/~dchuyko/8191129/webrev.00/ 3. Tests read the flag from WhiteBox and skip values comparison if it is false.
22-11-2017