update submodules for GHC.HetMet.GArrow -> Control.GArrow renaming
[ghc-hetmet.git] / rts / Threads.c
index e86630e..3e1c5cf 100644 (file)
@@ -628,7 +628,7 @@ threadStackOverflow (Capability *cap, StgTSO *tso)
     // 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;
@@ -667,7 +667,7 @@ threadStackUnderflow (Capability *cap, StgTSO *tso)
     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");
         }