
#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