diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-08-21 11:55:43 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-09-17 19:46:29 -0400 |
commit | 3309d2a2700a5c4d197bcd14b4fc47d19dce6962 (patch) | |
tree | 2de6e8ae2bb1ecbcc78ec3203e33189cac54f85a | |
parent | efc41fccdf1d4850355c699b89b993802fdbd878 (diff) | |
download | haskell-3309d2a2700a5c4d197bcd14b4fc47d19dce6962.tar.gz |
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.
(cherry picked from commit a64e94f98ca18e53ecc13f736d50b9cb2d156b05)
-rw-r--r-- | rts/STM.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |