Skip to content

Segmentation fault on long input (list of pairs)

When compiling LongList.hs with

ghc --make LongList.hs

then running the output gives a segfault:

$ ./LongList
8595
Segmentation fault

It also segfaults with ghc 6.12.1 (without printing 8595) and with ghc 6.12.3.

On ghc 6.12.3 running on Mac OS 10.5, no segfault is seen. (I haven't tried much longer input, since it already eats up approx. 1.2 GB of RAM.)

Trac metadata
Trac field Value
Version 7.0.1
Type Bug
TypeOfFailure RuntimeCrash
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Linux
Architecture x86_64 (amd64)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information