summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-10-02 23:29:02 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-10-05 19:18:40 -0400
commit241921a0c238a047326b0c0f599f1c24222ff66c (patch)
tree92f38a6b12ab21a8f800d72c98be826841e1bd4b
parentee8118caf12526456c619e17cbc0f729c6cd2391 (diff)
downloadhaskell-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.c6
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);
}
}