[GHC] #11380: Compiling a 10.000 line file exhausts memory (was: `cabal repl` exhausts memory)
GHC
ghc-devs at haskell.org
Sun Jan 17 17:06:38 UTC 2016
#11380: Compiling a 10.000 line file exhausts memory
-------------------------------------+-------------------------------------
Reporter: kennethb | Owner:
Type: bug | Status: new
Priority: high | Milestone:
Component: Compiler | Version: 7.10.3
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64
Type of failure: Compile-time | (amd64)
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by thomie):
* failure: Compile-time crash => Compile-time performance bug
Comment:
Compiling (instead of interpreting) the generated Parser.hs with
ghc-7.10.3 (wihout optimizations) doesn't complete either, when only 3GB
of RAM is available (tested with `ulimit -v 3000000`). The problems seem
to begin in the desugaring phase:
{{{
*** Parser:
*** Renamer/typechecker:
*** Desugar:
ghc: out of memory (requested 2097152 bytes)
}}}
The generated parser is huge (10.000 lines). But it is about the same size
as GHC's own parser, which GHC //is// able to compile with reasonable
memory.
I tried making the Parser smaller a bit, but didn't find any obvious rule
that might be triggering the problem.
Could you try with other version of GHC (say 7.8.4 and 8.0.1)? Is it a
regression, or maybe already fixed?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11380#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list