summaryrefslogtreecommitdiff
path: root/rts/Threads.c
diff options
context:
space:
mode:
authorViktor Dukhovni <ietf-dane@dukhovni.org>2021-01-02 01:00:51 -0500
committerViktor Dukhovni <ietf-dane@dukhovni.org>2021-01-02 12:54:13 -0500
commit6a62ca7ad1473c62045785b6acb6e15648da9394 (patch)
tree5dc4ef60b8ec552231a6f7f8e6c4ffc8d9055336 /rts/Threads.c
parent64c948e5ebccd7fd04d372d2de471dec9a330167 (diff)
downloadhaskell-wip/backports-8.8.tar.gz
Maintain invariant: MVars on mut_list are dirtywip/backports-8.8ghc-8.8
The previous patch was somewhat incomplete: while the MVars were correctly added to the mut_list via dirty_MVAR(), their info table remained "clean". While this is mostly harmless in non-debug builds, it trips an assertion in the debug build, and may result in the MVar being needlessly being added to the mut_list multiple times. Resolves: #19145
Diffstat (limited to 'rts/Threads.c')
-rw-r--r--rts/Threads.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/rts/Threads.c b/rts/Threads.c
index b28a696c57..949872ad17 100644
--- a/rts/Threads.c
+++ b/rts/Threads.c
@@ -793,6 +793,7 @@ loop:
if (info == &stg_MVAR_CLEAN_info) {
// Resolve #18919.
dirty_MVAR(&cap->r, (StgClosure*)mvar);
+ info = &stg_MVAR_DIRTY_info;
}
}