[GHC] #8568: internal error: allocation of ... bytes too large

GHC ghc-devs at haskell.org
Tue Nov 18 02:32:35 UTC 2014


#8568: internal error: allocation of ... bytes too large
-------------------------------------+-------------------------------------
              Reporter:  mojojojo    |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.6.3
            Resolution:              |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:  Runtime     |       Blocked By:
  crash                              |  Related Tickets:  #9647
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Changes (by thomie):

 * failure:  None/Unknown => Runtime crash


Old description:

> Running the following GHCi session:
> {{{
> import GHC.DataSize
> import qualified Data.HashTable.IO as HT
> import Control.Monad
> t <- HT.new :: IO (HT.BasicHashTable Int Char)
> forM_ [0..100000] $ \i -> HT.insert t i 'a'
> recursiveSize t
> }}}
> results in the following error:
> {{{
> <interactive>: internal error: allocation of 1208480 bytes too large (GHC
> should have complained at compile-time)
>     (GHC version 7.6.3 for x86_64_apple_darwin)
>     Please report this as a GHC bug:
> http://www.haskell.org/ghc/reportabug
> Abort trap: 6
> }}}

New description:

 Running the following program after normal compilation:
 {{{
 import GHC.DataSize
 import qualified Data.HashTable.IO as HT
 import Control.Monad
 main = do
   t <- HT.new :: IO (HT.BasicHashTable Int Char)
   forM_ [0..100000] $ \i -> HT.insert t i 'a'
   recursiveSize t
   return ()
 }}}

 results in the following error:
 {{{
 internal error: allocation of 1208480 bytes too large (GHC should have
 complained at compile-time)
     (GHC version 7.8.3 for x86_64_unknown_linux)
 }}}

 To reproduce, first: `cabal install ghc-datasize hashtables`.

--

Comment:

 Can not install dependencies with ghc-7.9.20141115, so don't know if this
 fixed in HEAD.

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


More information about the ghc-tickets mailing list