Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8295159: DSO created with -ffast-math breaks Java floating-point arithmetic #1111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bulasevich
Copy link

@bulasevich bulasevich commented Oct 30, 2024

Hi all,

backport https://bugs.openjdk.org/browse/JDK-8295159 to fix broken Java floating-point arithmetic.

Minor merge conflicts in os_linux.cpp and os_bsd.cpp have been resolved manually. The conflict is with the NativeLibraryLoadEvent tracing applied on the mainline around the dlopen() call: openjdk/jdk#16903

The fix passed tier1-3 jtreg tests.

Thank you


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8295159 needs maintainer approval

Issue

  • JDK-8295159: DSO created with -ffast-math breaks Java floating-point arithmetic (Bug - P4 - Requested)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/1111/head:pull/1111
$ git checkout pull/1111

Update a local copy of the PR:
$ git checkout pull/1111
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/1111/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1111

View PR using the GUI difftool:
$ git pr show -t 1111

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/1111.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 30, 2024

👋 Welcome back bulasevich! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Oct 30, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title Backport df599dbb9b0f0ee96d1ec767ac8821f164ab075d 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic Oct 30, 2024
@openjdk
Copy link

openjdk bot commented Oct 30, 2024

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Oct 30, 2024
@mlbridge
Copy link

mlbridge bot commented Oct 30, 2024

Webrevs

@openjdk
Copy link

openjdk bot commented Oct 31, 2024

⚠️ @bulasevich This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@bulasevich
Copy link
Author

/approval request
I ask for backport approval for stability reasons. Wrong floating-point arithmetic can put the application in a very incorrect state. The change is simple and safe.

@openjdk
Copy link

openjdk bot commented Oct 31, 2024

@bulasevich
8295159: The approval request has been created successfully.

@openjdk openjdk bot added the approval label Oct 31, 2024
@GoeLin
Copy link
Member

GoeLin commented Nov 1, 2024

Hi @bulasevich , do we need any of the 6 related issues listed in the JBS issue?

@bulasevich
Copy link
Author

Hi @bulasevich , do we need any of the 6 related issues listed in the JBS issue?

Hi @GoeLin

I do not think we need them:

  1. JDK-6487931 JVM reports EXCEPTION_FLT_STACK_CHECK when calling a Java method through JNI
    Resolved: 2011-03-07
  2. JDK-6550813 Crash because of FPU control word being modified by native code (win32)
    Resolved: 2011-04-25
  3. JDK-8317810 DSO created with -ffast-math breaks Java floating-point arithmetic
    Unresolved. It is a JBS record for further similar change for x86 platform.
  4. JDK-8321017 Record in JFR that IEEE rounding mode was corrupted by loading a library
    JFR improvement. I do not think it is necessary to backport.
  5. JDK-8319708 Assertion 'fsetenv didn't work' in jdk tier4 tests after 8295159 on Linux aarch64 RHEL9.3
    Closed (User error)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approval backport rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

3 participants