[GHC] #15105: `typecheckModule` from GHC API crashes on MacOS for files with TH

GHC ghc-devs at haskell.org
Mon Apr 30 14:20:08 UTC 2018


#15105: `typecheckModule` from GHC API crashes on MacOS for files with TH
----------------------------------------+----------------------------------
           Reporter:  harpocrates       |             Owner:  (none)
               Type:  bug               |            Status:  new
           Priority:  normal            |         Milestone:  8.6.1
          Component:  GHC API           |           Version:  8.4.2
           Keywords:                    |  Operating System:  MacOS X
       Architecture:  Unknown/Multiple  |   Type of failure:  Runtime crash
          Test Case:                    |        Blocked By:
           Blocking:                    |   Related Tickets:
Differential Rev(s):                    |         Wiki Page:
----------------------------------------+----------------------------------
 I believe this is the same issue that is causing manually built `haddock`
 and `doctest` to crash on MacOS when fed TH (originally reported
 https://github.com/haskell/haddock/issues/767 and
 https://github.com/sol/doctest/issues/199).

 I've attached a minimal program that uses the GHC API and exhibits the
 same problem.

 {{{
 $ ghc-8.4.2 -package ghc -package containers -package ghc-paths Prog.hs
 [1 of 1] Compiling Main             ( Prog.hs, Prog.o )
 Linking Prog ...
 $ ./Prog Main-no-TH.hs -package template-haskell
 $ ./Prog Main-TH.hs -package template-haskell
 Prog:
 lookupSymbol failed in relocateSection (RELOC_GOT)
 /usr/local/lib/ghc-8.4.2/integer-gmp-1.0.2.0/HSinteger-gmp-1.0.2.0.o:
 unknown symbol `___gmp_rands'
 Prog: Prog: unable to load package `integer-gmp-1.0.2.0'
 }}}

 In case it isn't clear, I do not expect `Main-TH.hs` to crash `Prog`.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15105>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list