Skip to content

GHCi crash after heap overflow

Summary

Where I should get a heap overflow, I get that, followed -- a few seconds later -- by a complete crash of GHC:

ghc: panic! (the 'impossible' happened)
  (GHC version 9.2.5:
	heap overflow

Steps to reproduce

In ghci, execute

take 10 $ foldl (\(e:es) f -> (f e):e:es) [0] (repeat (+3))

Expected behavior

Just

*** Exception: heap overflow

Environment

  • GHC version used: both 9.2.5 (most recent recommended) and 9.4.4 (latest)

Optional:

  • Operating System: up-to-date ArchLinux
  • System Architecture: 64bits
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information