Skip to content
GitLab
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 5,248
    • Issues 5,248
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 564
    • Merge requests 564
  • 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 CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #9728
Closed
Open
Issue created Oct 26, 2014 by Sergei Trofimovich@trofiReporter

ghci: internal error: ASSERTION FAILED: file rts/Interpreter.c, line 773

It's a ghc-HEAD on amd64 ./configure --enable-unregisterised.

One of faulty tests is a:

ghc-unreg/testsuite/tests/ghci/should_run $ '/home/slyfox/dev/git/ghc-unreg/inplace/bin/ghc-stage2' -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -optc-fno-builtin -fno-warn-tabs -fno-ghci-history ghcirun002.hs --interactive -v0 -ignore-dot-ghci +RTS -I0.1 -RTS

*Main> main

(<interactive>: internal error: ASSERTION FAILED: file rts/Interpreter.c, line 773

    (GHC version 7.9.20141020 for x86_64_unknown_linux)
    Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
Aborted

The assertion failure is triggered by stack overflow check when handling ... stack overflow!

    // Stack check
    if (Sp - INTERP_STACK_CHECK_THRESH < SpLim) {
        Sp -= 2;
        Sp[1] = (W_)obj;
        Sp[0] = (W_)&stg_apply_interp_info; // placeholder, really
/* 773 */ RETURN_TO_SCHEDULER(ThreadInterpret, StackOverflow);
    }

/* ... RETURN_TO_SCHEDULER decl: */
#define RETURN_TO_SCHEDULER(todo,retcode)       \
/* this triggers assert */   SAVE_STACK_POINTERS; \
   cap->r.rCurrentTSO->what_next = (todo);      \
   threadPaused(cap,cap->r.rCurrentTSO);                \
   cap->r.rRet = (retcode);                     \
   return cap;

/* ... SAVE_STACK_POINTERS decl: */
#define SAVE_STACK_POINTERS                     \
    ASSERT(Sp > SpLim); \
    cap->r.rCurrentTSO->stackobj->sp = Sp

In our case Sp == SpLim. That means we have written one word out-of-stack-bounds, right?

Trac metadata
Trac field Value
Version 7.9
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component GHCi
Test case
Differential revisions
BlockedBy
Related
Blocking
CC hvr, simonmar
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