[GHC] #11829: C++ does not catch exceptions when used with Haskell-main and linked by ghc

GHC ghc-devs at haskell.org
Sat Jan 5 02:36:38 UTC 2019


#11829: C++ does not catch exceptions when used with Haskell-main and linked by ghc
-------------------------------------+-------------------------------------
        Reporter:  pl                |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Runtime System    |              Version:  7.10.3
      Resolution:                    |             Keywords:  c++
                                     |  exceptions
Operating System:  MacOS X           |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  Runtime crash     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by basvandijk):

 [[https://mail.haskell.org/pipermail/ghc-devs/2019-January/016748.html|As
 explained on GHC-devs]] I ran into this in our `haskell-opencv` library. I
 can confirm that adding the following to the cabal file of my minimal
 isolated test-case fixes the problem:

 {{{
 if os(darwin)
   ld-options: -Wl,-keep_dwarf_unwind
 }}}

 Shouldn't GHC pass these options by default when linking on OS X?

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


More information about the ghc-tickets mailing list