GHCi does not exit after heap overflow exception
Start GHCi as follows ghci +RTS -M20m
Enter the following
> let xs = [1..10^6] :: [Int]
> Data.List.foldl' (+) 0 xs
This results in (as expected):
*** Exception: heap overflow
However, GHCi did not exit. Entering any expression will result in the above given exception.
And if you try to reload GHCi the following panic error will be produced:
Ok, 0 modules loaded.
ghc: panic! (the 'impossible' happened)
(GHC version 8.2.1 for x86_64-unknown-linux):
heap overflow
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
I tried the same using GHC 7.10.3 and 8.0.2. In both cases GHCi would exit after the initial heap overflow exception. With 8.2.1 this does not happen.
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Unknown/Multiple |
Architecture |