diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-12-01 19:01:49 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-10-24 21:00:39 -0400 |
commit | 2f56be8a74f1f012f1756380ae111ec1327ddde0 (patch) | |
tree | b005c9580c4a4fbe2c2d015b221b6ef03cfe5f1f /rts/Messages.c | |
parent | abad977849a70578bca4e5b17a85aff43e3327be (diff) | |
download | haskell-2f56be8a74f1f012f1756380ae111ec1327ddde0.tar.gz |
rts/Messages: Annotate benign race
Diffstat (limited to 'rts/Messages.c')
-rw-r--r-- | rts/Messages.c | 3 |
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); |