Opened 9 years ago

Closed 9 years ago

#776 closed bug (fixed)

GHCi 6.4.2 reports an internal error: unknown/strange object

Reported by: john.detreville@… Owned by:
Priority: normal Milestone: 6.4.3
Component: GHCi Version: 6.4.2
Keywords: Cc:
Operating System: Windows Architecture: x86
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

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

Change History (2)

comment:1 Changed 9 years ago by simonmar

  • Milestone changed from 6.4.2 to 6.4.3

comment:2 Changed 9 years ago by simonmar

  • Resolution set to fixed
  • Status changed from new to closed

Fixed; this is the same bug as #787

Note: See TracTickets for help on using tickets.