[GHC] #8202: ghc panic applyTypeToArgs

#8202: ghc panic applyTypeToArgs -----------------------------------+--------------------------------------- Reporter: hth313 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time crash Unknown/Multiple | Test Case: Difficulty: Unknown | Blocking: Blocked By: | Related Tickets: | -----------------------------------+--------------------------------------- Building https://github.com/hth313/hthforth with ghc 7.6.2 on Linux or with 7.6.3 on ppc results in a ghc panic. (It works with ghc 7.2.2 on Mac OS X, I have not tested with any version between 7.2.2 and 7.6.2). Use cabal to build hthforth, vector-bytestring 0.0.0.2 is needed when using ghc 7.6 and it can be downloaded from https://github.com/basvandijk /vector-bytestring (it is currently not on Hackage). [..] [13 of 18] Compiling Language.Forth.Machine[boot] ( src/Language/Forth/Machine.hs-boot, dist/build/ppforth/ppforth- tmp/Language/Forth/Machine.o-boot ) [15 of 18] Compiling Language.Forth.Core[boot] ( src/Language/Forth/Core .hs-boot, dist/build/ppforth/ppforth-tmp/Language/Forth/Core.o-boot ) [17 of 18] Compiling Language.Forth.Core ( src/Language/Forth/Core.hs, dist/build/ppforth/ppforth-tmp/Language/Forth/Core.o ) ghc: panic! (the 'impossible' happened) (GHC version 7.6.2 for x86_64-unknown-linux): applyTypeToArgs main:Language.Forth.Machine.$wlvl{v r1CC} [gid] @ cell{tv i589} [tv] ww_i9uI{v} [lid] ww_i9uJ{v} [lid] ww_i9uK{v} [lid] ww_i9uL{v} [lid] ww_i9uM{v} [lid] ww_i9uN{v} [lid] ww_i9uO{v} [lid] ww_i9uP{v} [lid] ww_i9uQ{v} [lid] ww_i9uR{v} [lid] transformers-0.3.0.0:Control.Monad.Trans.Reader.ReaderT{tc r1fq} (base:GHC.IORef.IORef{tc r1fp} haskeline-0.7.0.3:System.Console.Haskeline.History.History{tc r1fo}) (transformers-0.3.0.0:Control.Monad.Trans.Reader.ReaderT{tc r1fq} (base:GHC.IORef.IORef{tc r1fp} haskeline-0.7.0.3:System.Console.Haskeline.Command.KillRing.KillRing{tc r1fn}) (transformers-0.3.0.0:Control.Monad.Trans.Reader.ReaderT{tc r1fq} haskeline-0.7.0.3:System.Console.Haskeline.Prefs.Prefs{tc r1fO} (transformers-0.3.0.0:Control.Monad.Trans.Reader.ReaderT{tc r1fq} (haskeline-0.7.0.3:System.Console.Haskeline.InputT.Settings{tc r1fX} <nt>ghc-prim:GHC.Types.IO{tc 32I}) <nt>ghc-prim:GHC.Types.IO{tc 32I}))) (base:Data.Either.Either{tc 344} base:GHC.Base.String{tc 36u} (main:Language.Forth.Types.Lit{tc r10z} cell{tv i589} [tv]), main:Language.Forth.Machine.Machine{tc r1ev} cell{tv i589} [tv]) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8202 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8202: ghc panic applyTypeToArgs ---------------------------------------+----------------------------------- Reporter: hth313 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Description changed by simonpj: Old description:
Building https://github.com/hth313/hthforth with ghc 7.6.2 on Linux or with 7.6.3 on ppc results in a ghc panic. (It works with ghc 7.2.2 on Mac OS X, I have not tested with any version between 7.2.2 and 7.6.2).
Use cabal to build hthforth, vector-bytestring 0.0.0.2 is needed when using ghc 7.6 and it can be downloaded from https://github.com/basvandijk /vector-bytestring (it is currently not on Hackage).
[..] [13 of 18] Compiling Language.Forth.Machine[boot] ( src/Language/Forth/Machine.hs-boot, dist/build/ppforth/ppforth- tmp/Language/Forth/Machine.o-boot ) [15 of 18] Compiling Language.Forth.Core[boot] ( src/Language/Forth/Core .hs-boot, dist/build/ppforth/ppforth-tmp/Language/Forth/Core.o-boot ) [17 of 18] Compiling Language.Forth.Core ( src/Language/Forth/Core.hs, dist/build/ppforth/ppforth-tmp/Language/Forth/Core.o ) ghc: panic! (the 'impossible' happened) (GHC version 7.6.2 for x86_64-unknown-linux): applyTypeToArgs main:Language.Forth.Machine.$wlvl{v r1CC} [gid] @ cell{tv i589} [tv] ww_i9uI{v} [lid] ww_i9uJ{v} [lid] ww_i9uK{v} [lid] ww_i9uL{v} [lid] ww_i9uM{v} [lid] ww_i9uN{v} [lid] ww_i9uO{v} [lid] ww_i9uP{v} [lid] ww_i9uQ{v} [lid] ww_i9uR{v} [lid] transformers-0.3.0.0:Control.Monad.Trans.Reader.ReaderT{tc r1fq} (base:GHC.IORef.IORef{tc r1fp} haskeline-0.7.0.3:System.Console.Haskeline.History.History{tc r1fo}) (transformers-0.3.0.0:Control.Monad.Trans.Reader.ReaderT{tc r1fq} (base:GHC.IORef.IORef{tc r1fp} haskeline-0.7.0.3:System.Console.Haskeline.Command.KillRing.KillRing{tc r1fn}) (transformers-0.3.0.0:Control.Monad.Trans.Reader.ReaderT{tc r1fq} haskeline-0.7.0.3:System.Console.Haskeline.Prefs.Prefs{tc r1fO} (transformers-0.3.0.0:Control.Monad.Trans.Reader.ReaderT{tc r1fq} (haskeline-0.7.0.3:System.Console.Haskeline.InputT.Settings{tc r1fX} <nt>ghc-prim:GHC.Types.IO{tc 32I}) <nt>ghc-prim:GHC.Types.IO{tc 32I}))) (base:Data.Either.Either{tc 344} base:GHC.Base.String{tc 36u} (main:Language.Forth.Types.Lit{tc r10z} cell{tv i589} [tv]), main:Language.Forth.Machine.Machine{tc r1ev} cell{tv i589} [tv])
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
New description: Building https://github.com/hth313/hthforth with ghc 7.6.2 on Linux or with 7.6.3 on ppc results in a ghc panic. (It works with ghc 7.2.2 on Mac OS X, I have not tested with any version between 7.2.2 and 7.6.2). Use cabal to build hthforth, vector-bytestring 0.0.0.2 is needed when using ghc 7.6 and it can be downloaded from https://github.com/basvandijk /vector-bytestring (it is currently not on Hackage). {{{ [..] [13 of 18] Compiling Language.Forth.Machine[boot] ( src/Language/Forth/Machine.hs-boot, dist/build/ppforth/ppforth- tmp/Language/Forth/Machine.o-boot ) [15 of 18] Compiling Language.Forth.Core[boot] ( src/Language/Forth/Core .hs-boot, dist/build/ppforth/ppforth-tmp/Language/Forth/Core.o-boot ) [17 of 18] Compiling Language.Forth.Core ( src/Language/Forth/Core.hs, dist/build/ppforth/ppforth-tmp/Language/Forth/Core.o ) ghc: panic! (the 'impossible' happened) (GHC version 7.6.2 for x86_64-unknown-linux): applyTypeToArgs main:Language.Forth.Machine.$wlvl{v r1CC} [gid] @ cell{tv i589} [tv] ww_i9uI{v} [lid] ww_i9uJ{v} [lid] ww_i9uK{v} [lid] ww_i9uL{v} [lid] ww_i9uM{v} [lid] ww_i9uN{v} [lid] ww_i9uO{v} [lid] ww_i9uP{v} [lid] ww_i9uQ{v} [lid] ww_i9uR{v} [lid] transformers-0.3.0.0:Control.Monad.Trans.Reader.ReaderT{tc r1fq} (base:GHC.IORef.IORef{tc r1fp} haskeline-0.7.0.3:System.Console.Haskeline.History.History{tc r1fo}) (transformers-0.3.0.0:Control.Monad.Trans.Reader.ReaderT{tc r1fq} (base:GHC.IORef.IORef{tc r1fp} haskeline-0.7.0.3:System.Console.Haskeline.Command.KillRing.KillRing{tc r1fn}) (transformers-0.3.0.0:Control.Monad.Trans.Reader.ReaderT{tc r1fq} haskeline-0.7.0.3:System.Console.Haskeline.Prefs.Prefs{tc r1fO} (transformers-0.3.0.0:Control.Monad.Trans.Reader.ReaderT{tc r1fq} (haskeline-0.7.0.3:System.Console.Haskeline.InputT.Settings{tc r1fX} <nt>ghc-prim:GHC.Types.IO{tc 32I}) <nt>ghc-prim:GHC.Types.IO{tc 32I}))) (base:Data.Either.Either{tc 344} base:GHC.Base.String{tc 36u} (main:Language.Forth.Types.Lit{tc r10z} cell{tv i589} [tv]), main:Language.Forth.Machine.Machine{tc r1ev} cell{tv i589} [tv]) Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8202#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8202: ghc panic applyTypeToArgs ---------------------------------------+----------------------------------- Reporter: hth313 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by simonpj): I'm betting this is #8184 in a more complicated setting. Is it possible for you to build HEAD and try with that? Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8202#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8202: ghc panic applyTypeToArgs ---------------------------------------+----------------------------------- Reporter: hth313 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Comment (by hth313): I tried and failed to build HEAD (something with Cabal Main, I might have done something wrong, I am new to building ghc). I can make the problem disappear by eliminating the circularity introduced by Core.hs-boot, which indicates it might be #8184. On the other hand, the example in #8184 works with 7.6.3, while my code cause a panic. HÃ¥kan -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8202#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8202: ghc panic applyTypeToArgs ---------------------------------------+----------------------------------- Reporter: hth313 | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time crash | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: ---------------------------------------+----------------------------------- Changes (by monoidal): * status: new => closed * resolution: => fixed Comment: The bug is fixed in HEAD, unfortunately, I cannot provide a simple test case. I reduced the code preserving panic and managed to remove dependency on vectors. The bug is tied to IORefs which come from InputT in haskeline used in Machine.hs. I installed haskeline with HEAD (you can do this by increasing version numbers in its cabal file) and then the reduced version compiles. I cannot tell for sure whether your entire code compiles - I couldn't get vector-bytestring to work due to boolean primop changes, but at least this particular bug is definitely fixed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8202#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC