JDK-8319973 : AArch64: Save and restore FPCR in the call stub
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: aarch64
  • Submitted: 2023-11-13
  • Updated: 2024-10-15
  • Resolved: 2023-11-20
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 21 JDK 22
21.0.6Fixed 22 b25Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
On AArch64 we don't save and restore the default floating-point control state when we enter and leave Java code. We really should, because if we're called via the JNI invocation interface with a weird FP control state we'll not be Java compatible.
Comments
[jdk21u-fix-request] Approval Request from Boris Clean backport to ensure correct FPCR handling and to avoid unexpected behavior. Applying it to earlier releases will ensure stability and consistency across all versions.
10-10-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk21u-dev/pull/1042 Date: 2024-10-09 16:35:32 +0000
09-10-2024

https://bugs.openjdk.org/browse/JDK-8320151?focusedId=14628918&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14628918 shows an experiment with checking the flush to zero bit on return from native methods and it's clearly improperly set.
27-11-2023

[~aph] From JDK-8320151: Shouldn't JDK-8319973 also fix the generated native wrappers? Those don't go through the call_stub.
27-11-2023

Changeset: 6e86904a Author: Andrew Haley <aph@openjdk.org> Date: 2023-11-20 16:38:05 +0000 URL: https://git.openjdk.org/jdk/commit/6e86904a94d2ed2815aa6e3364c048dac595320d
20-11-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16637 Date: 2023-11-13 18:18:35 +0000
13-11-2023