X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fgencgc.c;h=e4ed81b9bfb74f5fd5a986d8e80519040f5bf40b;hb=0e3c4b4db102bd204a30402d7e5a0de44aea57ce;hp=f23d83e94a6ee8e8c6aaa5e34a2964f8639b474e;hpb=b27852e74e11ccc9808305a73d815a4a67d77963;p=sbcl.git diff --git a/src/runtime/gencgc.c b/src/runtime/gencgc.c index f23d83e..e4ed81b 100644 --- a/src/runtime/gencgc.c +++ b/src/runtime/gencgc.c @@ -2069,6 +2069,12 @@ possibly_valid_dynamic_space_pointer(lispobj *pointer) return 0; } + /* If the containing object is a code object, presume that the + * pointer is valid, simply because it could be an unboxed return + * address. */ + if (widetag_of(*start_addr) == CODE_HEADER_WIDETAG) + return 1; + return looks_like_valid_lisp_pointer_p(pointer, start_addr); } @@ -2110,9 +2116,7 @@ valid_conservative_root_p(void *addr, page_index_t addr_page_index) * expensive but important, since it vastly reduces the * probability that random garbage will be bogusly interpreted as * a pointer which prevents a page from moving. */ - if (!(code_page_p(addr_page_index) - || (is_lisp_pointer((lispobj)addr) && - possibly_valid_dynamic_space_pointer(addr)))) + if (!possibly_valid_dynamic_space_pointer(addr)) return 0; #endif