Opened 3 years ago

Last modified 3 years ago

#13820 new bug

GHC goes out of memory while compiling nothing

Reported by: seunje Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.0.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Compiling this results in GHC using all memory and eventually segfaulting

f = id id id id
    id id id id
    id id id id
    id id id id
    id id id id
    id id id id
    id id id

main = print 1

Change History (2)

comment:1 Changed 3 years ago by RyanGlScott

The fact that this uses a lot of memory is entirely unsurprising, as https://stackoverflow.com/questions/23746852/why-does-haskells-do-nothing-function-id-consume-tons-of-memory documents. I'm surprised that it segfaults, however. How much memory does your system have?

comment:2 Changed 3 years ago by seunje

Segfaults on Linux x64 with 8GB memory, no swap file. It works (n=27) on 16GB OSX machine, peeking at 11GB.

Note: See TracTickets for help on using tickets.