From 2a95582e41497fa1d9636710e98d24ce2fd4c3c5 Mon Sep 17 00:00:00 2001 From: Douglas Katzman Date: Fri, 20 Oct 2017 13:05:07 -0400 Subject: [PATCH] Refine boundary condition in conservative_root_p() On a page with exactly N bytes in use, pointing to byte N is no good. --- src/runtime/gencgc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/gencgc.c b/src/runtime/gencgc.c index 6509eeede..9c4165f02 100644 --- a/src/runtime/gencgc.c +++ b/src/runtime/gencgc.c @@ -1666,7 +1666,7 @@ conservative_root_p(lispobj addr, page_index_t addr_page_index) { /* quick check 1: Address is quite likely to have been invalid. */ struct page* page = &page_table[addr_page_index]; - if ((addr & (GENCGC_CARD_BYTES - 1)) > page_bytes_used(addr_page_index) || + if ((addr & (GENCGC_CARD_BYTES - 1)) >= page_bytes_used(addr_page_index) || #if SEGREGATED_CODE (!is_lisp_pointer(addr) && page->allocated != CODE_PAGE_FLAG) || #endif -- 2.11.4.GIT