mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-06 14:02:07 -08:00
Mps master: poolamc.c amcfix, amcheaderfix: correct bad shield
code (but badness was being masked by the shield cache; see job001706). ShieldExpose(seg) once, and ShieldCover it once, so that _all_ .exposed.seg statements are between Expose and Cover. Copied from Perforce Change: 163171 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
ffc4f125c9
commit
7776ff6176
1 changed files with 4 additions and 8 deletions
|
|
@ -1656,11 +1656,10 @@ Res AMCFix(Pool pool, ScanState ss, Seg seg, Ref *refIO)
|
|||
AVER_CRITICAL(ref < SegLimit(seg));
|
||||
arena = pool->arena;
|
||||
|
||||
/* .exposed.seg: statements tagged ".exposed.seg" below require */
|
||||
/* .exposed.seg: Statements tagged ".exposed.seg" below require */
|
||||
/* that "seg" (that is: the 'from' seg) has been ShieldExposed. */
|
||||
ShieldExpose(arena, seg);
|
||||
newRef = (*format->isMoved)(ref); /* .exposed.seg */
|
||||
ShieldCover(arena, seg); /* .exposed.seg */
|
||||
|
||||
if(newRef == (Addr)0) {
|
||||
/* If object is nailed already then we mustn't copy it: */
|
||||
|
|
@ -1724,9 +1723,7 @@ Res AMCFix(Pool pool, ScanState ss, Seg seg, Ref *refIO)
|
|||
} while(!BUFFER_COMMIT(buffer, newRef, length));
|
||||
ss->copiedSize += length;
|
||||
|
||||
ShieldExpose(arena, seg);
|
||||
(*format->move)(ref, newRef); /* .exposed.seg */
|
||||
ShieldCover(arena, seg);
|
||||
} else {
|
||||
/* reference to broken heart (which should be snapped out -- */
|
||||
/* consider adding to (non-existant) snap-out cache here) */
|
||||
|
|
@ -1740,6 +1737,7 @@ updateReference:
|
|||
res = ResOK;
|
||||
|
||||
returnRes:
|
||||
ShieldCover(arena, seg); /* .exposed.seg */
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
@ -1809,11 +1807,10 @@ static Res AMCHeaderFix(Pool pool, ScanState ss, Seg seg, Ref *refIO)
|
|||
AVER_CRITICAL(ref < SegLimit(seg)); /* see .ref-limit */
|
||||
arena = pool->arena;
|
||||
|
||||
/* .exposed.seg: statements tagged ".exposed.seg" below require */
|
||||
/* .exposed.seg: Statements tagged ".exposed.seg" below require */
|
||||
/* that "seg" (that is: the 'from' seg) has been ShieldExposed. */
|
||||
ShieldExpose(arena, seg);
|
||||
newRef = (*format->isMoved)(ref); /* .exposed.seg */
|
||||
ShieldCover(arena, seg); /* .exposed.seg */
|
||||
|
||||
if(newRef == (Addr)0) {
|
||||
/* If object is nailed already then we mustn't copy it: */
|
||||
|
|
@ -1877,9 +1874,7 @@ static Res AMCHeaderFix(Pool pool, ScanState ss, Seg seg, Ref *refIO)
|
|||
} while (!BUFFER_COMMIT(buffer, newBase, length));
|
||||
ss->copiedSize += length;
|
||||
|
||||
ShieldExpose(arena, seg);
|
||||
(*format->move)(ref, newRef); /* .exposed.seg */
|
||||
ShieldCover(arena, seg);
|
||||
} else {
|
||||
/* reference to broken heart (which should be snapped out -- */
|
||||
/* consider adding to (non-existent) snap-out cache here) */
|
||||
|
|
@ -1893,6 +1888,7 @@ updateReference:
|
|||
res = ResOK;
|
||||
|
||||
returnRes:
|
||||
ShieldCover(arena, seg); /* .exposed.seg */
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue