Skip to content
Snippets Groups Projects
Commit eb74dbe5 authored by Ben Gamari's avatar Ben Gamari
Browse files

rts/Messages: Relax locked-closure assertion

In general we are less careful about locking closures when running with
only a single capability.

Fixes #19075.

(cherry picked from commit 87bc458d)
parent 3fde0392
No related branches found
No related tags found
No related merge requests found
...@@ -25,8 +25,9 @@ void sendMessage (Capability *from_cap, Capability *to_cap, Message *msg); ...@@ -25,8 +25,9 @@ void sendMessage (Capability *from_cap, Capability *to_cap, Message *msg);
INLINE_HEADER void INLINE_HEADER void
doneWithMsgThrowTo (Capability *cap, MessageThrowTo *m) doneWithMsgThrowTo (Capability *cap, MessageThrowTo *m)
{ {
// The message better be locked // The message better be locked (unless we are running single-threaded,
ASSERT(m->header.info == &stg_WHITEHOLE_info); // where we are a bit more lenient (#19075).
ASSERT(n_capabilities == 1 || m->header.info == &stg_WHITEHOLE_info);
IF_NONMOVING_WRITE_BARRIER_ENABLED { IF_NONMOVING_WRITE_BARRIER_ENABLED {
updateRemembSetPushClosure(cap, (StgClosure *) m->link); updateRemembSetPushClosure(cap, (StgClosure *) m->link);
updateRemembSetPushClosure(cap, (StgClosure *) m->source); updateRemembSetPushClosure(cap, (StgClosure *) m->source);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment