Failure to catch C++ exception in Haskell on OS X

Any Haskell / Nix / OS X hackers that can help me with the following?

I’m trying to fix issue #123 in haskell-opencv. In summary the problem is as follows:

  • A function in the OpenCV C++ library throws an exception.
  • The haskell-opencv library provides a binding to this function but wraps it in a try...catch block to intercept the C++ exception and turn it into a Haskell exception.
  • The haskell-opencv test-suite has a test to see if this function correctly throws an exception.
  • On Linux this test succeeds. On OS X the process terminates via SIGABRT.

I created a minimal isolated test that exhibits the same behavior at: