aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
authorDavid Jones2003-11-14 11:16:25 +0000
committerDavid Jones2003-11-14 11:16:25 +0000
commit72ffc59e3cff9cb477673a1c51937fbdf554626a (patch)
tree519a2c1a135a3ee6b5d4dc80defa7fdd8788bcd1 /mps/code
parent35130274ebea061ba252679ff5196953806c7b90 (diff)
downloademacs-72ffc59e3cff9cb477673a1c51937fbdf554626a.tar.gz
emacs-72ffc59e3cff9cb477673a1c51937fbdf554626a.zip
Mps: bug fix revealed by mpsicv
Copied from Perforce Change: 64245 ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
-rw-r--r--mps/code/global.c2
-rw-r--r--mps/code/trace.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/mps/code/global.c b/mps/code/global.c
index 8876811d3ee..98299dbbcc6 100644
--- a/mps/code/global.c
+++ b/mps/code/global.c
@@ -144,7 +144,7 @@ Bool GlobalsCheck(Globals arenaGlobals)
144 CHECKL(RingCheck(&arenaGlobals->rootRing)); 144 CHECKL(RingCheck(&arenaGlobals->rootRing));
145 CHECKL(RingCheck(&arenaGlobals->rememberedSummaryRing)); 145 CHECKL(RingCheck(&arenaGlobals->rememberedSummaryRing));
146 CHECKL(arenaGlobals->rememberedSummaryIndex < RememberedSummaryBLOCK); 146 CHECKL(arenaGlobals->rememberedSummaryIndex < RememberedSummaryBLOCK);
147 /* RingIsSingle imples index == 0 */ 147 /* <code/global.c#remembered.summary> RingIsSingle imples index == 0 */
148 CHECKL(!RingIsSingle(&arenaGlobals->rememberedSummaryRing) || 148 CHECKL(!RingIsSingle(&arenaGlobals->rememberedSummaryRing) ||
149 arenaGlobals->rememberedSummaryIndex == 0); 149 arenaGlobals->rememberedSummaryIndex == 0);
150 CHECKL(RingCheck(&arena->formatRing)); 150 CHECKL(RingCheck(&arena->formatRing));
diff --git a/mps/code/trace.c b/mps/code/trace.c
index bfc21dd9736..07723fc0bf5 100644
--- a/mps/code/trace.c
+++ b/mps/code/trace.c
@@ -1824,6 +1824,9 @@ void arenaForgetProtection(Globals globals)
1824 Arena arena; 1824 Arena arena;
1825 1825
1826 arena = GlobalsArena(globals); 1826 arena = GlobalsArena(globals);
1827 /* Setting this early means that we preserve the invariant
1828 <code/global.c#remembered.summary> */
1829 globals->rememberedSummaryIndex = 0;
1827 RING_FOR(node, GlobalsRememberedSummaryRing(globals), next) { 1830 RING_FOR(node, GlobalsRememberedSummaryRing(globals), next) {
1828 RememberedSummaryBlock block = 1831 RememberedSummaryBlock block =
1829 RING_ELT(RememberedSummaryBlock, globalRing, node); 1832 RING_ELT(RememberedSummaryBlock, globalRing, node);
@@ -1831,7 +1834,6 @@ void arenaForgetProtection(Globals globals)
1831 RingRemove(node); 1834 RingRemove(node);
1832 ControlFree(arena, block, sizeof *block); 1835 ControlFree(arena, block, sizeof *block);
1833 } 1836 }
1834 globals->rememberedSummaryIndex = 0;
1835 return; 1837 return;
1836} 1838}
1837 1839