[project @ 2005-11-08 10:44:22 by simonmar]
authorsimonmar <unknown>
Tue, 8 Nov 2005 10:44:22 +0000 (10:44 +0000)
committersimonmar <unknown>
Tue, 8 Nov 2005 10:44:22 +0000 (10:44 +0000)
raiseAsync: fix bug that can cause a scavenge_stack panic for a thread
that has just been killed.

ghc/rts/Schedule.c

index 93a64d8..35e87e0 100644 (file)
@@ -3802,9 +3802,8 @@ raiseAsync_(Capability *cap, StgTSO *tso, StgClosure *exception,
        
        case STOP_FRAME:
            // We've stripped the entire stack, the thread is now dead.
-           sp += sizeofW(StgStopFrame);
            tso->what_next = ThreadKilled;
-           tso->sp = sp;
+           tso->sp = frame + sizeofW(StgStopFrame);
            return;
            
        default: