diff options
-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 1760fed51a..15a9bca397 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 |