diff options
author | Ben Gamari <ben@smart-cactus.org> | 2023-04-28 08:55:02 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2023-05-16 08:07:57 -0400 |
commit | c8f74d5f6e9874424c1e55f586ff44568308a94c (patch) | |
tree | 2ff63bdd0dd80b4f7eed738a46ba129b06b65152 /rts/Schedule.c | |
parent | 1e6861dd8612d8f71cc4635c4f73f84f316a6c7e (diff) | |
download | haskell-wip/clear-block-info.tar.gz |
rts: Clear block_info when unblockingwip/clear-block-info
Otherwise we may end up with dangling pointers which may complicate
debugging. Also, introduce more strict checking of block_info in
checkTSO.
Diffstat (limited to 'rts/Schedule.c')
-rw-r--r-- | rts/Schedule.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c index 685862a08b..0cd0ff2876 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -2565,7 +2565,8 @@ resumeThread (void *task_) traceEventRunThread(cap, tso); /* Reset blocking status */ - tso->why_blocked = NotBlocked; + tso->why_blocked = NotBlocked; + tso->block_info.closure = (StgClosure *)END_TSO_QUEUE; if ((tso->flags & TSO_BLOCKEX) == 0) { // avoid locking the TSO if we don't have to |