
#14358: GHCi does not exit after heap overflow exception -------------------------------------+------------------------------------- Reporter: ferdinandvw | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Start GHCi as follows `ghci +RTS -M20m` Enter the following {{{#!hs
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: {{{#!hs 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. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14358 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler