Skip to content

Segfault on OS X in GHCi when using GHC API

(This might be related to #5072 (closed).)

I get a segfault when loading and running the following simple program in GHCi:

import GHC
import DynFlags

main = do
  defaultErrorHandler defaultDynFlags $ do
    (a,b) <- parseStaticFlags []
    print "42"
$ ghci -package ghc bug3.hs
GHCi, version 7.0.2: http://www.haskell.org/ghc/  :? for help

Ok, modules loaded: Main.
Prelude Main> main
Bus error

It works fine on x86-64 linux or when I compile the code. I have not tested whether it fails on x86 as well.

Trac metadata
Trac field Value
Version 7.0.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information