diff options
author | Simon Marlow <marlowsd@gmail.com> | 2014-11-17 13:03:56 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2014-11-17 13:03:56 +0000 |
commit | 2a6f193bb82f88e8dcb919ee7affc13feae56e98 (patch) | |
tree | ff36315687ad03528bc4ab66eabd6bf1f37f485f /rts | |
parent | a2c0a8dd15de2023e17078fa5f421ba581b3a5fa (diff) | |
download | haskell-2a6f193bb82f88e8dcb919ee7affc13feae56e98.tar.gz |
Fix a bug introduced with allocation counters
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Schedule.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c index c2260f0282..e9b0289599 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -2233,6 +2233,9 @@ suspendThread (StgRegTable *reg, rtsBool interruptible) task->incall->suspended_tso = tso; task->incall->suspended_cap = cap; + // Otherwise allocate() will write to invalid memory. + cap->r.rCurrentTSO = NULL + ACQUIRE_LOCK(&cap->lock); suspendTask(cap,task); |