[Git][ghc/ghc][wip/T19075] rts/Messages: Relax locked-closure assertion

Ben Gamari gitlab at gitlab.haskell.org
Wed Dec 16 14:35:09 UTC 2020



Ben Gamari pushed to branch wip/T19075 at Glasgow Haskell Compiler / GHC


Commits:
c7bfd425 by Ben Gamari at 2020-12-16T09:35:05-05:00
rts/Messages: Relax locked-closure assertion

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

Fixes #19075.

- - - - -


1 changed file:

- rts/Messages.h


Changes:

=====================================
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);



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c7bfd425000955b130f76011492340f0dbc9c565

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c7bfd425000955b130f76011492340f0dbc9c565
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201216/8151b2f6/attachment.html>


More information about the ghc-commits mailing list