Opened 9 years ago

Closed 9 years ago

#4845 closed bug (fixed)

internal error: threadStackUnderflow: not enough space for return values

Reported by: igloo Owned by: simonmar
Priority: highest Milestone: 7.4.1
Component: Runtime System Version: 7.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: GHCi crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

With (the type-incorrect) Foo.hs:

module Foo where

import Data.Char
import System.Directory

main :: IO ()
main = do return ()
          return ()
          return ()
          return ()
          return ()
          return ()
          return ()
          return ()
          return ()
          let xs :: [(Int, Bool, Char, Char, Char)]
              xs = undefined
          mapM_ f xs
          return ()
          return ()

f :: (Int, Char, Char, Char) -> IO ()
f _ = return ()

f1 :: IO ()
f1 = return ()

f2 :: IO ()
f2 = return ()

f3 :: IO ()
f3 = return ()

f4 :: IO ()
f4 = return ()

I get:

$ ghci Foo.hs
GHCi, version 7.1.20101216: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
[1 of 1] Compiling Foo              ( Foo.hs, interpreted )
ghc-stage2: internal error: threadStackUnderflow: not enough space for return values
    (GHC version 7.1.20101216 for x86_64_unknown_linux)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Change History (2)

comment:1 Changed 9 years ago by simonmar

Type of failure: None/UnknownGHCi crash

Not reproducible on 32-bit x86/Linux.

comment:2 Changed 9 years ago by simonmar

Resolution: fixed
Status: newclosed

Fixed:

Tue Dec 21 10:14:11 GMT 2010  Simon Marlow <marlowsd@gmail.com>
  * raiseExceptionHelper: update tso->stackobj->sp before calling threadStackOverflow (#4845)
Note: See TracTickets for help on using tickets.