diff options
Diffstat (limited to 'rts/Interpreter.c')
-rw-r--r-- | rts/Interpreter.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rts/Interpreter.c b/rts/Interpreter.c index 501cc4fe4f..8a608ec1ba 100644 --- a/rts/Interpreter.c +++ b/rts/Interpreter.c @@ -80,9 +80,15 @@ SpLim = tso_SpLim(cap->r.rCurrentTSO); #define SAVE_STACK_POINTERS \ - ASSERT(Sp > SpLim); \ cap->r.rCurrentTSO->stackobj->sp = Sp +// Note [Not true: ASSERT(Sp > SpLim)] +// +// SpLim has some headroom (RESERVED_STACK_WORDS) to allow for saving +// any necessary state on the stack when returning to the scheduler +// when a stack check fails.. The upshot of this is that Sp could be +// less than SpLim both when leaving to return to the scheduler. + #define RETURN_TO_SCHEDULER(todo,retcode) \ SAVE_STACK_POINTERS; \ cap->r.rCurrentTSO->what_next = (todo); \ |