X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fvalidate.h;h=7dfb73d4792618f5a5738be2401157db21f1b127;hb=bf40ae88bc289fd765a33861cc4bc0853ed483ba;hp=de4e3452c7be71fea9df98f29623158f3ee08425;hpb=e5d96999ae4388181ddb0c113313f26afbe997e8;p=sbcl.git diff --git a/src/runtime/validate.h b/src/runtime/validate.h index de4e345..7dfb73d 100644 --- a/src/runtime/validate.h +++ b/src/runtime/validate.h @@ -39,43 +39,65 @@ #if !defined(LANGUAGE_ASSEMBLY) #include #ifdef LISP_FEATURE_STACK_GROWS_DOWNWARD_NOT_UPWARD -#define CONTROL_STACK_GUARD_PAGE(th) \ + +#define CONTROL_STACK_HARD_GUARD_PAGE(th) \ ((os_vm_address_t)(th->control_stack_start)) +#define CONTROL_STACK_GUARD_PAGE(th) \ + (CONTROL_STACK_HARD_GUARD_PAGE(th) + os_vm_page_size) #define CONTROL_STACK_RETURN_GUARD_PAGE(th) \ (CONTROL_STACK_GUARD_PAGE(th) + os_vm_page_size) -#define ALIEN_STACK_GUARD_PAGE(th) \ + +#define ALIEN_STACK_HARD_GUARD_PAGE(th) \ ((os_vm_address_t)(th->alien_stack_start)) +#define ALIEN_STACK_GUARD_PAGE(th) \ + (ALIEN_STACK_HARD_GUARD_PAGE(th) + os_vm_page_size) #define ALIEN_STACK_RETURN_GUARD_PAGE(th) \ (ALIEN_STACK_GUARD_PAGE(th) + os_vm_page_size) + #else -#define CONTROL_STACK_GUARD_PAGE(th) \ + +#define CONTROL_STACK_HARD_GUARD_PAGE(th) \ (((os_vm_address_t)(th->control_stack_end)) - os_vm_page_size) +#define CONTROL_STACK_GUARD_PAGE(th) \ + (CONTROL_STACK_HARD_GUARD_PAGE(th) - os_vm_page_size) #define CONTROL_STACK_RETURN_GUARD_PAGE(th) \ (CONTROL_STACK_GUARD_PAGE(th) - os_vm_page_size) -#define ALIEN_STACK_GUARD_PAGE(th) \ + +#define ALIEN_STACK_HARD_GUARD_PAGE(th) \ (((os_vm_address_t)th->alien_stack_start) + ALIEN_STACK_SIZE - \ os_vm_page_size) +#define ALIEN_STACK_GUARD_PAGE(th) \ + (ALIEN_STACK_HARD_GUARD_PAGE(th) - os_vm_page_size) #define ALIEN_STACK_RETURN_GUARD_PAGE(th) \ (ALIEN_STACK_GUARD_PAGE(th) - os_vm_page_size) + #endif -#define BINDING_STACK_GUARD_PAGE(th) \ +#define BINDING_STACK_HARD_GUARD_PAGE(th) \ (((os_vm_address_t)th->binding_stack_start) + BINDING_STACK_SIZE - \ os_vm_page_size) +#define BINDING_STACK_GUARD_PAGE(th) \ + (BINDING_STACK_HARD_GUARD_PAGE(th) - os_vm_page_size) #define BINDING_STACK_RETURN_GUARD_PAGE(th) \ (BINDING_STACK_GUARD_PAGE(th) - os_vm_page_size) extern void validate(void); extern void +protect_control_stack_hard_guard_page(int protect_p, struct thread *thread); +extern void protect_control_stack_guard_page(int protect_p, struct thread *thread); extern void protect_control_stack_return_guard_page(int protect_p, struct thread *thread); extern void +protect_binding_stack_hard_guard_page(int protect_p, struct thread *thread); +extern void protect_binding_stack_guard_page(int protect_p, struct thread *thread); extern void protect_binding_stack_return_guard_page(int protect_p, struct thread *thread); extern void +protect_alien_stack_hard_guard_page(int protect_p, struct thread *thread); +extern void protect_alien_stack_guard_page(int protect_p, struct thread *thread); extern void protect_alien_stack_return_guard_page(int protect_p, struct thread *thread);