Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,873
    • Issues 4,873
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 457
    • Merge requests 457
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #4845
Closed
Open
Created Dec 16, 2010 by Ian Lynagh <igloo@earth.li>@trac-igloo

internal error: threadStackUnderflow: not enough space for return values

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
Trac metadata
Trac field Value
Version 7.1
Type Bug
TypeOfFailure OtherFailure
Priority highest
Resolution Unresolved
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking