Ticket #906 (closed bug: fixed)
"the `impossible' happened: Maybe.fromJust: Nothing" when using {-# SOURCE #-}
| Reported by: | Misha Aizatulin <avatar@…> | Owned by: | simonmar |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.6 |
| Component: | Compiler | Version: | 6.4.2 |
| Keywords: | Cc: | avatar@… | |
| Operating System: | Linux | Architecture: | x86 |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

