X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fgencgc.c;h=288e968c7ccce568cfaa7318987215dc8df7a896;hb=d97e3589f6ba0ff7ec3d0b6c25b680c4691ac886;hp=72e14592ecdf56675347a70c828d21181718ea6d;hpb=344a1f088581303c92da333ddddc9aeb9c212ba9;p=sbcl.git diff --git a/src/runtime/gencgc.c b/src/runtime/gencgc.c index 72e1459..288e968 100644 --- a/src/runtime/gencgc.c +++ b/src/runtime/gencgc.c @@ -2238,8 +2238,12 @@ looks_like_valid_lisp_pointer_p(lispobj *pointer, lispobj *start_addr) * header. */ switch (widetag_of(*start_addr)) { case CODE_HEADER_WIDETAG: - /* This case is probably caught above. */ - break; + /* Make sure we actually point to a function in the code object, + * as opposed to a random point there. */ + if (SIMPLE_FUN_HEADER_WIDETAG==widetag_of(*(pointer-FUN_POINTER_LOWTAG))) + return 1; + else + return 0; case CLOSURE_HEADER_WIDETAG: case FUNCALLABLE_INSTANCE_HEADER_WIDETAG: if ((unsigned long)pointer !=