GHCi 64-bit OS X segfaults on interaction with C-libraries
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:[[BR]][[BR]] OS X 10.8 (gcc 4.2.1, clang 4.0):[[BR]]
- 32-bit: interpreted and compiled work correctly[[BR]]
- 64-bit: only compiled code works correctly, interpreted code segfaults (11)
OS X 10.6 (gcc 4.2.1, XCode 3.2.6):[[BR]]
- 32-bit: interpreted and compiled code work correctly[[BR]]
- 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:[[BR]] http://thread.gmane.org/gmane.comp.lang.haskell.cafe/100652
Trac metadata
Trac field | Value |
---|---|
Version | 7.4.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |