diff options
Diffstat (limited to 'rts/Schedule.c')
-rw-r--r-- | rts/Schedule.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c index 9b1e98ea17..fa48bef1a7 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -1315,9 +1315,7 @@ scheduleHandleThreadFinished (Capability *cap, Task *task, StgTSO *t) if (t->what_next == ThreadComplete) { if (task->incall->ret) { // NOTE: return val is stack->sp[1] (see StgStartup.cmm) - StgDeadThreadFrame *dead = (StgDeadThreadFrame *) &task->incall->tso->stackobj->sp[0]; - ASSERT(dead->header.info == &stg_dead_thread_info); - *(task->incall->ret) = (StgClosure *) dead->result; + *(task->incall->ret) = (StgClosure *)task->incall->tso->stackobj->sp[1]; } task->incall->rstat = Success; } else { |