Skip to content

9.2.1 regression: panic with heap overflow on a file that works fine in 9.0.1

Summary

On sufficiently large(?) files that compile fine with GHC 9.0.1, I get the error message

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

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

(Originally encountered here on this PR.)

Steps to reproduce

Once the CI finishes, download any the ExtractionHaskell-* file at https://github.com/mit-plv/fiat-crypto/actions/runs/1460347497 corresponding to the failed job and extract the contents. Run ghc src/ExtractionHaskell/word_by_word_montgomery.hs -o src/ExtractionHaskell/word_by_word_montgomery. With 9.0.1, it succeeds; on 9.2.1, it fails with the aforementioned panic.

Unpack word_by_word_montgomery.hs.tar.gz (unpacked file is about 30 MB). Run

ghc word_by_word_montgomery.hs -o word_by_word_montgomery +RTS -M5G -RTS

With ghc 9.0.1, this succeeds, while with 9.2.1, it fails with the above message.

Expected behavior

I expect a working binary output.

Environment

  • GHC version used: 9.2.1, 9.0.1

Optional:

  • Operating System: Linux
  • System Architecture:
Edited by JasonGross
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information