[GHC] #14959: Heep overflow in optimizer

GHC ghc-devs at haskell.org
Wed Mar 21 17:32:33 UTC 2018


#14959: Heep overflow in optimizer
-------------------------------------+-------------------------------------
           Reporter:  darchon        |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.4.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Compiling the following with optimisations:

 {{{
 module Test where

 import Data.Bits (setBit)

 f = foldl setBit 0 [x | (x,_) <- zip [0..] [1]] :: Integer
 }}}

 fails with:

 {{{
 $ ghc -O0 -fforce-recomp Test.hs
 [1 of 1] Compiling Test             ( Test.hs, Test.o )
 $ ghc -O -fforce-recomp Test.hs
 [1 of 1] Compiling Test             ( Test.hs, Test.o )
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.4.1 for x86_64-unknown-linux):
         heap overflow
 }}}

 Fails on 8.0.2, 8.2.2, and 8.4.1

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


More information about the ghc-tickets mailing list