summaryrefslogtreecommitdiff
path: root/rts/Messages.h
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-12-16 09:33:37 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-01-02 07:33:26 -0500
commit87bc458de497cdc407c5c32572103a452ee36e4d (patch)
tree397fa9f07d1d03478be59e3a37db8dba022368f3 /rts/Messages.h
parent77c4a15f5a4aea95080059af90bae2767f162a4f (diff)
downloadhaskell-87bc458de497cdc407c5c32572103a452ee36e4d.tar.gz
rts/Messages: Relax locked-closure assertion
In general we are less careful about locking closures when running with only a single capability. Fixes #19075.
Diffstat (limited to 'rts/Messages.h')
-rw-r--r--rts/Messages.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/rts/Messages.h b/rts/Messages.h
index 561eb449d2..fef4510740 100644
--- a/rts/Messages.h
+++ b/rts/Messages.h
@@ -25,8 +25,9 @@ void sendMessage (Capability *from_cap, Capability *to_cap, Message *msg);
INLINE_HEADER void
doneWithMsgThrowTo (Capability *cap, MessageThrowTo *m)
{
- // The message better be locked
- ASSERT(m->header.info == &stg_WHITEHOLE_info);
+ // The message better be locked (unless we are running single-threaded,
+ // where we are a bit more lenient (#19075).
+ ASSERT(n_capabilities == 1 || m->header.info == &stg_WHITEHOLE_info);
IF_NONMOVING_WRITE_BARRIER_ENABLED {
updateRemembSetPushClosure(cap, (StgClosure *) m->link);
updateRemembSetPushClosure(cap, (StgClosure *) m->source);