From: Nikodemus Siivola Date: Mon, 28 Nov 2011 16:00:02 +0000 (+0200) Subject: gencgc: fix regression from 137ba2db2d362f03754ccd080ddbe96f7e3c5dc7 X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=26b063e941624112ea53eacc7ad1f4fb158d1cca;p=sbcl.git gencgc: fix regression from 137ba2db2d362f03754ccd080ddbe96f7e3c5dc7 Turned loop conditions into asserts in faith that they always hold. Turns out this is not the case after all. --- diff --git a/src/runtime/gencgc.c b/src/runtime/gencgc.c index fea3194..acc79f5 100644 --- a/src/runtime/gencgc.c +++ b/src/runtime/gencgc.c @@ -1454,8 +1454,9 @@ general_copy_large_object(lispobj object, long nwords, boolean boxedp) page_index_t next_page; page_bytes_t old_bytes_used; - /* BOXED ONLY? */ - /* Note: Any page write-protection must be removed, else a + /* FIXME: This comment is somewhat stale. + * + * Note: Any page write-protection must be removed, else a * later scavenge_newspace may incorrectly not scavenge these * pages. This would not be necessary if they are added to the * new areas, but let's do it for them all (they'll probably @@ -1511,13 +1512,17 @@ general_copy_large_object(lispobj object, long nwords, boolean boxedp) next_page++; while ((old_bytes_used == GENCGC_CARD_BYTES) && (page_table[next_page].gen == from_space) && + /* FIXME: It is not obvious to me why this is necessary + * as a loop condition: it seems to me that the + * region_start_offset test should be sufficient, but + * experimentally that is not the case. --NS + * 2011-11-28 */ + (boxedp ? + page_boxed_p(next_page) : + page_allocated_no_region_p(next_page)) && page_table[next_page].large_object && (page_table[next_page].region_start_offset == npage_bytes(next_page - first_page))) { - if (boxedp) - gc_assert(page_boxed_p(next_page)); - else - gc_assert(page_allocated_no_region_p(next_page)); /* Checks out OK, free the page. Don't need to both zeroing * pages as this should have been done before shrinking the * object. These pages shouldn't be write-protected, even if