diff --git a/mps/src/trace.c b/mps/src/trace.c index 1304b6e6f07..8e903c5eeca 100644 --- a/mps/src/trace.c +++ b/mps/src/trace.c @@ -1,6 +1,6 @@ /* impl.c.trace: GENERIC TRACER IMPLEMENTATION * - * $HopeName: MMsrc!trace.c(trunk.55) $ + * $HopeName: MMsrc!trace.c(trunk.56) $ * Copyright (C) 1997 The Harlequin Group Limited. All rights reserved. * * .sources: design.mps.tracer. @@ -8,7 +8,7 @@ #include "mpm.h" -SRCID(trace, "$HopeName: MMsrc!trace.c(trunk.55) $"); +SRCID(trace, "$HopeName: MMsrc!trace.c(trunk.56) $"); /* ScanStateCheck -- check consistency of a ScanState object */ @@ -942,8 +942,19 @@ Res TraceFix(ScanState ss, Ref *refIO) if(res != ResOK) return res; } + } else { + /* Address is not in segment. */ + /* It is illegal for exact references to point to an */ + /* address that is currently reserved by the arena, but */ + /* not in use. There can't possibly be any objects at */ + /* those addresses. We check that here. + /* This AVER might be a candidate for making CRITICAL in */ + /* some configurations */ + AVER(ss->rank < RankEXACT || + !ArenaIsReservedAddr(ss->arena, ref)); } + /* .fix.fixed.all: */ /* ss->fixedSummary is accumulated for all the pointers whether */ /* or not they are genuine references. We could accumulate fewer */