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

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

XMLWordPrintable

    • b23
    • generic

        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.

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

                Created:
                Updated:
                Resolved: