diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-12-06 06:55:59 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-01-12 07:49:04 -0500 |
commit | 3242139fbd18df324460e22619c1a1fb3b258a07 (patch) | |
tree | 89f13d71573e6a5a38bdcd775fa0171a9c00aca9 /rts/sm/Storage.c | |
parent | db11f3586085901e89705f69aff472e027c0748f (diff) | |
download | haskell-3242139fbd18df324460e22619c1a1fb3b258a07.tar.gz |
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.
Diffstat (limited to 'rts/sm/Storage.c')
-rw-r--r-- | rts/sm/Storage.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index 60021f6b2a..40d8a45806 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -1404,7 +1404,10 @@ 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) + // 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 Capability *cap = regTableToCapability(reg); // No barrier required here as no other heap object fields are read. See |