[Git][ghc/ghc][master] rts/nonmoving: Add missing STM write barrier

Marge Bot gitlab at gitlab.haskell.org
Fri Sep 18 19:55:55 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
0799b3de by Ben Gamari at 2020-09-18T15:55:50-04:00
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.

- - - - -


1 changed file:

- rts/STM.c


Changes:

=====================================
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



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0799b3de3e3462224bddc0e4b6a3156d04a06361

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0799b3de3e3462224bddc0e4b6a3156d04a06361
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200918/c1abbbf6/attachment-0001.html>


More information about the ghc-commits mailing list