X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FThreadPaused.c;fp=rts%2FThreadPaused.c;h=5463deecb8dc8c9a69e62a2c24de278dc2bf1e0a;hb=0fa59deb44b8a1a0b44ee2b4cc4ae0db31dec038;hp=c32a75b9a8e9fd5c1979e31677c0133ad9756293;hpb=94bdf8cb5234289267310b1134b5877f31ddada0;p=ghc-hetmet.git diff --git a/rts/ThreadPaused.c b/rts/ThreadPaused.c index c32a75b..5463dee 100644 --- a/rts/ThreadPaused.c +++ b/rts/ThreadPaused.c @@ -231,8 +231,10 @@ threadPaused(Capability *cap, StgTSO *tso) (long)((StgPtr)frame - tso->sp)); // If this closure is already an indirection, then - // suspend the computation up to this point: - suspendComputation(cap,tso,(StgPtr)frame); + // suspend the computation up to this point. + // NB. check raiseAsync() to see what happens when + // we're in a loop (#2783). + suspendComputation(cap,tso,(StgUpdateFrame*)frame); // Now drop the update frame, and arrange to return // the value to the frame underneath: @@ -242,8 +244,9 @@ threadPaused(Capability *cap, StgTSO *tso) // And continue with threadPaused; there might be // yet more computation to suspend. - threadPaused(cap,tso); - return; + frame = (StgClosure *)tso->sp + 2; + prev_was_update_frame = rtsFalse; + continue; } if (bh->header.info != &stg_CAF_BLACKHOLE_info) {