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

win32 JVM relies on VC++ startup code to disable floating point exceptions

XMLWordPrintable

    • 1.0fcs
    • x86
    • windows_95
    • Not verified

      The Win32 VM assumes that floating point exceptions are
      disabled and will not function properly if FP exceptions are enabled. It relies
      on the VC++ startup code for the JAVAI DLL to disable these exceptions
      and set other bits in the Machine Status Word (MSW) of the floating point
      unit. This assumption is a dangerous one. If an application links to
      javai.dll and other DLLs, it is possible that the load order of the DLLs will
      be such that another DLL is loaded *AFTER* javai.dll. JAVAI's initialization code will disable floating point exceptions, but another DLL's
      initialization code might enable some of them. It turns out that DLLs built
      with Borland C++ set the MSW differently (different precision and some
      exceptions). Other compilers may make different assumptions (there is
      nothing in the Win32 execution model that dictates how these should be
      set). So it is quite possible that some DLL will set the MSW to something
      incompatible with the VM.

            tlindholsunw Timothy Lindholm (Inactive)
            rschiavisunw Richard Schiavi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: