[GHC] #8833: GHC (compilation mode) crashes

#8833: GHC (compilation mode) crashes -------------------------------------+------------------------------------- Reporter: guest | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: x86_64 (amd64) | Type of failure: Compile-time Difficulty: Moderate (less | crash than a day) | Test Case: Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- {{{ module Main where { newtype Rec a b = Rec {deRec :: Rec a b -> a}; infixl 1 >|>; infixl 1 <|<; (>|>) = Rec; (<|<) (Rec x) = x; fix f = (\x -> f (x <|< x)) (Rec (\x -> f (x <|< x))); factorial = fix (\f x -> if x<=1 then 1 else x*f(x-1)); main = do { x <- getLine; putStrLn (show (factorial (read x))) } } }}} GHC crashes with this error: {{{ [1 of 1] Compiling Main ( /Users/iOne/Documents/Test.hs, /Users/iOne/Documents/Test.o ) ghc: panic! (the 'impossible' happened) (GHC version 7.6.3 for x86_64-apple-darwin): Simplifier ticks exhausted When trying UnfoldingDone a_sMx{v} [lid] To increase the limit, use -fsimpl-tick-factor=N (default 100) If you need to do this, let GHC HQ know, and what factor you needed To see detailed counts use -ddump-simpl-stats Total ticks: 7121 }}} (This works fine in GHCi). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8833 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8833: GHC (compilation mode) crashes -------------------------------------+------------------------------------- Reporter: guest | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 (amd64) Type of failure: Compile-time | Difficulty: Moderate (less crash | than a day) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Changes (by goldfire): * version: 7.6.3 => 7.8.1-rc2 Comment: I've confirmed that this bug still happens with 7.8.1 RC 2. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8833#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8833: GHC (compilation mode) crashes -------------------------------------+------------------------------------- Reporter: guest | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 (amd64) Type of failure: Compile-time | Difficulty: Moderate (less crash | than a day) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Comment (by thoughtpolice): (Apparently I forgot to post my comment on this one. Urgh.) After talking with Simon, we don't think this is a bug. This program probably won't compile on ''any'' GHC version (and Simon verified it on 7.4) as well - this is a variant of a known problem I believe, where you can trick the inliner into looping by encoding recursion into a data type: http://www.haskell.org/ghc/docs/7.8.1-rc2/html/users_guide/bugs.html#bugs- ghc It will of course work in GHCi - but that's because it doesn't use the inliner. Unless I'm missing something here, I believe this is a WONTFIX. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8833#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8833: GHC (compilation mode) crashes -------------------------------------+------------------------------------- Reporter: guest | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler | Version: 7.8.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 (amd64) Type of failure: Compile-time | Difficulty: Moderate (less crash | than a day) Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------- Comment (by simonpj): Indeed, it's a dup of #3872, #5400, #5448, #5722, #7057, #7369. Nevertheless, good to have another example Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8833#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8833: GHC (compilation mode) crashes -------------------------------------+------------------------------------- Reporter: guest | Owner: Type: bug | Status: closed Priority: normal | Milestone: ⊥ Component: Compiler | Version: Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 (amd64) Type of failure: Compile-time | Difficulty: Moderate (less crash | than a day) Test Case: | Blocked By: Blocking: | Related Tickets: #3872, #5400, | #5448, #5722, #7057, #7369 -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: new => closed * version: 7.8.1-rc2 => * resolution: => duplicate * related: => #3872, #5400, #5448, #5722, #7057, #7369 * milestone: 7.8.1 => ⊥ -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8833#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC