diff options
Diffstat (limited to 'rts/ThreadPaused.c')
-rw-r--r-- | rts/ThreadPaused.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rts/ThreadPaused.c b/rts/ThreadPaused.c index 83c621e386..26d07a5d2e 100644 --- a/rts/ThreadPaused.c +++ b/rts/ThreadPaused.c @@ -220,10 +220,9 @@ threadPaused(Capability *cap, StgTSO *tso) frame = (StgClosure *)tso->stackobj->sp; - // N.B. We know that the TSO is owned by the current capability so no - // memory barriers are needed here. while ((P_)frame < stack_end) { info = get_ret_itbl(frame); + load_load_barrier(); switch (info->i.type) { @@ -231,6 +230,7 @@ threadPaused(Capability *cap, StgTSO *tso) // If we've already marked this frame, then stop here. frame_info = frame->header.info; + load_load_barrier(); if (frame_info == (StgInfoTable *)&stg_marked_upd_frame_info) { if (prev_was_update_frame) { words_to_squeeze += sizeofW(StgUpdateFrame); @@ -240,10 +240,12 @@ threadPaused(Capability *cap, StgTSO *tso) goto end; } + write_barrier(); SET_INFO(frame, (StgInfoTable *)&stg_marked_upd_frame_info); bh = ((StgUpdateFrame *)frame)->updatee; bh_info = bh->header.info; + load_load_barrier(); IF_NONMOVING_WRITE_BARRIER_ENABLED { updateRemembSetPushClosure(cap, (StgClosure *) bh); } |