From 7356f8e043018678490a0721ff27e0d834e0fa7f Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Fri, 16 Jul 2021 10:22:40 -0400 Subject: rts/ThreadPaused: Ordering fixes --- rts/ThreadPaused.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rts/ThreadPaused.c b/rts/ThreadPaused.c index ffa1168a27..d350d3fbed 100644 --- a/rts/ThreadPaused.c +++ b/rts/ThreadPaused.c @@ -230,7 +230,7 @@ threadPaused(Capability *cap, StgTSO *tso) case UPDATE_FRAME: // If we've already marked this frame, then stop here. - frame_info = frame->header.info; + frame_info = ACQUIRE_LOAD(&frame->header.info); if (frame_info == (StgInfoTable *)&stg_marked_upd_frame_info) { if (prev_was_update_frame) { words_to_squeeze += sizeofW(StgUpdateFrame); @@ -352,7 +352,7 @@ threadPaused(Capability *cap, StgTSO *tso) OVERWRITING_CLOSURE_SIZE(bh, closure_sizeW_(bh, INFO_PTR_TO_STRUCT(bh_info))); // The payload of the BLACKHOLE points to the TSO - RELAXED_STORE(&((StgInd *)bh)->indirectee, (StgClosure *)tso); + ((StgInd *)bh)->indirectee = (StgClosure *)tso; SET_INFO_RELEASE(bh,&stg_BLACKHOLE_info); // .. and we need a write barrier, since we just mutated the closure: -- cgit v1.2.1