1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-26 08:41:47 -07:00

More assertions in dylan object format:

1. the limit of a padding object must be greater than its base
2. mustn't forward padding objects
(These assertions would have helped us with job003848.)

Copied from Perforce
 Change: 186797
 ServerID: perforce.ravenbrook.com
This commit is contained in:
Gareth Rees 2014-07-03 11:56:47 +01:00
parent 49fd3efc36
commit cb150cd014

View file

@ -517,10 +517,13 @@ static mps_res_t dylan_scan(mps_ss_t mps_ss,
mps_addr_t base, mps_addr_t limit)
{
mps_res_t res;
mps_addr_t prev = base;
while(base < limit) {
prev = base;
res = dylan_scan1(mps_ss, &base);
if(res) return res;
assert(prev < base);
}
assert(base == limit);
@ -717,6 +720,7 @@ static void dylan_fwd(mps_addr_t old, mps_addr_t new)
mps_addr_t limit;
assert(dylan_isfwd(old) == NULL);
assert((*(mps_word_t *)old & 3) == 0); /* mustn't forward padding objects */
assert(((mps_word_t)new & 3) == 0);
p = (mps_word_t *)old;