From fa6f33d5e506eff8fbf7b1557d1a93c3ead8be7c Mon Sep 17 00:00:00 2001 From: Richard Kistruck Date: Wed, 21 Mar 2007 13:34:44 +0000 Subject: [PATCH] Mps branch unfixed-summary: if poolfix fails, aver that *refio is unchanged. Copied from Perforce Change: 161966 ServerID: perforce.ravenbrook.com --- mps/code/trace.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mps/code/trace.c b/mps/code/trace.c index b732a5d8075..ff76600689b 100644 --- a/mps/code/trace.c +++ b/mps/code/trace.c @@ -1285,8 +1285,17 @@ Res TraceFix(ScanState ss, Ref *refIO) /* Could move the rank switch here from the class-specific */ /* fix methods. */ res = PoolFix(pool, ss, seg, refIO); - if (res != ResOK) + if (res != ResOK) { + /* Fix protocol (de facto): if Fix fails, ref must be unchanged */ + /* Justification for this restriction: + * A: it simplifies; + * B: it's reasonable (given what may cause Fix to fail); + * C: the code (here) already assumes this: it returns without + * updating ss->fixedSummary. RHSK 2007-03-21. + */ + AVER(*refIO == ref); return res; + } } } else { /* Tract isn't white. Don't compute seg for non-statistical */