summaryrefslogtreecommitdiff
path: root/rts/Messages.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-12-01 19:01:49 -0500
committerBen Gamari <ben@smart-cactus.org>2020-10-24 21:00:39 -0400
commit2f56be8a74f1f012f1756380ae111ec1327ddde0 (patch)
treeb005c9580c4a4fbe2c2d015b221b6ef03cfe5f1f /rts/Messages.c
parentabad977849a70578bca4e5b17a85aff43e3327be (diff)
downloadhaskell-2f56be8a74f1f012f1756380ae111ec1327ddde0.tar.gz
rts/Messages: Annotate benign race
Diffstat (limited to 'rts/Messages.c')
-rw-r--r--rts/Messages.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rts/Messages.c b/rts/Messages.c
index f2eac0c8cd..6418a65117 100644
--- a/rts/Messages.c
+++ b/rts/Messages.c
@@ -188,6 +188,9 @@ uint32_t messageBlackHole(Capability *cap, MessageBlackHole *msg)
// The blackhole must indirect to a TSO, a BLOCKING_QUEUE, an IND,
// or a value.
loop:
+ // If we are being called from stg_BLACKHOLE then TSAN won't know about the
+ // previous read barrier that makes the following access safe.
+ TSAN_ANNOTATE_BENIGN_RACE(&((StgInd*)bh)->indirectee, "messageBlackHole");
p = UNTAG_CLOSURE(ACQUIRE_LOAD(&((StgInd*)bh)->indirectee));
info = RELAXED_LOAD(&p->header.info);