diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-12-16 09:33:37 -0500 |
---|---|---|
committer | Ben Gamari <ben@well-typed.com> | 2020-12-16 12:30:20 -0500 |
commit | e97d81c5c3ce18c820fd2394650fdad625944d66 (patch) | |
tree | 1eac5702a0cf1eaa185e9ea2d4f63711b4e73cca | |
parent | b58cb63afd3353beb3a6e11ba7fa557fdedb8941 (diff) | |
download | haskell-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.h | 5 |
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); |