[GHC] #10435: catastrophic exception-handling disablement on Windows Server 2008 R2

GHC ghc-devs at haskell.org
Wed Jun 3 19:43:30 UTC 2015


#10435: catastrophic exception-handling disablement on Windows Server 2008 R2
-------------------------------------+-------------------------------------
        Reporter:  malcolmw          |                   Owner:  simonmar
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Runtime System    |                 Version:  7.10.1
      Resolution:                    |                Keywords:  windows,
Operating System:  Windows           |  exceptions
 Type of failure:  Runtime crash     |            Architecture:  x86
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by simonmar):

 That commit isn't on the 7.10 branch.  You could patch it into a local GHC
 build and see if it helps.

 > If, instead of having the main function in Haskell, we write a wrapper
 main function in C++, that calls the Haskell from a DLL (and the Haskell
 then calls back into C++), the bug does not happen. Hence, we surmise
 there is some ghc RTS initialisation that is specific to Windows, that
 deals with exception handling, and that is incorrect for certain versions
 of Windows.

 The only difference between these two setups is the `main()` function,
 which is pretty small (start with `hs_main`):
 https://phabricator.haskell.org/diffusion/GHC/browse/master/rts/RtsMain.c

 Really the only thing in there that looks remotely suspicious is the SEH
 stuff that was touched by 5200bdeb26c5ec98739b14b10fc8907296bceeb9, so
 that looks like the most likely suspect.  It only does a setjmp/longjump,
 but perhaps that interacts badly with that particular version of MSVCRT.
 Or something.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10435#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list