Skip to content

Maintain invariant: MVars on mut_list are dirty

vdukhovni requested to merge trac-vdukhovni/ghc:putMVar2-8.10 into ghc-8.10

Backport of !4712 (closed) for 8.10:

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 (closed)

Merge request reports