logo       

[GHC] #906: "the `impossible' happened: Maybe.fromJust: Nothing" when using: msg#00071

lang.haskell.glasgow.bugs

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

#906: "the `impossible' happened: Maybe.fromJust: Nothing" when using {-# SOURCE
#-}
------------------------------------------------+---------------------------
Reporter: Misha Aizatulin <avatar@xxxxxx> | 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@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_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise