[GHC] #5448: GHC stuck in infinite loop compiling with optimizations

GHC ghc-devs at haskell.org
Sun Apr 22 08:14:55 UTC 2018


#5448: GHC stuck in infinite loop compiling with optimizations
-------------------------------------+-------------------------------------
        Reporter:  ronwalf           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  ⊥
       Component:  Compiler          |              Version:  7.0.3
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash                              |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by sgraf):

 Actually, this doesn't reproduce anymore, at least not in the way
 described. For GHC 8.2.1, the original ghcloop.hs elicits the following
 panic:

 {{{
 ghc.exe: panic! (the 'impossible' happened)
   (GHC version 8.2.1 for x86_64-unknown-mingw32):
         Simplifier ticks exhausted
   When trying RuleFired Class op funcEq
   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: 15160
   Call stack:
       CallStack (from HasCallStack):
         prettyCurrentCallStack, called at
 compiler\utils\Outputable.hs:1133:58 in ghc:Outputable
         callStackDoc, called at compiler\utils\Outputable.hs:1137:37 in
 ghc:Outputable
         pprPanic, called at compiler\simplCore\SimplMonad.hs:199:31 in
 ghc:SimplMonad
 }}}

 That's better than looping forever, although I don't know why it's a panic
 rather than a warning. Note that it also includes which function was the
 culprit. I read somewhere that the Simplifier adopted its fuel-based
 approach in the meantime, which may be the reason this is 'fixed'.

 The contravariant example doesn't reproduce at all.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5448#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list