[GHC] #13967: Simplifier ticks exhausted (when trying UnfoldingDone) from using lots of ByteString Builder literals

GHC ghc-devs at haskell.org
Wed Jul 12 20:47:53 UTC 2017


#13967: Simplifier ticks exhausted (when trying UnfoldingDone) from using lots of
ByteString Builder literals
-------------------------------------+-------------------------------------
           Reporter:  sergv          |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.2
           Keywords:                 |  Operating System:  Linux
       Architecture:  x86_64         |   Type of failure:  Compile-time
  (amd64)                            |  crash or panic
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 I've tried to port Cabal's `Distribution.Simple.Build.PathsModule` from
 `String`s to `Data.ByteString.Builder`. The module uses lot's of string
 literals combined via `++`. After enabling `OverloadedStrings` and
 changing `++` to `Data.Semigroup.<>` I got an error message like in the
 subject.

 I have reproduced the issue on self-contained example, attached.

 ```
 $ cd "/tmp/ghc-ticks-exhausted-bug/" && stack build
 test-0.1.0.0: configure (lib)
 Configuring test-0.1.0.0...
 test-0.1.0.0: build (lib)
 Preprocessing library test-0.1.0.0...
 [1 of 1] Compiling Test             ( Test.hs, .stack-
 work/dist/x86_64-linux/Cabal-1.24.2.0/build/Test.o )

 /tmp/ghc-ticks-exhausted-bug/Test.hs:17:21: warning: [-Wunused-top-binds]
     Defined but not used: data constructor ‘Linux’

 /tmp/ghc-ticks-exhausted-bug/Test.hs:22:29: warning: [-Wunused-top-binds]
     Defined but not used: data constructor ‘Arm’

 <no location info>: error:
     ghc: panic! (the 'impossible' happened)
   (GHC version 8.0.2 for x86_64-unknown-linux):
         Simplifier ticks exhausted
   When trying UnfoldingDone $
   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: 184333

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug


 --  While building package test-0.1.0.0 using:
       /home/sergey/.stack/setup-exe-cache/x86_64-linux/Cabal-
 simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-
 work/dist/x86_64-linux/Cabal-1.24.2.0 build lib:test --ghc-options "
 -ddump-hi -ddump-to-file"
     Process exited with code: ExitFailure 1

 ```

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


More information about the ghc-tickets mailing list