Tidy up tso->stackobj before calling threadStackUnderflow (#7636)
authorSimon Marlow <marlowsd@gmail.com>
Thu, 7 Feb 2013 09:55:20 +0000 (09:55 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Thu, 7 Feb 2013 09:56:47 +0000 (09:56 +0000)
Fixes the following crash:

  internal error: threadStackUnderflow: not enough space for return values

when using STM.

rts/Schedule.c

index a21b312..5f48ef6 100644 (file)
@@ -2772,6 +2772,7 @@ findRetryFrameHelper (Capability *cap, StgTSO *tso)
     }
       
     case UNDERFLOW_FRAME:
+        tso->stackobj->sp = p;
         threadStackUnderflow(cap,tso);
         p = tso->stackobj->sp;
         continue;