From e895ed5a43f4ec75aa5076fb41417f3da340f354 Mon Sep 17 00:00:00 2001 From: Richard Brooksby Date: Wed, 29 Mar 2023 17:29:21 +0100 Subject: [PATCH] shieldDebugCheck requires SegFirst/SegNext to find all segments, so segAbsFinish but keep the segment on the pool ring until shield operations are complete. --- code/seg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/seg.c b/code/seg.c index 9782e43b3c..49482c4c98 100644 --- a/code/seg.c +++ b/code/seg.c @@ -185,8 +185,6 @@ static void segAbsFinish(Inst inst) AVERT(Seg, seg); - RingRemove(SegPoolRing(seg)); - arena = PoolArena(SegPool(seg)); /* TODO: It would be good to avoid deprotecting segments eagerly @@ -205,6 +203,11 @@ static void segAbsFinish(Inst inst) ShieldFlush(PoolArena(SegPool(seg))); AVER(!seg->queued); + /* shieldDebugCheck requires SegFirst/SegNext to find all segments, + so the segment must remain on the pool ring until shield + operations are complete. */ + RingRemove(SegPoolRing(seg)); + limit = SegLimit(seg); TRACT_TRACT_FOR(tract, addr, arena, seg->firstTract, limit) {