X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fsunos-os.c;h=8c1d9b493e368ba4cc4aa64300c7c96c5e13d5d8;hb=c3699db2053ff3b5ac6a98d4431c3789496002d8;hp=a6ab92fb4a3c05c40496f67b268efda1914844e7;hpb=9f10bc102adce15a820027777a03e49a7b7623da;p=sbcl.git diff --git a/src/runtime/sunos-os.c b/src/runtime/sunos-os.c index a6ab92f..8c1d9b4 100644 --- a/src/runtime/sunos-os.c +++ b/src/runtime/sunos-os.c @@ -150,14 +150,26 @@ boolean is_valid_lisp_addr(os_vm_address_t addr) Just assume address is valid if it lies within one of the known spaces. (Unlike sunos-os which keeps track of every valid page.) */ - return ( in_range_p(addr, READ_ONLY_SPACE_START, READ_ONLY_SPACE_SIZE) - || in_range_p(addr, STATIC_SPACE_START , STATIC_SPACE_SIZE ) - || in_range_p(addr, DYNAMIC_0_SPACE_START, DYNAMIC_SPACE_SIZE ) - || in_range_p(addr, DYNAMIC_1_SPACE_START, DYNAMIC_SPACE_SIZE ) - || in_range_p(addr, CONTROL_STACK_START , CONTROL_STACK_SIZE ) - || in_range_p(addr, BINDING_STACK_START , BINDING_STACK_SIZE )); + + /* FIXME: this looks like a valid definition for all targets with + cheney-gc; it may not be impressively smart (witness the + comment above) but maybe associating these functions with the + GC rather than the OS would be a maintainability win. -- CSR, + 2003-04-04 */ + struct thread *th; + if(in_range_p(addr, READ_ONLY_SPACE_START, READ_ONLY_SPACE_SIZE) || + in_range_p(addr, STATIC_SPACE_START , STATIC_SPACE_SIZE) || + in_range_p(addr, DYNAMIC_0_SPACE_START, DYNAMIC_SPACE_SIZE) || + in_range_p(addr, DYNAMIC_1_SPACE_START, DYNAMIC_SPACE_SIZE)) + return 1; + for_each_thread(th) { + if((th->control_stack_start <= addr) && (addr < th->control_stack_end)) + return 1; + if(in_range_p(addr, th->binding_stack_start, BINDING_STACK_SIZE)) + return 1; + } + return 0; } -