diff options
author | Viktor Dukhovni <ietf-dane@dukhovni.org> | 2021-01-02 01:00:51 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-03 13:55:10 -0500 |
commit | 0a2656249251634e2a0c8391bd7448069cf02c2c (patch) | |
tree | 9770839c5827f7e30f35cfa7bd4f03d1f9167b43 /rts | |
parent | c7e16936f4277adaf309b31a9a47d8c5a49e6f38 (diff) | |
download | haskell-0a2656249251634e2a0c8391bd7448069cf02c2c.tar.gz |
Maintain invariant: MVars on mut_list are dirty
The fix for 18919 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, but 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')
-rw-r--r-- | rts/PrimOps.cmm | 2 | ||||
-rw-r--r-- | rts/Threads.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm index 7ee77c7216..c5b232f09d 100644 --- a/rts/PrimOps.cmm +++ b/rts/PrimOps.cmm @@ -1834,6 +1834,7 @@ loop: // Resolve #18919. ccall dirty_MVAR(BaseReg "ptr", mvar "ptr", StgMVar_value(mvar) "ptr"); + info = stg_MVAR_DIRTY_info; } } @@ -1924,6 +1925,7 @@ loop: // Resolve #18919. ccall dirty_MVAR(BaseReg "ptr", mvar "ptr", StgMVar_value(mvar) "ptr"); + info = stg_MVAR_DIRTY_info; } } diff --git a/rts/Threads.c b/rts/Threads.c index 39616655ab..2560a4d765 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -810,6 +810,7 @@ loop: if (info == &stg_MVAR_CLEAN_info) { // Resolve #18919. dirty_MVAR(&cap->r, (StgClosure*)mvar, mvar->value); + info = &stg_MVAR_DIRTY_info; } } |