diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-10-02 23:29:02 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-10-05 19:18:40 -0400 |
commit | 241921a0c238a047326b0c0f599f1c24222ff66c (patch) | |
tree | 92f38a6b12ab21a8f800d72c98be826841e1bd4b | |
parent | ee8118caf12526456c619e17cbc0f729c6cd2391 (diff) | |
download | haskell-241921a0c238a047326b0c0f599f1c24222ff66c.tar.gz |
rts: Fix CNF dirtying logic
Previously due to a silly implementation bug CNFs would never have their
dirty flag set, resulting in their being added again and again to the
`mut_list`. Fix this.
Fixes #17297.
-rw-r--r-- | rts/sm/CNF.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/sm/CNF.c b/rts/sm/CNF.c index 597b7853bc..f85b390414 100644 --- a/rts/sm/CNF.c +++ b/rts/sm/CNF.c @@ -541,9 +541,9 @@ insertCompactHash (Capability *cap, StgClosure *p, StgClosure *to) { insertHashTable(str->hash, (StgWord)p, (const void*)to); - const StgInfoTable *strinfo = str->header.info; - if (strinfo == &stg_COMPACT_NFDATA_CLEAN_info) { - strinfo = &stg_COMPACT_NFDATA_DIRTY_info; + const StgInfoTable **strinfo = &str->header.info; + if (*strinfo == &stg_COMPACT_NFDATA_CLEAN_info) { + *strinfo = &stg_COMPACT_NFDATA_DIRTY_info; recordClosureMutated(cap, (StgClosure*)str); } } |