JDK-8211064 : [AArch64] Interpreter and c1 don't correctly handle jboolean results in native calls
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 8-aarch64,9,10,11
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • CPU: aarch64
  • Submitted: 2018-09-24
  • Updated: 2021-02-01
  • Resolved: 2018-09-25
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 11 JDK 12 Other
11.0.3Fixed 12 b13Fixed openjdk8u292Fixed
Related Reports
Relates :  
Relates :  
Description
The handlers for jboolean on Aarch64 are incorrect.  This can lead to wrong results being passed as return values from native calls which return jboolean values if these values are not exactly '1' or '0' (i.e. a return value of '2' will be interpreted as 'false').
This is a dup of bug 8209637.
Comments
This also affected 8u aarch64 port, and was fixed there a while ago: https://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah/hotspot/rev/96d806855d19
06-09-2019

Fix Request This fixes the corner case in JNI jboolean handling and AArch64. Patch applies cleanly to 11u, passes AArch64 build. JNIBooleanTest fails on AArch64 without the patch, and passes with it. The risk for aarch64 is low, and non-existent for other platforms.
14-03-2019

jdk11u fix because this P2 bug was for some reason never back-ported to 11. This should also get a clean tier1 jtreg run. Very low risk for non-AArch64 ports, fixes regression test.
14-03-2019