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

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 0.4.0
    • Component/s: CRT
    • Labels:
      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

              • Assignee:
                ThFabba ThFabba
                Reporter:
                ThFabba ThFabba
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: