Opened 10 months ago

Last modified 9 months ago

#16303 merge bug

checkStack sanity check fails

Reported by: osa1 Owned by:
Priority: normal Milestone: 8.8.1
Component: Compiler Version:
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


checkStackChunk() currently has a commented-out assertion:

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

Change History (4)

comment:2 Changed 10 months ago by monoidal

Status: patchmerge

I think this can be merged to 8.8 (commit 6b890d76).

comment:3 Changed 10 months ago by RyanGlScott

Milestone: 8.8.1

comment:4 Changed 9 months ago by Marge Bot <ben+marge-bot@…>

In 6b890d76/ghc:

Fix checkStackChunk() call in Interepter.c, enable an assertion

Fixes #16303
Note: See TracTickets for help on using tickets.