[GHC] #12110: Windows exception handler change causes segfault with API Monitor

GHC ghc-devs at haskell.org
Tue Sep 26 19:39:42 UTC 2017


#12110: Windows exception handler change causes segfault with API Monitor
-------------------------------------+-------------------------------------
        Reporter:  enolan            |                Owner:  (none)
            Type:  bug               |               Status:  patch
        Priority:  normal            |            Milestone:  8.4.1
       Component:  Runtime System    |              Version:  8.0.1
      Resolution:                    |             Keywords:
Operating System:  Windows           |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Runtime crash     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D3911
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"1825cbdbdf08ed4bd6fd6794852596078953298a/ghc"
 1825cbdb/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="1825cbdbdf08ed4bd6fd6794852596078953298a"
 Switch VEH to VCH and allow disabling of SEH completely.

 Exception handling on Windows is unfortunately a bit complicated.
 But essentially the VEH Handlers we currently have are running too
 early.

 This was a problem as it ran so early it also swallowed C++ exceptions
 and other software exceptions which the system could have very well
 recovered from.

 So instead we use a sequence of chains to for the exception handlers to
 run as late as possible. You really can't get any later than this.

 Please read the comment in the patch for more details.

 I'm also providing a switch to allow people to turn off the exception
 handling entirely. In case it does present a problem with their code.

 Test Plan: ./validate

 Reviewers: austin, hvr, bgamari, erikd, simonmar

 Reviewed By: bgamari

 Subscribers: rwbarton, thomie

 GHC Trac Issues: #13911, #12110

 Differential Revision: https://phabricator.haskell.org/D3911
 }}}

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


More information about the ghc-tickets mailing list