GHCi 6.4.2 reports an internal error: unknown/strange object
I have a medium-sized interpreted program that seems to corrupt the heap when running under GHCi. Here's a couple of examples. (Ignore the first run, of course.)
C:\Documents and Settings\johndetr\My Documents\Haskell\Eval>ghci
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.4.2, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base-1.0 ... linking ... done.
Prelude> :load Main
Compiling Types ( ./Types.hs, interpreted )
Compiling Layout ( ./Layout.hs, interpreted )
Compiling Eval ( ./Eval.hs, interpreted )
Compiling Main ( Main.hs, interpreted )
Ok, modules loaded: Main, Eval, Layout, Types.
*Main> main
Loading package haskell98-1.0 ... linking ... done.
Loading package haskell-src-1.0 ... linking ... done.
HsVar (UnQual (HsIdent "result"))
338350
[Node (Color 0.0 0.5 0.0) 12005 "338350"]
GHC's heap exhausted: current limit is 268435456 bytes;
Use the `-M<size>' option to increase the total heap size.
C:\Documents and Settings\johndetr\My Documents\Haskell\Eval>ghci +RTS -M500m
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.4.2, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base-1.0 ... linking ... done.
Prelude> :load Main
Compiling Types ( ./Types.hs, interpreted )
Compiling Layout ( ./Layout.hs, interpreted )
Compiling Eval ( ./Eval.hs, interpreted )
Compiling Main ( Main.hs, interpreted )
Ok, modules loaded: Main, Eval, Layout, Types.
*Main> main
Loading package haskell98-1.0 ... linking ... done.
Loading package haskell-src-1.0 ... linking ... done.
HsVar (UnQual (HsIdent "result"))
338350
[Node (Color 0.0 0.5 0.0) 12005 "338350"]
<interactive>: internal error: update_fwd: unknown/strange object 38769
Please report this as a compiler bug. See:
http://www.haskell.org/ghc/reportabug
C:\Documents and Settings\johndetr\My Documents\Haskell\Eval>ghci +RTS -M800m
___ ___ _
/ _ \ /\ /\/ __(_)
/ /_\// /_/ / / | | GHC Interactive, version 6.4.2, for Haskell 98.
/ /_\\/ __ / /___| | http://www.haskell.org/ghc/
\____/\/ /_/\____/|_| Type :? for help.
Loading package base-1.0 ... linking ... done.
Prelude> :load Main
Compiling Types ( ./Types.hs, interpreted )
Compiling Layout ( ./Layout.hs, interpreted )
Compiling Eval ( ./Eval.hs, interpreted )
Compiling Main ( Main.hs, interpreted )
Ok, modules loaded: Main, Eval, Layout, Types.
*Main> main
<interactive>:1:0: Not in scope: `gain'
*Main> main
Loading package haskell98-1.0 ... linking ... done.
Loading package haskell-src-1.0 ... linking ... done.
HsVar (UnQual (HsIdent "result"))
338350
[Node (Color 0.0 0.5 0.0) 12005 "338350"]
<interactive>: internal error: update_fwd: unknown/strange object 38769
Please report this as a compiler bug. See:
http://www.haskell.org/ghc/reportabug
So, would you like the source files? Or how else can I help?
Also, I run into the "gain" bug above quite often when I type ahead to GHCi under Windows. I assume this is known behavior.
Finally, when I got the initial message above to use the -M flag, it took me forever to remember to add the +RTS flag. Perhaps the message could be reworded to help people like me?
Cheers, John
Trac metadata
Trac field | Value |
---|---|
Version | 6.4.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |