Skip to content

checkStack sanity check fails

checkStackChunk() currently has a commented-out assertion:

void
checkStackChunk( StgPtr sp, StgPtr stack_end )
{
    StgPtr p;

    p = sp;
    while (p < stack_end) {
        p += checkStackFrame( p );
    }
    // ASSERT( p == stack_end ); -- HWL
}

I realized a while ago that if I enable it, it fails in some cases, so I asked Simon Marlow about this. Quoting:

I don't know, but blame says it was disabled by Hans-Wolfgang Loidl as part of the GUM merge 18 years ago. I suggest just enabling it and debug whatever goes wrong.

This ticket is to enable the assertion and fix bugs.

To reproduce, run the test suite:

$ make EXTRA_HC_OPTS='-debug -rtsopts' WAY=sanity

Tests that trigger the assertion:

  • annrun01
  • T10508_api
  • dynCompileExpr

Tried with GHC HEAD

Trac metadata
Trac field Value
Version
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
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