fix place-GC problem with empty_self_modidx's shift cache

This commit is contained in:
Matthew Flatt 2011-11-16 20:23:25 -07:00
parent 851cbf4fcc
commit eae7c5d5d7
2 changed files with 20 additions and 1 deletions

View File

@ -2987,6 +2987,24 @@ void GC_mark2(const void *const_p, struct NewGC *gc)
}
}
#if 0
if (page->size_class < 2) {
if (page->page_type == PAGE_TAGGED) {
void *q;
if (page->size_class)
q = MED_OBJHEAD(p, page->size) + 1;
else
q = p;
if (((objhead *)q)[-1].type == PAGE_TAGGED) {
if (!((objhead *)q)[-1].moved) {
if ((*(short *)q < 0) || (*(short *)q > 1000))
abort();
}
}
}
}
#endif
#ifdef NEWGC_BTC_ACCOUNT
/* toss this over to the BTC mark routine if we're doing accounting */
if(gc->doing_memory_accounting) {

View File

@ -3435,7 +3435,8 @@ static Scheme_Object *do_modidx_shift(Scheme_Object *modidx,
i = 0;
} else {
/* May have GCed: */
if (cvec && !sbm->shift_cache)
if (cvec && !sbm->shift_cache
&& !SAME_OBJ((Scheme_Object *)sbm, empty_self_modidx))
sbm->shift_cache = cvec;
if (i >= c) {