From a64e94f98ca18e53ecc13f736d50b9cb2d156b05 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Fri, 21 Aug 2020 11:55:43 -0400 Subject: rts/nonmoving: Add missing STM write barrier When updating a TRec for a TVar already part of a transaction we previously neglected to add the old value to the update remembered set. I suspect this was the cause of #18587. --- rts/STM.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rts/STM.c b/rts/STM.c index 5f72c0ebfb..cff0d55082 100644 --- a/rts/STM.c +++ b/rts/STM.c @@ -1342,6 +1342,9 @@ void stmWriteTVar(Capability *cap, if (entry != NULL) { if (entry_in == trec) { // Entry found in our trec + IF_NONMOVING_WRITE_BARRIER_ENABLED { + updateRemembSetPushClosure(cap, (StgClosure *) entry->new_value); + } entry -> new_value = new_value; } else { // Entry found in another trec -- cgit v1.2.1