[GHC] #10761: GHC panic when compiling vimus: failed to map segment from shared object

GHC ghc-devs at haskell.org
Sat Aug 8 23:05:16 UTC 2015


#10761: GHC panic when compiling vimus: failed to map segment from shared object
-------------------------------------+-------------------------------------
        Reporter:  haasn             |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.2
      Resolution:                    |                Keywords:
Operating System:  Linux             |            Architecture:  x86_64
 Type of failure:  Compile-time      |  (amd64)
  crash                              |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by haasn):

 rwbarton came up with a minimal reproduction:

 A.hs
 {{{
 module A where
 foreign import ccall "foo" foo :: IO ()

 bar :: IO ()
 bar = print "hi!"
 {-# NOINLINE bar #-}
 }}}

 B.hs
 {{{
 {-# LANGUAGE TemplateHaskell #-}
 module B where

 import Language.Haskell.TH.Syntax
 import A

 $(runIO bar >> return [])
 }}}

 ghc A.hs B.hs
 {{{
 [1 of 2] Compiling A                ( A.hs, A.o )
 [2 of 2] Compiling B                ( B.hs, B.o )
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.10.2 for x86_64-unknown-linux):
         Loading temp shared object failed: /tmp/ghc23866_0/libghc_7.so:
 undefined symbol: foo

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

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


More information about the ghc-tickets mailing list