[Haskell-cafe] Breaking ghci

Yitzchak Gale gale at sefer.org
Tue Jun 30 05:08:51 EDT 2009


Günther Schmidt wrote:
>> ...*I*
>> have managed to write code that ghc is not even able to compile due to
>> exhausting virtual memory!
>> Top that!

Good work Günther!

Joe Fredette wrote:
> Code or it didn't happen. :)

Yes, how did you do it?

Did it involve very large literals? GHC is known to have some
limitations with that. For example, on my machine, a String
literal that is larger than about 1 Gb will cause GHC to
overflow the RTS stack. And a list literal with only a few
thousand elements can cause GHC to suck up all memory and
bring my computer to its knees.

Examples:

choke1 = "\
\0123456789abcdef\
\0123456789abcdef\
.
.
.
\"

choke2 = [
 0,1,2,3,4,5,6,7,
 0,1,2,3,4,5,6,7,
.
.
.
 0,1,2,3,4,5,6,7,
 99]

Regards,
Yitz


More information about the Haskell-Cafe mailing list