[GHC] #906: "the `impossible' happened: Maybe.fromJust: Nothing" when using {-# SOURCE #-}

GHC trac at galois.com
Thu Sep 21 18:48:26 EDT 2006


#906: "the `impossible' happened: Maybe.fromJust: Nothing" when using {-# SOURCE
#-}
------------------------------------------------+---------------------------
    Reporter:  Misha Aizatulin <avatar at hot.ee>  |        Owner:         
        Type:  bug                              |       Status:  new    
    Priority:  normal                           |    Milestone:         
   Component:  Compiler                         |      Version:  6.4.2  
    Severity:  normal                           |     Keywords:         
          Os:  Linux                            |   Difficulty:  Unknown
Architecture:  x86                              |  
------------------------------------------------+---------------------------
It is possible to use the {-# SOURCE #-} directive to make ghc crash.
 Attached is a program that does it with ghc 6.4.2. Here is a run of my
 compiler:

 {{{
 avatar at avatar:~/Docs/sandbox/haskell/hs-boot> make
 ghc --make Main.hs
 Chasing modules from: Main.hs
 Compiling C                ( ./C.hs, ./C.o )
 Compiling A                ( ./A.hs, ./A.o )
 Compiling A[boot]          ( ./A.hs-boot, ./A.o-boot )
 Compiling B                ( ./B.hs, ./B.o )
 Compiling Main             ( Main.hs, Main.o )
 Linking ...
 ghc-6.4.2: panic! (the `impossible' happened, GHC version 6.4.2):
         Maybe.fromJust: Nothing
 }}}

 The bang seems to happen in

 {{{
 ./compiler/main/DriverPipeline.hs:320:      linkables = map
 (fromJust.hm_linkable) home_mod_infos
 }}}

 though I'm not 100% sure.

 Cheers,
   Misha

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


More information about the Glasgow-haskell-bugs mailing list