[Git][ghc/ghc][master] 2 commits: Revert "rts: Drop racy assertion"

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Jan 12 12:49:21 UTC 2023



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


Commits:
db11f358 by Ben Gamari at 2023-01-12T07:49:04-05:00
Revert "rts: Drop racy assertion"

The logic here was inverted. Reverting the commit to avoid confusion
when examining the commit history.

This reverts commit b3eacd64fb36724ed6c5d2d24a81211a161abef1.

- - - - -
3242139f by Ben Gamari at 2023-01-12T07:49:04-05:00
rts: Drop racy assertion

0e274c39bf836d5bb846f5fa08649c75f85326ac added an assertion in
`dirty_MUT_VAR` checking that the MUT_VAR being dirtied was clean.
However, this isn't necessarily the case since another thread may have
raced us to dirty the object.

- - - - -


1 changed file:

- rts/sm/Storage.c


Changes:

=====================================
rts/sm/Storage.c
=====================================
@@ -1404,7 +1404,7 @@ allocatePinned (Capability *cap, W_ n /*words*/, W_ alignment /*bytes*/, W_ alig
 void
 dirty_MUT_VAR(StgRegTable *reg, StgMutVar *mvar, StgClosure *old)
 {
-#if defined(THREADED_RTS)
+#if !defined(THREADED_RTS)
     // This doesn't hold in the threaded RTS as we may race with another thread.
     ASSERT(RELAXED_LOAD(&mvar->header.info) == &stg_MUT_VAR_CLEAN_info);
 #endif



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b3be0d185b6e597fa517859430cf6d54df04ca46...3242139fbd18df324460e22619c1a1fb3b258a07

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/b3be0d185b6e597fa517859430cf6d54df04ca46...3242139fbd18df324460e22619c1a1fb3b258a07
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/20230112/4ba9f9af/attachment.html>


More information about the ghc-commits mailing list