GHC API (7.0.2) + runhaskell causes bus error in Mac OS X 10.6
On OS X 10.6.6, GHC API causes bus error when it is used from ghci/runhaskell.
Minimal case (ghc-api.hs) is below:
import GHC
import GHC.Paths
main = do
runGhc (Just libdir) $ do
getSessionDynFlags >>= setSessionDynFlags
dynCompileExpr "()"
Run it by "runhaskell", then bus error was occurred. We can also cause same bug using GHCi as below:
Prelude> :m GHC GHC.Paths
Prelude GHC GHC.Paths> runGhc (Just libdir) $ getSessionDynFlags >>= setSessionDynFlags >> dynCompileExpr "()"
Loading package array-0.3.0.2 ... linking ... done.
Loading package containers-0.4.0.0 ... linking ... done.
Loading package pretty-1.0.1.2 ... linking ... done.
Loading package Cabal-1.10.1.0 ... linking ... done.
Loading package bytestring-0.9.1.10 ... linking ... done.
Loading package ghc-binary-0.5.0.2 ... linking ... done.
Loading package bin-package-db-0.0.0.0 ... linking ... done.
Loading package hpc-0.5.0.6 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package ghc-7.0.2 ... linking ... done.
Loading package ghc-paths-0.1.0.8 ... linking ... done.
zsh: segmentation fault ghci
The Crash Report generated by system is attached.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.0.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHC API |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | konn.jinro@gmail.com |
| Operating system | Unknown/Multiple |
| Architecture | Unknown/Multiple |