Skip to content

Maintain invariant: MVars on mut_list are dirty

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

Backport of !4712 (closed) for 9.0

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

Merge request reports