On Mon, 26 Jun 2023, Gard Spreemann wrote:
GHCi seems to segfault randomly every now and then, after seemingly
failing to allocate memory for simple operations, e.g.:
$ ghci
GHCi, version 9.0.2: https://www.haskell.org/ghc/ :? for help
ghci> 750+850
1600
ghc: mmap 4096 bytes at (nil): Cannot allocate memory
ghc: Try specifying an address with +RTS -xm<addr> -RTS
zsh: segmentation fault ghci
I've run into the same issue as well, mostly while trying to compile using
clash.
It seems that a kernel regression may be partly to blame as well, as
observed in this Arch forum thread [1]. It may or may not be fixed by a
kernel fix as well (I haven't tested it myself).
Regards,
Scott
[1] https://bbs.archlinux.org/viewtopic.php?id=282429