// will be discarded after the first overflow, being replaced by a
// non-moving 32k chunk.
if (old_stack->sp == old_stack->stack + old_stack->stack_size) {
- frame->next_chunk = new_stack;
+ frame->next_chunk = (StgStack*)END_TSO_QUEUE; // dummy
}
tso->stackobj = new_stack;
if (retvals != 0)
{
// we have some return values to copy to the old stack
- if ((new_stack->sp - new_stack->stack) < retvals)
+ if ((nat)(new_stack->sp - new_stack->stack) < retvals)
{
barf("threadStackUnderflow: not enough space for return values");
}