Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8295159

DSO created with -ffast-math breaks Java floating-point arithmetic

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 22
    • 8, 11, 17, 20, 21
    • hotspot
    • b23
    • generic

    Description

      A bug in GCC causes shared libraries linked with -ffast-math to disable denormal arithmetic. This breaks Java's floating-point semantics.

      The bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522

      One solution is to save and restore the floating-point control word around System.loadLibrary(). This isn't perfect, because some shared library might load another shared library at runtime, but it's a lot better than what we do now.

      Attachments

        Issue Links

          Activity

            People

              aph Andrew Haley
              aph Andrew Haley
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: