#5031: GHC API (7.0.2) + runhaskell causes bus error in Mac OS X 10.6
---------------------------------+------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Component: GHC API
Version: 7.0.2 | Keywords: ghc api,runhaskell,ghci,segv
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
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.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5031>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs