Ticket #7314 (closed bug: worksforme)
GHCi 64-bit OS X segfaults on interaction with C-libraries
Description
I'm experiencing spurious behaviour (segfaults sometimes) using GHCi when working with code that interacts with C-libraries. It seems to be an OS X only bug.
The spurious behaviour is as follows:
OS X 10.8 (gcc 4.2.1, clang 4.0):
- 32-bit: interpreted and compiled work correctly
- 64-bit: only compiled code works correctly, interpreted code segfaults (11)
OS X 10.6 (gcc 4.2.1, XCode 3.2.6):
- 32-bit: interpreted and compiled code work correctly
- 64-bit: interpreted and compiled code work correctly
Additionally (OS X 10.8): When I run 'ghci' from inside 'gdb' (to find the origin for the segfault), everything works fine (e.g. _no_ segfault).
Here is a link to the crash report given by OS X: http://pastebin.com/jZjfFtm7
And this is the test case:
cabal install gloss --flags"-GLUT GLFW" cabal unpack gloss-examples cd <unpacked-dir>/picture/GameEvent ghci -fno-ghci-sandbox Main.hs main
I'm filing this bug report in relation to the following thread on haskell-cafe, which is about removing the 32-bit recommendation for Haskell Platform on OS X:
http://thread.gmane.org/gmane.comp.lang.haskell.cafe/100652
