summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-12-16 09:33:37 -0500
committerBen Gamari <ben@well-typed.com>2020-12-16 12:30:20 -0500
commite97d81c5c3ce18c820fd2394650fdad625944d66 (patch)
tree1eac5702a0cf1eaa185e9ea2d4f63711b4e73cca
parentb58cb63afd3353beb3a6e11ba7fa557fdedb8941 (diff)
downloadhaskell-e97d81c5c3ce18c820fd2394650fdad625944d66.tar.gz
rts/Messages: Relax locked-closure assertionwip/T19075
In general we are less careful about locking closures when running with only a single capability. Fixes #19075.
-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);