Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-9290

C++ applications linked against ROS msvcrt crash when throwing exceptions on Server 2003

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 0.4.0
    • CRT
    • None

    Description

      There are three versions of __CxxFrameHandler:

      • __CxxFrameHandler, handles VC6-type exception descriptors
      • __CxxFrameHandler2, handles VC6/7-type exception descriptors
      • __CxxFrameHandler3, handles VC6/7/8-type exception descriptors

      When exported from msvcrt, these all point to the same implementation. However while new versions of Windows support all three types of descriptors, Windows Server 2003 only supports the VC6 and VC7 versions, and consequently does not export __CxxFrameHandler3.

      In msvcrtex, we simply forward __CxxFrameHandler3 (the one used by all modern compilers) to __CxxFrameHandler. Exceptions work correctly on ReactOS and modern Windows versions this way, however they will cause the C runtime to call abort() on Server 2003.
      The solution to this is to provide a version of __CxxFrameHandler3 in msvcrtex that will translate a modern descriptor into a VC7-compatible one, thus making it possible to call msvcrt.dll's __CxxExceptionHandler on all platforms.

      Attachments

        Issue Links

          Activity

            People

              ThFabba ThFabba
              ThFabba ThFabba
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: